* Add "sweep" command to kaspawallet
* minor linting & layout improvements.
* contain code in "sweep"
* update to sweep.go
* formatting and bugs
* clean up renaming of ExtractTransaction functions
* Nicer formating of display
* address reveiw.
* one more sweeped -> swept
* missed one reveiw comment. (extra mass).
* remove redundant code from split function.
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.
* Pruning headers p2p basic structure
* Remove headers-first
* Fix consensus tests except TestValidateAndInsertPruningPointWithSideBlocks and TestValidateAndInsertImportedPruningPoint
* Add virtual genesis
* Implement PruningPointAndItsAnticoneWithMetaData
* Start fixing TestValidateAndInsertImportedPruningPoint
* Fix TestValidateAndInsertImportedPruningPoint
* Fix BlockWindow
* Update p2p and gRPC
* Fix all tests except TestHandleRelayInvs
* Delete TestHandleRelayInvs parts that cover the old IBD flow
* Fix lint errors
* Add p2p_request_ibd_blocks.go
* Clean code
* Make MsgBlockWithMetaData implement its own representation
* Remove redundant check if highest share block is below the pruning point
* Fix TestCheckLockTimeVerifyConditionedByAbsoluteTimeWithWrongLockTime
* Fix comments, errors ane names
* Fix window size to the real value
* Check reindex root after each block at TestUpdateReindexRoot
* Remove irrelevant check
* Renames and comments
* Remove redundant argument from sendGetBlockLocator
* Don't delete staging on non-recoverable errors
* Renames and comments
* Remove redundant code
* Commit changes inside ResolveVirtual
* Add comment to IsRecoverableError
* Remove blocksWithMetaDataGHOSTDAGDataStore
* Increase windows pagefile
* Move DeleteStagingConsensus outside of defer
* Get rid of mustAccepted in receiveBlockWithMetaData
* Ban on invalid pruning point
* Rename interface_datastructures_daawindowstore.go to interface_datastructures_blocks_with_meta_data_daa_window_store.go
* * Change GetVirtualSelectedParentChainFromBlockResponseMessage and VirtualSelectedParentChainChangedNotificationMessage to show only added block hashes
* Remove ResolveVirtual
* Use externalapi.ConsensusWrapper inside MiningManager
* Fix pruningmanager.blockwithmetadata
* Set pruning point selected child when importing the pruning point UTXO set
* Change virtual genesis hash
* replace the selected parent with virtual genesis on removePrunedBlocksFromGHOSTDAGData
* Get rid of low hash in block locators
* Remove +1 from everywhere we use difficultyAdjustmentWindowSize and increase the default value by one
* Add comments about consensus wrapper
* Don't use separate staging area when resolving resolveBlockStatus
* Fix netsync stability test
* Fix checkResolveVirtual
* Rename ConsensusWrapper->ConsensusReference
* Get rid of blockHeapNode
* Add comment to defaultDifficultyAdjustmentWindowSize
* Add SelectedChild to DAGTraversalManager
* Remove redundant copy
* Rename blockWindowHeap->calculateBlockWindowHeap
* Move isVirtualGenesisOnlyParent to utils
* Change BlockWithMetaData->BlockWithTrustedData
* Get rid of maxReasonLength
* Split IBD to 100 blocks each time
* Fix a bug in calculateBlockWindowHeap
* Switch to trusted data when encountering virtual genesis in blockWithTrustedData
* Move ConsensusReference to domain
* Update ConsensusReference comment
* Add comment
* Rename shouldNotAddGenesis->skipAddingGenesis
* Update constants
* Add to transaction SigOpCount
* Update mass calculation, and move it from InContext to InIsolation
* Update block validation accordingly
* Add SigOpCount validation during TransactionInContext
* Remove checking of mass vs maxMassAcceptedByBlock from consensusStateManager
* Update mining manager with latest changes
* Add SigOpCount to MsgTx.Copy()
* Fix initTestTransactionAcceptanceDataForClone
* Fix all tests in transaction_equal_clone_test.go
* Fix TestBlockMass
* Fix tests in transactionvalidator package
* Add SigOpCount to sighash
* Fix TestPruningDepth
* Fix problems in libkaspawalelt
* Fix integration tests
* Fix CalculateSignatureHash tests
* Remove remaining places talking about block size
* Add sanity check to checkBlockMass to make sure all transactions have their mass filled
* always add own sigOpCount to sigHash
* Update protowire/rpc.md
* Start working on removing any remaining reference to block/tx size
* Update rpc transaction verbose data to include mass rather then size
* Convert verboseData and block size check to mass
* Remove remaining usages of tx size in mempool
* Move transactionEstimatedSerializedSize to transactionvalidator
* Add PopulateMass to fakeRelayInvsContext
* Move PopulateMass to beggining of ValidateAndInsertTransaction + fix in it
* Assign mass a new number for backward-compatibility
* Replace blue score with DAA score in UTXO entries
* Use DAA score for coinbase maturity
* Use DAA score for sequence lock
* Fix calcBlockSubsidy to use DAA score
* Don't pay to blocks that are not included in the DAA added blocks, and bestow red blocks reward to the merging block
* Fix TestGetPruningPointUTXOs
* Fix TestTransactionAcceptance
* Fix TestChainedTransactions
* Fix TestVirtualDiff
* Fix TestBlockWindow
* Fix TestPruning
* Use NewFromSlice instead of manually creating the hash set
* Add assert
* Add comment
* Remove redundant call to UpdateDAADataAndReturnDifficultyBits
* Add RequiredDifficulty, rename UpdateDAADataAndReturnDifficultyBits to StageDAADataAndReturnRequiredDifficulty and add comments
* Make buildUTXOInvalidHeader get bits as an argument
* Fix comments
* Save DAA score and DAA added blocks for each block
* Add test
* Add pruning support
* Replace 8 with uint64Length
* Separate DAABlocksStore cache size to DAA score and daaAddedBlocks
* Add Close() function to all the iterators
* Add defer iterator.Close() whenever we open an iterator
* Add isClosed to all iterators and panic/return error if used after closing
Co-authored-by: Svarog <feanorr@gmail.com>
* resolveSingleBlockStatus: If the block being resolved is not going to be the next selectedTip - set it's diffParent to be the old selectedTip
* resolveSingleBlockStatus: If the block being resolved is going to be the next selectedTip - set it as old selectedTip's diffChild
* Remove any mentions of virtualDiffParents
* If block is genesis - don't do all the mumbo-jumbo with oldSelectedTip
* Check an unchecked error
* Write a better log message
* Replaced the content of MsgIBDRootUTXOSetChunk with pairs of outpoint-utxo entry pairs.
* Rename utxoIter to utxoIterator.
* Add a big stinky TODO on an assert.
* Replace pruningStore staging with a UTXO set iterator.
* Reimplement receiveAndInsertIBDRootUTXOSet.
* Extract OutpointAndUTXOEntryPairsToDomainOutpointAndUTXOEntryPairs into domainconverters.go.
* Pass the outpoint and utxy entry pairs to the pruning store.
* Implement InsertCandidatePruningPointUTXOs.
* Implement ClearCandidatePruningPointUTXOs.
* Implement UpdateCandidatePruningPointMultiset.
* Use the candidate pruning point multiset in updatePruningPoint.
* Implement CandidatePruningPointUTXOIterator.
* Use the pruning point utxo set iterator for StageVirtualUTXOSet.
* Defer ClearCandidatePruningPointUTXOs.
* Implement OverwriteVirtualUTXOSet.
* Implement CommitCandidatePruningPointUTXOSet.
* Implement BeginOverwritingVirtualUTXOSet and FinishOverwritingVirtualUTXOSet.
* Implement overwriteVirtualUTXOSetAndCommitPruningPointUTXOSet.
* Rename ClearCandidatePruningPointUTXOs to ClearCandidatePruningPointData.
* Add missing methods to dbManager.
* Implement PruningPointUTXOs.
* Implement RecoverUTXOIfRequired.
* Delete the utxoserialization package.
* Fix compilation errors in TestValidateAndInsertPruningPoint.
* Switch order of operations in the if statements in PruningPointUTXOs so that Next() wouldn't be unnecessarily called.
* Fix missing pruning point utxo set staging and bad slice length.
* Fix no default multiset in InsertCandidatePruningPointUTXOs.
* Make go vet happy.
* Rename candidateXXX to importedXXX.
* Do some more renaming.
* Rename some more.
* Fix bad MsgIBDRootNotFound logic.
* Fix an error message.
* Simplify receiveIBDRootBlock.
* Fix error message in receiveAndInsertIBDRootUTXOSet.
* Do some more renaming.
* Fix merge errors.
* Fix a bug caused by calling iterator.First() unnecessarily.
* Remove databaseContext from stores and don't use a transaction in ClearXXX functions.
* Simplify receiveAndInsertIBDRootUTXOSet.
* Fix offset count in PruningPointUTXOs().
* Fix readOnlyUTXOIteratorWithDiff.First().
* Split handleRequestIBDRootUTXOSetAndBlockFlow into smaller methods.
* Rename IbdRootNotFound to UnexpectedPruningPoint.
* Rename requestIBDRootHash to requestPruningPointHash.
* Rename IBDRootHash to PruningPointHash.
* Rename RequestIBDRootUTXOSetAndBlock to RequestPruningPointUTXOSetAndBlock.
* Rename IBDRootUTXOSetChunk to PruningPointUTXOSetChunk.
* Rename RequestNextIBDRootUTXOSetChunk to RequestNextPruningPointUTXOSetChunk.
* Rename DoneIBDRootUTXOSetChunks to DonePruningPointUTXOSetChunks.
* Rename remaining references to IBD root.
* Fix an error message.
* Add a check for HadStartedImportingPruningPointUTXOSet in commitVirtualUTXODiff.
* Add a check for HadStartedImportingPruningPointUTXOSet in ImportPruningPointUTXOSetIntoVirtualUTXOSet.
* Move FinishImportingPruningPointUTXOSet closer to HadStartedImportingPruningPointUTXOSet.
* Remove reference to pruningStore in utxoSetIterator.
* Pointerify utxoSetIterator receivers.
* Fix bad insert in CommitImportedPruningPointUTXOSet.
* Rename commitImportedPruningPointUTXOSetAll to applyImportedPruningPointUTXOSet.
* Simplify PruningPointUTXOs.
* Add populateTransactionWithUTXOEntriesFromUTXOSet.
* Fix a TODO comment.
* Rename InsertImportedPruningPointUTXOs to AppendImportedPruningPointUTXOs.
* Extract handleRequestPruningPointUTXOSetAndBlockMessage to a separate method.
* Rename stuff in readOnlyUTXOIteratorWithDiff.First().
* Address toAddIterator in readOnlyUTXOIteratorWithDiff.First().
* Call First() before any full iteration on ReadOnlyUTXOSetIterator.
* Call First() before any full iteration on a database Cursor.
* Put StartImportingPruningPointUTXOSet inside the pruning point transaction.
* Make serializeOutpoint and serializeUTXOEntry free functions in pruningStore.
* Fix readOnlyUTXOIteratorWithDiff.First().
* Fix bad validations in importPruningPoint.
* Remove superfluous call to validateBlockTransactionsAgainstPastUTXO.
* Add selected chain store and optimize block locator with it
* Fix build error
* Fix comments
* Fix IsStaged
* Rename CalculateSelectedParentChainChanges to CalculateChainPath and SelectedParentChainChanges->SelectedChainPath
* Use binary.LittleEndian directly to allow compiler optimizations
* Remove boolean from HeadersSelectedChainStore interface
* Prevent endless loop in block locator
* ''
* ''
* ''
* 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>
* Convert BlockGHOSTDAGData from an interface to a public struct with getters
* Move hashes.Less to externalapi so it can access the hashes directly without copying
* Reduce calls to ghostdagstore.Get in blueWindow
* Simplify the logic in RequiredDifficulty and reuse big.Int
* Remove bigintpool as its no longer used
* Use ChooseSelectedParent in RequiredDifficulty instead of looping over the parents
* Remove comment
* Add a field to TransactionAcceptanceData: TransactionInputUTXOEntries.
* Fix failing tests.
* Add transactionInputUtxoEntries to the database.
* Populate transactionInputUTXOEntries in applyMergeSetBlocks and use them in the UTXO index.
* Remove UTXOEntry.Clone().
* Add an additional equality test.
* Rename reachabilityManager.data to dataForInsertion, and use it only during insertions
* Make reachabilityData an interface
* Fix db serialization of reachability data
* Fix reachabilityDataStore
* Fix all tests
* Cleanup debugging code
* Fix insertToFutureCoveringSet
* Add comments
* Rename to ReachabilityData and MutableReachabilityData
* 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 blueScore with blueWork in ghostDAG SelectedParent selection
* Add blueWork to protopuf ghostdag data
* Auto generate protobuf go code
* Serialize/Deserialize blueWork when converting to protobuf
* pass block header store to ghostdagmanager
* Convert tal's ghostdag2 implementation to blueWork
* Change finality test to check the blueWork instead of blueScore
* Update ghostdag_test to pass blockHeaderStore to ghostdag, and test all networks genesis headers
* Add sanity blueWork check to ghostdag_test
* 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>
* [NOD-1528] Make data stores copy data on stage
* [NOD-1528] Add proto objects to serialize consensus state objects
* [NOD-1528] Fix receiver names
* [NOD-1528] Add copy to block store and utxo diff staging
* [NOD-1528] Return errors where needed
* [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-1496] Implement headers only verification
* [NOD-1496] Add checkParentsExist
* [NOD-1496] Stage block statuses in block processor
* [NOD-1496] Rename AddBlock->AddHeaderTip
* [NOD-1496] Return early from validateAndInsertBlock on header only and put ValidateProofOfWorkAndDifficulty inside validateBlock
* [NOD-1461] Change the external api interface to not having anything besides DomainTransactions and DomainBlocks.
* [NOD-1462] Move external api types to a separate package.
* [NOD-1462] Clarify which model we're using in miningmanager.
* [NOD-1462] Extract coinbase data to its own struct.
* [NOD-1462] Add a comment above CoinbaseData.
* [NOD-1462] Fix the comment above CoinbaseData.
* [NOD-1457] Pass DomainDBContext to all constructors, instead of passing a general dbContext
* [NOD-1457] Add NewTx to DomainDBContext
* [NOD-1457] Added comment