Compare commits

..

3 Commits

Author SHA1 Message Date
Mike Zak
37654156a6 Update changelog for v0.9.0 2021-03-04 10:53:00 +02:00
Ori Newman
0271858f25 Readd BlockHashes to getBlocks response (#1575) 2021-03-03 16:27:51 +02:00
Elichai Turkel
7909480757 Merge big subdags in pick virtual parents (#1574)
* Refactor mergeSetIncrease to return the current BFS block to allow easier merging

* Remove unneeded Heap/HashSet usages

* Add new IsAnyAncestorOf to DagTopolyManager

* Check if the new candidate is in the future of any existing candidate

* Add comments and fix off-by-one in the mergeSetIncrease queue

* Fixed DAGToplogy test mock

* Fix review comments
2021-03-03 16:17:16 +02:00
3 changed files with 35 additions and 12 deletions

View File

@@ -1,11 +1,31 @@
Kaspad v0.9.0 - 2021-03-04
===========================
* Merge big subdags in pick virtual parents (#1574)
* Write in the reject message the tx rejection reason (#1573)
* Add nil checks for protowire (#1570)
* Increase getBlocks limit to 1000 (#1572)
* Return RPC error if getBlock's lowHash doesn't exist (#1569)
* Add default dns-seeder to testnet (#1568)
* Fix utxoindex deserialization (#1566)
* Add pruning point hash to GetBlockDagInfo response (#1565)
* Use EmitUnpopulated so that kaspactl prints all fields, even the default ones (#1561)
* Stop logging an error whenever an RPC/P2P connection is canceled (#1562)
* Cleanup the logger and make it asynchronous (#1524)
* Close all iterators (#1542)
* Add childrenHashes to GetBlock/s RPC commands (#1560)
* Add ScriptPublicKey.Version to RPC (#1559)
* Fix the target block rate to create less bursty mining (#1554)
Kaspad v0.8.10 - 2021-02-25
===========================
[*] Fix bug where invalid mempool transactions were not removed (#1551)
[*] Add RPC reconnection to the miner (#1552)
[*] Remove virtual diff parents - only selectedTip is virtualDiffParent now (#1550)
[*] Fix UTXO index (#1548)
[*] Prevent fast failing (#1545)
[*] Increase the sleep time in kaspaminer when the node is not synced (#1544)
[*] Disallow header only blocks on RPC, relay and when requesting IBD full blocks (#1537)
[*] Make templateManager hold a DomainBlock and isSynced bool instead of a GetBlockTemplateResponseMessage (#1538)
* Fix bug where invalid mempool transactions were not removed (#1551)
* Add RPC reconnection to the miner (#1552)
* Remove virtual diff parents - only selectedTip is virtualDiffParent now (#1550)
* Fix UTXO index (#1548)
* Prevent fast failing (#1545)
* Increase the sleep time in kaspaminer when the node is not synced (#1544)
* Disallow header only blocks on RPC, relay and when requesting IBD full blocks (#1537)
* Make templateManager hold a DomainBlock and isSynced bool instead of a GetBlockTemplateResponseMessage (#1538)

View File

@@ -45,7 +45,9 @@ func (csm *consensusStateManager) pickVirtualParents(tips []*externalapi.DomainH
end--
}
}
// Limit to 30 candidates, that way we don't go over thousands of tips when the network isn't healthy.
// Limit to maxBlockParents*3 candidates, that way we don't go over thousands of tips when the network isn't healthy.
// There's no specific reason for a factor of 3, and its not a consensus rule, just an estimation saying we probably
// don't want to consider and calculate 3 times the amount of candidates for the set of parents.
if len(candidates) > int(csm.maxBlockParents)*3 {
candidates = candidates[:int(csm.maxBlockParents)*3]
}
@@ -84,7 +86,7 @@ func (csm *consensusStateManager) pickVirtualParents(tips []*externalapi.DomainH
return nil, err
}
candidates = append(candidates, newCandidate)
log.Debugf("Cannot add block %s, instead added new candidate: %s", candidate, newCandidate)
log.Debugf("Block %s increases merge set too much, instead adding its ancestor %s", candidate, newCandidate)
}
boundedMergeBreakingParents, err := csm.boundedMergeBreakingParents(selectedVirtualParents)
@@ -104,7 +106,7 @@ func (csm *consensusStateManager) pickVirtualParents(tips []*externalapi.DomainH
}
}
}
log.Tracef("The virtual parents resolved to be: %s", selectedVirtualParents)
log.Debugf("The virtual parents resolved to be: %s", selectedVirtualParents)
return selectedVirtualParents, nil
}
@@ -202,7 +204,7 @@ func (csm *consensusStateManager) mergeSetIncrease(candidate *externalapi.Domain
defer onEnd()
visited := hashset.New()
// Start with the parents in the queue as we already know the candidate isn't an ancestor of the parents.
// Start with the candidate's parents in the queue as we already know the candidate isn't an ancestor of the selectedVirtualParents.
parents, err := csm.dagTopologyManager.Parents(candidate)
if err != nil {
return false, nil, 0, err

View File

@@ -85,6 +85,7 @@ func (x *GetBlocksResponseMessage) toAppMessage() (appmessage.Message, error) {
}
return &appmessage.GetBlocksResponseMessage{
BlockVerboseData: blocksVerboseData,
BlockHashes: x.BlockHashes,
Error: rpcErr,
}, nil
}