* UTXO dump of block 0fca37ca667c2d550a6c4416dad9717e50927128c424fa4edbebc436ab13aeef
* Activate HF immediately and change reward to 1000
* Change protocol version and datadir location
* Delete comments
* Fix zero hash to muhash zero hash in genesis utxo dump check
* Don't omit genesis as direct parent
* Fix tests
* Change subsidy to 500
* Dont assume genesis multiset is empty
* Fix BlockReward test
* Fix TestValidateAndInsertImportedPruningPoint test
* Fix pruning point genesis utxo set
* Fix tests related to mainnet utxo set
* Dont change the difficulty before you have a full window
* Fix TestBlockWindow tests
* Remove global utxo set variable, and persist mainnetnet utxo deserialization between runs
* Fix last tests
* Make peer banning opt-in
* small fix for a test
* Fix go lint
* Fix Ori's review comments
* Change DAA score of genesis to checkpoint DAA score and fix all tests
* Fix the BlockLevel bits counting
* Fix some tests and make them run a little faster
* Change datadir name back to kaspa-mainnet and change db path from /data to /datadir
* Last changes for the release and change the version to 0.11.5
Co-authored-by: Ori Newman <orinewman1@gmail.com>
Co-authored-by: Ori Newman <>
Co-authored-by: msutton <mikisiton2@gmail.com>
* Replace keccak with CSHAKE256 in oPoW
* Add benchmarks to hash writers to compare blake2b to the CSHAKE
* Update genesis blocks
* Update tests
* Define genesis's block level to be the maximal one
* Add message to genesis coinbase
* Add comments to genesis coinbase
* Fix tests
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Replace the old blockSubsidy parameters with the new ones.
* Return subsidyGenesisReward if blockHash is the genesis hash.
* Traverse a block's past for the subsidy calculation.
* Partially implement SubsidyStore.
* Refer to SubsidyStore from CoinbaseManager.
* Wrap calcBlockSubsidy in getBlockSubsidy, which first checks the database.
* Fix finalityStore not calling GenerateShardingID.
* Implement calculateAveragePastSubsidy.
* Implement calculateMergeSetSubsidySum.
* Implement calculateSubsidyRandomVariable.
* Implement calcBlockSubsidy.
* Add a TODO about floats.
* Update the calcBlockSubsidy TODO.
* Use binary.LittleEndian in calculateSubsidyRandomVariable.
* Fix bad range in calculateSubsidyRandomVariable.
* Replace float64 with big.Rat everywhere except for subsidyRandomVariable.
* Fix a nil dereference.
* Use a random walk to approximate the normal distribution.
* In order to avoid unsupported fractional results from powInt64, flip the numerator and the denominator manually.
* Set standardDeviation to 0.25, MaxSompi to 10_000_000_000 * SompiPerKaspa and defaultSubsidyGenesisReward to 1_000.
* Set the standard deviation to 0.2.
* Use a binomial distribution instead of trying to estimate the normal distribution.
* Change some values around.
* Clamp the block subsidy.
* Remove the fake duplicate constants in the util package.
* Reduce MaxSompi to only 100m Kaspa to avoid hitting the uint64 ceiling.
* Lower MaxSompi further to avoid new and exciting ways for the uint64 ceiling to be hit.
* Remove debug logs.
* Fix a couple of failing tests.
* Fix TestBlockWindow.
* Fix limitTransactionCount sometimes crashing on index-out-of-bounds.
* In TrustedDataDataDAABlock, replace BlockHeader with DomainBlock
* In calculateAveragePastSubsidy, use blockWindow instead of doing a BFS manually.
* Remove the reference to DAGTopologyManager in coinbaseManager.
* Add subsidy to the coinbase payload.
* Get rid of the subsidy store and extract subsidies out of coinbase transactions.
* Keep a blockWindow amount of blocks under the virtual for IBD purposes.
* Manually remove the virtual genesis from the merge set.
* Fix simnet genesis.
* Fix TestPruning.
* Fix TestCheckBlockIsNotPruned.
* Fix TestBlockWindow.
* Fix TestCalculateSignatureHashSchnorr.
* Fix TestCalculateSignatureHashECDSA.
* Fix serializing the wrong value into the coinbase payload.
* Rename coinbaseOutputForBlueBlock to coinbaseOutputAndSubsidyForBlueBlock.
* Add a TODO about optimizing trusted data DAA window blocks.
* Expand on a comment in TestCheckBlockIsNotPruned.
* In calcBlockSubsidy, divide the big.Int numerator by the big.Int denominator instead of converting to float64.
* Clarify a comment.
* Rename SubsidyMinGenesisReward to MinSubsidy.
* Properly handle trusted data blocks in calculateMergeSetSubsidySum.
* Use the first two bytes of the selected parent's hash for randomness instead of math/rand.
* Restore maxSompi to what it used to be.
* Fix TestPruning.
* Fix TestAmountCreation.
* Fix TestBlockWindow.
* Fix TestAmountUnitConversions.
* Increase the timeout in many-tips to 30 minutes.
* Check coinbase subsidy for every block
* Re-rename functions
* Use shift instead of powInt64 to determine subsidyRandom
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* Replace header finality point with pruning point
* Fix TestTransactionAcceptance
* Fix pruning candidate
* Store all past pruning points
* Pass pruning points on IBD
* Add blue score to block header
* Simplify ArePruningPointsInValidChain
* Fix static check errors
* Fix genesis
* Renames and text fixing
* Use ExpectedHeaderPruningPoint in block builder
* Fix TestCheckPruningPointViolation
* Replace the old parents in the block header with BlockLevelParents.
* Begin fixing compilation errors.
* Implement database serialization for block level parents.
* Implement p2p serialization for block level parents.
* Implement rpc serialization for block level parents.
* Add DirectParents() to the block header interface.
* Use DirectParents() instead of Parents() in some places.
* Revert test_block_builder.go.
* Add block level parents to hash serialization.
* Use the zero hash for genesis finality points.
* Fix failing tests.
* Fix a variable name.
* Update headerEstimatedSerializedSize.
* Add comments in blocklevelparents.go.
* Fix the rpc-stability stability test.
* Change the field number for `parents` fields in p2p.proto and rpc.proto.
* Remove MsgBlockHeader::NumParentBlocks.
* Add DAAScore, BlueWork, and FinalityPoint to externalapi.BlockHeader.
* Add DAAScore, BlueWork, and FinalityPoint to NewImmutableBlockHeader and fix compilation errors.
* Add DAAScore, BlueWork, and FinalityPoint to protowire header types and fix failing tests.
* Check for header DAA score in validateDifficulty.
* Add DAA score to buildBlock.
* Fix failing tests.
* Add a blue work check in validateDifficultyDAAAndBlueWork.
* Add blue work to buildBlock and fix failing tests.
* Add finality point validation to ValidateHeaderInContext.
* Fix genesis blocks' finality points.
* Add finalityPoint to blockBuilder.
* Fix tests that failed due to missing reachability data.
* Make blockBuilder use VirtualFinalityPoint instead of directly calling FinalityPoint with the virtual hash.
* Don't validate the finality point for blocks with trusted data.
* Add debug logs.
* Skip finality point validation for block whose finality points are the virtual genesis.
* Revert "Add debug logs."
This reverts commit 3c18f519ccbb382f86f63904dbb1c4cd6bc68b00.
* Move checkDAAScore and checkBlueWork to validateBlockHeaderInContext.
* Add checkCoinbaseBlueScore to validateBodyInContext.
* Fix failing tests.
* Add DAAScore, blueWork, and finalityPoint to blocks' hashes.
* Generate new genesis blocks.
* Fix failing tests.
* In BuildUTXOInvalidBlock, get the bits from StageDAADataAndReturnRequiredDifficulty instead of calling RequiredDifficulty separately.
* Use BLAKE2B instead of HASH160, and get rid of any usage of RIPEMD160
* Change genesis coinbase payload script to OP_FALSE
* Fix tests after conflict
* Remove duplicate tests
* Change file name
* Change atomic swap to use proper hash size
* commit for do fetch&merge
* Adds a new test to validate POW, and Fix Main-net and Testnet genesis block data.
* Fix window's test for testnet and change the expected pruning point for mainnet and testnet.
* Delete function "solveBlock" on proof_of_work_test.go and call the function mining.SolvaBlock instead. Also, remove using of random in "solveBlockWithWrongPOW" function.
* Replace 0xFFFFFFFFFFFFFFFF to math.MaxUint64 in "solveBlockWithWrongPOW" function and change the function's comment of "TestPOW"
* Replace 0xFFFFFFFFFFFFFFFF to math.MaxUint64 in "solveBlockWithWrongPOW" function and change the function's comment of "TestPOW"
* Change from <= to < in the for statement in "solveBlockWithWrongPOW" function
* Adds one arg to the function call "NewTestConsensus" (the function sig has changed).
Co-authored-by: tal <tal@daglabs.com>
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* ''
* ''
* ''
* Changes genesis block version to 0.
* a
* a
* All tests are done.
* All tests passed for changed block version from int32 to uint16
* Adds validation of rejecting blocks with unknown versions.
* Changes txn version from int32 to uint16.
* .
* Adds comments to exported functions.
* Change functions name from ConvertFromRpcScriptPubKeyToRPCScriptPubKey to ConvertFromAppMsgRPCScriptPubKeyToRPCScriptPubKey and from ConvertFromRPCScriptPubKeyToRpcScriptPubKey to ConvertFromRPCScriptPubKeyToAppMsgRPCScriptPubKey
* change comment to "ScriptPublicKey represents a Kaspad ScriptPublicKey"
* delete part (tx.Version < 0) that cannot be exist on the if statement.
* Revert protobuf version.
* Fix a comment.
* Fix a comment.
* Rename a variable.
* Rename a variable.
* Remove a const.
* Rename a type.
* Rename a field.
* Rename a field.
* Remove commented-out code.
* Remove dangerous nil case in DomainTransactionOutput.Clone().
* Remove a constant.
* Fix a string.
* Fix wrong totalScriptPubKeySize in transactionMassStandalonePart.
* Remove a constant.
* Remove an unused error.
* Fix a serialization error.
* Specify version types to be uint16 explicitly.
* Use constants.ScriptPublicKeyVersion.
* Fix a bad test.
* Remove some whitespace.
* Add a case to utxoEntry.Equal().
* Rename scriptPubKey to scriptPublicKey.
* Remove a TODO.
* Rename constants.
* Rename a variable.
* Add version to parseShortForm.
Co-authored-by: tal <tal@daglabs.com>
Co-authored-by: stasatdaglabs <stas@daglabs.com>
* Increase size of reachability cache
* Change DomainHash to struct with unexported hashArray
* Fixing compilation errors stemming from new DomainHash structure
* Remove obsolete Read/WriteElement methods in appmessage
* Fix all tests
* Fix all tests
* Add comments
* A few renamings
* go mod tidy
* Replace default hasher (Double-SHA256) with domain seperated blake2b
* Replace all hashes with domain seperated blake2b
* Update the genesis blocks
* Replace OP_HASH256 with OP_BLAKE2B
* Fix the merkle tree by appending zeros instead of duplicating the hash when there is 1 branch left
* Update tests
* Add a payloadHash function
* Update gitignore to ignore binaries
* Fix a bug in the blake2b opcode
* Expose CheckProofOfWork from model/pow
* Update blockvalidator to call the new CheckProofOfWork
* Update genesis blocks
* Update tools to use the new CheckProofOfWork
* Update tests with new PoW
* Revert "[NOD-1500] Delete integration tests"
This reverts commit fcb57a206690a884fa6afb69d5d493282954a8bf.
* [NOD-1518] hashserialization -> consenusserialization
* [NOD-1518] Fix add genesis to virtual
* [NOD-1518] Fix a bug in SerializeCoinbasePayload.
* [NOD-1518] Fix a loop error and make pastMedianTime behave correctly everywhere on genesis.
* [NOD-1518] Fix another bug and an infinite loop.
* [NOD-1518] Fix uninitialized slice.
* [NOD-1518] Fix bad should-commit checks and another infinite loop.
* [NOD-1518] Fix nil serialization.
* [NOD-1518] Rename blockHash to currentBlockHash.
* [NOD-1518] Move the check whether stagedVirtualUTXOSet != nil to the top of commitVirtualUTXODiff.
* [NOD-1518] Simplify utxoDiffStore.Commit.
* [NOD-1518] Unextract resolveBlockStatusAndCheckFinality.
* [NOD-1518] Move no-transactions logic into CalculateIDMerkleRoot.
* [NOD-1518] Remove redundant is-staged check.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Don't write anything if utxoDiffChild is nil.
* [NOD-1518] Stage virtualAcceptanceData and virtualMultiset.
* [NOD-1518] Fix bugs in getBlockTemplate and submitBlock.
* [NOD-1518] Fix bad validation order in validateHeaderInContext.
* [NOD-1518] Fix bug in Next().
* [NOD-1518] Fix nil dereference of subnetworks in AddressCache.
* [NOD-1518] Fix multisetStore.Get returning a pointer to a multiset that is changed in place.
* [NOD-1518] Break on genesis in countSubtrees.
* [NOD-1518] Fix createBlockLocator.
* [NOD-1518] Fix MsgTxToDomainTransaction.
* [NOD-1518] Set MaxTxVersion to 1.
* [NOD-1518] Fix missing error handling, bug in MsgTxToDomainTransaction, and bad subnetwork equality check.
* [NOD-1518] Fix bug in hasUTXOByOutpointFromStagedVirtualUTXODiff.
* [NOD-1518] Remove irrelevant comments.
* [NOD-1518] Generate transactions with sufficient fee in tx_relay_test.
* [NOD-1518] Fix broken RPC handlers.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Fix bad exists check in restorePastUTXO and missing genesis check in CalculatePastUTXOAndAcceptanceData.
* [NOD-1518] Add a comment.
* [NOD-1518] Use a regular mutex instead of a read-write mutex in consensus to avoid dealing with sneaky not-actually-read functions.
* [NOD-1518] Fix a deadlock in GetVirtualSelectedParent.
* [NOD-1518] Fix missing handler registration for CmdHeader.
* [NOD-1518] Fix processHeader calling OnNewBlock and LogBlock. Also fix conversion errors in IBDRootUTXOSetAndBlock.
* [NOD-1518] Fix bad Command() in MsgIBDRootUTXOSetAndBlock.
* [NOD-1518] Fix bad SyncStateMissingUTXOSet logic in resolveSyncState.
* [NOD-1518] Rename mode to syncState.
* [NOD-1518] Fix headers-only blocks coming in after the consensus thinks it's synced.
* [NOD-1518] Fix selectedChildIterator.Next not ignoring virtual, infinite loop in HashSet.Length().
* [NOD-1518] Fix not-properly wrapped IBD blocks.
* [NOD-1518] Fix bad conversion in RequestIBDBlocks.
* [NOD-1518] Fix bad string for CmdRequestHeaders.
* [NOD-1518] Fix bad string for CmdDoneHeaders.
* [NOD-1518] Fix bad Command() for MsgIBDRootNotFound.
* [NOD-1518] Fix bad areHeaderTipsSyncedMaxTimeDifference value.
* [NOD-1518] Add missing string for CmdRequestIBDBlocks.
* [NOD-1518] Fix bad check for SyncStateMissingBlockBodies.
* [NOD-1518] Fix bad timeout durations in tests.
* [NOD-1518] Fix IBD blocks not calling OnNewBlock.
* [NOD-1518] Change when IBD finishes.
* [NOD-1518] Properly clone utxoDiffChild.
* [NOD-1535] Fix reachability tests
* [NOD-1518] Fix merge errors.
* [NOD-1518] Move call to LogBlock to into OnNewBlock.
* [NOD-1518] Return "not implemented" in unimplemented RPC handlers.
* [NOD-1518] Extract cloning of hashes to a method over DomainHash.
* [NOD-1518] Use isHeaderOnlyBlock.
* [NOD-1518] Use constants.TransactionVersion.
* [NOD-1518] Break immediately if we reached the virtual in SelectedChildIterator.
* [NOD-1518] Don't stage nil utxoDiffChild.
* [NOD-1518] Properly check the genesis hash in CalculatePastUTXOAndAcceptanceData.
* [NOD-1518] Explain why we break on current == nil in countSubtrees.
* [NOD-1518] Add a comment explaining why we check against StatusValid in resolveSyncState.
* [NOD-1535] Add external reachability tests
* [NOD-1535] Fix reachability tests and fix related bugs
* [NOD-1535] Add setters fox reindex slack and window
* [NOD-1535] Remove redundant line
* [NOD-1535] Add comment
* [NOD-1535] Fix comments
* [NOD-1535] Rename DBReader->DatabaseContext
* [NOD-1535] Check that reindex root is changed
* [NOD-1535] Fix calculateNewTips
Co-authored-by: Mike Zak <feanorr@gmail.com>
Co-authored-by: stasatdaglabs <stas@daglabs.com>
* Revert "[NOD-1500] Delete integration tests"
This reverts commit fcb57a206690a884fa6afb69d5d493282954a8bf.
* [NOD-1518] hashserialization -> consenusserialization
* [NOD-1518] Fix add genesis to virtual
* [NOD-1518] Fix a bug in SerializeCoinbasePayload.
* [NOD-1518] Fix a loop error and make pastMedianTime behave correctly everywhere on genesis.
* [NOD-1518] Fix another bug and an infinite loop.
* [NOD-1518] Fix uninitialized slice.
* [NOD-1518] Fix bad should-commit checks and another infinite loop.
* [NOD-1518] Fix nil serialization.
* [NOD-1518] Rename blockHash to currentBlockHash.
* [NOD-1518] Move the check whether stagedVirtualUTXOSet != nil to the top of commitVirtualUTXODiff.
* [NOD-1518] Simplify utxoDiffStore.Commit.
* [NOD-1518] Unextract resolveBlockStatusAndCheckFinality.
* [NOD-1518] Move no-transactions logic into CalculateIDMerkleRoot.
* [NOD-1518] Remove redundant is-staged check.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Don't write anything if utxoDiffChild is nil.
* [NOD-1518] Stage virtualAcceptanceData and virtualMultiset.
* [NOD-1518] Fix bugs in getBlockTemplate and submitBlock.
* [NOD-1518] Fix bad validation order in validateHeaderInContext.
* [NOD-1518] Fix bug in Next().
* [NOD-1518] Fix nil dereference of subnetworks in AddressCache.
* [NOD-1518] Fix multisetStore.Get returning a pointer to a multiset that is changed in place.
* [NOD-1518] Break on genesis in countSubtrees.
* [NOD-1518] Fix createBlockLocator.
* [NOD-1518] Fix MsgTxToDomainTransaction.
* [NOD-1518] Set MaxTxVersion to 1.
* [NOD-1518] Fix missing error handling, bug in MsgTxToDomainTransaction, and bad subnetwork equality check.
* [NOD-1518] Fix bug in hasUTXOByOutpointFromStagedVirtualUTXODiff.
* [NOD-1518] Remove irrelevant comments.
* [NOD-1518] Generate transactions with sufficient fee in tx_relay_test.
* [NOD-1518] Fix broken RPC handlers.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Fix bad exists check in restorePastUTXO and missing genesis check in CalculatePastUTXOAndAcceptanceData.
* [NOD-1518] Add a comment.
* [NOD-1518] Use a regular mutex instead of a read-write mutex in consensus to avoid dealing with sneaky not-actually-read functions.
* [NOD-1518] Fix a deadlock in GetVirtualSelectedParent.
* [NOD-1518] Fix missing handler registration for CmdHeader.
* [NOD-1518] Fix processHeader calling OnNewBlock and LogBlock. Also fix conversion errors in IBDRootUTXOSetAndBlock.
* [NOD-1518] Fix bad Command() in MsgIBDRootUTXOSetAndBlock.
* [NOD-1518] Fix bad SyncStateMissingUTXOSet logic in resolveSyncState.
* [NOD-1518] Rename mode to syncState.
* [NOD-1518] Fix headers-only blocks coming in after the consensus thinks it's synced.
* [NOD-1518] Fix selectedChildIterator.Next not ignoring virtual, infinite loop in HashSet.Length().
* [NOD-1518] Fix not-properly wrapped IBD blocks.
* [NOD-1532] Add TestMultiset
* [NOD-1518] Fix bad conversion in RequestIBDBlocks.
* [NOD-1518] Fix bad string for CmdRequestHeaders.
* [NOD-1518] Fix bad string for CmdDoneHeaders.
* [NOD-1518] Fix bad Command() for MsgIBDRootNotFound.
* [NOD-1532] Add TestPastUTXOMultiset
* [NOD-1518] Fix bad areHeaderTipsSyncedMaxTimeDifference value.
* [NOD-1532] Added TestDoubleSpends
* [NOD-1518] Add missing string for CmdRequestIBDBlocks.
* [NOD-1518] Fix bad check for SyncStateMissingBlockBodies.
* [NOD-1518] Fix bad timeout durations in tests.
* [NOD-1518] Fix IBD blocks not calling OnNewBlock.
* [NOD-1518] Change when IBD finishes.
* [NOD-1518] Properly clone utxoDiffChild.
* [NOD-1532] Update hashes of blocks
* [NOD-1532] Fix genesis blocks and a few more bugs
* [NOD-1532] Bugfix: incorrect key passed to dbTx.Put
* [NOD-1532] Make sure there's no nil payloads
* [NOD-1532] Fix AddBlockToVirtual
* [NOD-1532] Update tips and virtualDiffParents properly
* [NOD-1532] Allow nil payload
* [NOD-1532] Check for actual error and not just some RuleError
* [NOD-1532] Get rid of SimpleCoinbaseData and make OpTrueScript P2SH
* [NOD-1532] If coinbaseData is nil - fill in with generic coinbaseData
Co-authored-by: Ori Newman <orinewman1@gmail.com>
Co-authored-by: stasatdaglabs <stas@daglabs.com>
* Revert "[NOD-1500] Delete integration tests"
This reverts commit fcb57a206690a884fa6afb69d5d493282954a8bf.
* [NOD-1518] hashserialization -> consenusserialization
* [NOD-1518] Fix add genesis to virtual
* [NOD-1518] Fix a bug in SerializeCoinbasePayload.
* [NOD-1518] Fix a loop error and make pastMedianTime behave correctly everywhere on genesis.
* [NOD-1518] Fix another bug and an infinite loop.
* [NOD-1518] Fix uninitialized slice.
* [NOD-1518] Fix bad should-commit checks and another infinite loop.
* [NOD-1518] Fix nil serialization.
* [NOD-1518] Rename blockHash to currentBlockHash.
* [NOD-1518] Move the check whether stagedVirtualUTXOSet != nil to the top of commitVirtualUTXODiff.
* [NOD-1518] Simplify utxoDiffStore.Commit.
* [NOD-1518] Unextract resolveBlockStatusAndCheckFinality.
* [NOD-1518] Move no-transactions logic into CalculateIDMerkleRoot.
* [NOD-1518] Remove redundant is-staged check.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Don't write anything if utxoDiffChild is nil.
* [NOD-1518] Stage virtualAcceptanceData and virtualMultiset.
* [NOD-1518] Fix bugs in getBlockTemplate and submitBlock.
* [NOD-1518] Fix bad validation order in validateHeaderInContext.
* [NOD-1518] Fix bug in Next().
* [NOD-1518] Fix nil dereference of subnetworks in AddressCache.
* [NOD-1518] Fix multisetStore.Get returning a pointer to a multiset that is changed in place.
* [NOD-1518] Break on genesis in countSubtrees.
* [NOD-1518] Fix createBlockLocator.
* [NOD-1518] Fix MsgTxToDomainTransaction.
* [NOD-1518] Set MaxTxVersion to 1.
* [NOD-1518] Fix missing error handling, bug in MsgTxToDomainTransaction, and bad subnetwork equality check.
* [NOD-1518] Fix bug in hasUTXOByOutpointFromStagedVirtualUTXODiff.
* [NOD-1518] Remove irrelevant comments.
* [NOD-1518] Generate transactions with sufficient fee in tx_relay_test.
* [NOD-1518] Fix broken RPC handlers.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Fix bad exists check in restorePastUTXO and missing genesis check in CalculatePastUTXOAndAcceptanceData.
* [NOD-1518] Add a comment.
* [NOD-1518] Use a regular mutex instead of a read-write mutex in consensus to avoid dealing with sneaky not-actually-read functions.
* [NOD-1518] Fix a deadlock in GetVirtualSelectedParent.
* [NOD-1518] Fix missing handler registration for CmdHeader.
* [NOD-1518] Fix processHeader calling OnNewBlock and LogBlock. Also fix conversion errors in IBDRootUTXOSetAndBlock.
* [NOD-1518] Fix bad Command() in MsgIBDRootUTXOSetAndBlock.
* [NOD-1518] Fix bad SyncStateMissingUTXOSet logic in resolveSyncState.
* [NOD-1518] Rename mode to syncState.
* [NOD-1518] Fix headers-only blocks coming in after the consensus thinks it's synced.
* [NOD-1518] Fix selectedChildIterator.Next not ignoring virtual, infinite loop in HashSet.Length().
* [NOD-1518] Fix not-properly wrapped IBD blocks.
* [NOD-1518] Fix bad conversion in RequestIBDBlocks.
* [NOD-1518] Fix bad string for CmdRequestHeaders.
* [NOD-1518] Fix bad string for CmdDoneHeaders.
* [NOD-1518] Fix bad Command() for MsgIBDRootNotFound.
* [NOD-1518] Fix bad areHeaderTipsSyncedMaxTimeDifference value.
* [NOD-1518] Add missing string for CmdRequestIBDBlocks.
* [NOD-1518] Fix bad check for SyncStateMissingBlockBodies.
* [NOD-1518] Fix bad timeout durations in tests.
* [NOD-1518] Fix IBD blocks not calling OnNewBlock.
* [NOD-1518] Change when IBD finishes.
* [NOD-1518] Properly clone utxoDiffChild.
* [NOD-1518] Fix merge errors.
* [NOD-1518] Move call to LogBlock to into OnNewBlock.
* [NOD-1518] Return "not implemented" in unimplemented RPC handlers.
* [NOD-1518] Extract cloning of hashes to a method over DomainHash.
* [NOD-1518] Use isHeaderOnlyBlock.
* [NOD-1518] Use constants.TransactionVersion.
* [NOD-1518] Break immediately if we reached the virtual in SelectedChildIterator.
* [NOD-1518] Don't stage nil utxoDiffChild.
* [NOD-1518] Properly check the genesis hash in CalculatePastUTXOAndAcceptanceData.
* [NOD-1518] Explain why we break on current == nil in countSubtrees.
* [NOD-1518] Add a comment explaining why we check against StatusValid in resolveSyncState.
Co-authored-by: Mike Zak <feanorr@gmail.com>
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* [NOD-1500] Added Domain type and Constructor
* [NOD-1500] Replaced dag+txpool with domain in flowContext
* [NOD-1500] Replaced dag+txpool with domain in flowContext
* [NOD-1500] Converters: domain objects from/to appmessage
* [NOD-1500] Convert hashes to DomainHashes in appmessages
* [NOD-1500] Remove references to daghash in dagconfig
* [NOD-1500] Fixed all appmessage usages of hashes
* [NOD-1500] Update all RPC to use domain
* [NOD-1500] Big chunk of protocol flows re-wired to domain
* [NOD-1500] Finished re-wiring all protocol flows to new Domain
* [NOD-1500] Fix some mempool and kaspaminer compilation errors
* [NOD-1500] Deleted util/{block,tx,daghash} and dbaccess
* [NOD-1500] util.CoinbaseTransactionIndex -> transactionhelper.CoinbaseTransactionIndex
* [NOD-1500] Fix txsigner
* [NOD-1500] Removed all references to util/subnetworkid
* [NOD-1500] Update RpcGetBlock related messages
* [NOD-1500] Many more compilation fixes
* [NOD-1500] Return full list of missing blocks for orphan resolution
* [NOD-1500] Fixed handshake
* [NOD-1500] Fixed flowcontext compilation
* [NOD-1500] Update users of StartIBDIfRequired to handle error
* [NOD-1500] Removed some more fields from RPC
* [NOD-1500] Fix the getBlockTemplate flow
* [NOD-1500] Fix HandleGetCurrentNetwork
* [NOD-1500] Remove redundant code
* [NOD-1500] Remove obsolete notifications
* [NOD-1500] Split MiningManager and Consensus to separate fields in Domain
* [NOD-1500] Update two wrong references to location of txscript
* [NOD-1500] Added comments
* [NOD-1500] Fix some tests
* [NOD-1500] Removed serialization logic from appmessage
* [NOD-1500] Rename database/serialization/messages.proto to dbobjects.proto
* [NOD-1500] Delete integration tests
* [NOD-1500] Remove txsort
* [NOD-1500] Fix tiny bug
* [NOD-1500] Remove rogue dependancy on bchd
* [NOD-1500] Some stylistic fixes
* [NOD-557] Remove regTest network.
* [NOD-557] Remove remaining references to regTest.
* [NOD-557] Move newHashFromStr from params.go to params_test.go.
* [NOD-557] Rename test to network in register_test.go.
* [NOD-557] Replaced removed tests in TestDecodeAddressErrorConditions.
* [NOD-1223] Delete unused files/packages.
* [NOD-1223] Move signal and limits to the os package.
* [NOD-1223] Put database and dbaccess into the db package.
* [NOD-1223] Fold the logs package into the logger package.
* [NOD-1223] Rename domainmessage to appmessage.
* [NOD-1223] Rename to/from DomainMessage to AppMessage.
* [NOD-1223] Move appmessage to the app packge.
* [NOD-1223] Move protocol to the app packge.
* [NOD-1223] Move the network package to the infrastructure packge.
* [NOD-1223] Rename cmd to executables.
* [NOD-1223] Fix go.doc in the logger package.
* [NOD-1223] Move all network stuff into a new network package.
* [NOD-1223] Delete the unused package testutil.
* [NOD-1223] Move infrastructure stuff into a new instrastructure package.
* [NOD-1223] Move domain stuff into a new domain package.