* 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
* Added model and stubs for all main methods
* Add constructors to all main objects
* Implement BlockCandidateTransactions
* implement expireOldTransactions and expireOrphanTransactions
* Rename isHighPriority to neverExpires
* Add stub for checkDoubleSpends
* Revert "Rename isHighPriority to neverExpires"
This reverts commit b2da9a4a00c02fb380d2518cf54fa16257bd8423.
* Imeplement transactionsOrderedByFeeRate
* Orphan maps should be idToOrphan
* Add error.go to mempool
* Invert the condition for banning when mempool rejects a transaction
* Move all model objects to model package
* Implement getParentsInPool
* Implemented mempoolUTXOSet.addTransaction
* Implement removeTransaction, remove sanity checks
* Implemented mempoolUTXOSet.checkDoubleSpends
* Implemented removeOrphan
* Implement removeOrphan
* Implement maybeAddOrphan and AddOrphan
* Implemented processOrphansAfterAcceptedTransaction
* Implement transactionsPool.addTransaction
* Implement RemoveTransaction
* If a transaction was removed from the mempool - update it's redeemers in orphan pool as well
* Use maximumOrphanTransactionCount
* Add allowOrphans to ValidateAndInsertTransaction stub
* Implement validateTransaction functions
* Implement fillInputs
* Implement ValidateAndInsertTransaction
* Implement HandleNewBlockTransactions
* Implement missing mempool interface methods
* Add comments to exported functions
* Call ValidateTransactionInIsolation where needed
* Implement RevalidateHighPriorityTransactions
* Rewire kaspad to use new mempool, and fix compilation errors
* Update rebroadcast logic to use new structure
* Handle non-standard transaction errors properly
* Add mutex to mempool
* bugfix: GetTransaction panics when ok is false
* properly calculate targetBlocksPerSecond in config.go
* Fix various lint errors and tests
* Fix expected text in test for duplicate transactions
* Skip the coinbase transaction in HandleNewBlockTransactions
* Unorphan the correct transactions
* Call ValidateTransactionAndPopulateWithConsensusData on unorphanTransaction
* Re-apply policy_test as check_transactions_standard_test
* removeTransaction: Remove redeemers in orphan pool as well
* Remove redundant check for uint64 < 0
* Export and rename isDust -> IsTransactionOutputDust to allow usage by rothschild
* Add allowOrphan to SubmitTransaction RPC request
* Remove all implementation from mempool.go
* tidy go mod
* Don't pass acceptedOrphans to handleNewBlockTransactions
* Use t.Errorf in stead of t.Fatalf
* Remove minimum relay fee from TestDust, as it's no longer configurable
* Add separate VirtualDAASCore method for faster retrieval where it's repeated multiple times
* Broadcast all transactions that were accepted
* Don't re-use GetVirtualDAAScore in GetVirtualInfo - this causes a deadlock
* Use real transaction count, and not Orphan
* Get mempool config from outside, incorporating values received from cli
* Use MinRelayFee and MaxOrphanTxs from global kaspad config
* Add explanation for the seemingly redundant check for transaction version in checkTransactionStandard
* Update some comment
* Convert creation of acceptedTransactions to a single line
* Move mempoolUTXOSet out of checkDoubleSpends
* Add test for attempt to insert double spend into mempool
* fillInputs: Skip check for coinbase - it's always false in mempool
* Clarify comment about removeRedeemers when removing random orphan
* Don't remove high-priority transactions in limitTransactionCount
* Use mempool.removeTransaction in limitTransactionCount
* Add mutex comment to handleNewBlockTransactions
* Return error from limitTransactionCount
* Pluralize the map types
* mempoolUTXOSet.removeTransaction: Don't restore utxo if it was not created in mempool
* Don't evacuate from orphanPool high-priority transactions
* Disallow double-spends in orphan pool
* Don't use exported (and locking) methods from inside mempool
* Check for double spends in mempool during revalidateTransaction
* Add checkOrphanDuplicate
* Add orphan to acceptedOrphans, not current
* Add TestHighPriorityTransactions
* Fix off-by-one error in limitTransactionCount
* Add TestRevalidateHighPriorityTransactions
* Remove checkDoubleSpends from revalidateTransaction
* Fix TestRevalidateHighPriorityTransactions
* Move check for MaximumOrphanCount to beggining of maybeAddOrphan
* Rename all map type to singulateToSingularMap
* limitOrphanPool only after the orphan was added
* TestDoubleSpendInMempool: use createChildTxWhenParentTxWasAddedByConsensus instead of createTransactionWithUTXOEntry
* Fix some comments
* Have separate min/max transaction versions for mempool
* Add comment on defaultMaximumOrphanTransactionCount to keep it small as long as we have recursion
* Fix comment
* Rename: createChildTxWhenParentTxWasAddedByConsensus -> createChildTxWhereParentTxWasAddedByConsensus
* Handle error from createChildTxWhereParentTxWasAddedByConsensus
* Rename createChildTxWhereParentTxWasAddedByConsensus -> createChildAndParentTxsAndAddParentToConsensus
* Convert all MaximumXXX constants to uint64
* Add comment
* remove mutex comments
* Add mass limit to mempool
* Pass only params instead of multiple configuration options
* Remove acceptNonStd from mempool constructor
* Remove acceptNonStd from mempool constructor
* Fix test compilation
* Make TransactionOutputEstimatedSerializedSize public
* Update the mempool interface
* Refactor the mempool to the new design
* refactor txselection and blocktemplatebuilder to the new design
* Update the mining manager
* Update the MiningManager factory
* mempool fix requested changed
* [NOD-1460] Move the miningmanager interfaces into its model package.
* [NOD-1460] Decouple miningmanager model from appmessage.
* [NOD-1460] Decouple miningmanager model from util.
* [NOD-1460] Make miningmanager implementation structs unexported.
* [NOD-1414] Add interfaces for Factory and State.
* [NOD-1414] Create interfaces for algorithms and data stores.
* [NOD-1414] Create empty implementations for algorithms and data stores.
* [NOD-1414] Add new functions for all the implementations.
* [NOD-1414] Begin filling in the interfaces.
* [NOD-1414] Fill in the interfaces for the data structures.
* [NOD-1414] Fill in the interfaces for the algorithms.
* [NOD-1414] Fix a bug in package names.
* [NOD-1414] Connect up the various interfaces.
* [NOD-1414] Add stubs to all the implementations.
* [NOD-1414] Create MiningManager and its Factory.
* [NOD-1414] Add interfaces for mempool and blockTemplateBuilder.
* [NOD-1414] Add implementation structs for miningManager.
* [NOD-1414] Add stub implementations for mempool and blockTemplateBuilder.
* [NOD-1414] Rename state to kaspadState.
* [NOD-1414] Restructure where interfaces sit.
* [NOD-1414] Restructure where interfaces sit in the algorithms package as well.
* [NOD-1414] Move remaining models out of models.go.
* [NOD-1414] Modified some interfaces.
* [NOD-1414] Make go vet happy.
* [NOD-1414] Move SerializedUTXOSet into PruningManager.
* [NOD-1414] Modify FindNextPruningPoint to return found and nextPruningPointUTXOSet.
* [NOD-1414] Add IsDAGAncestorOf.
* [NOD-1414] Add PruningPoint().
* [NOD-1414] Add Entry() to ReadOnlyUTXOSet.
* [NOD-1414] Add MergeSet() to BlockGHOSTDAGData.
* [NOD-1414] Write comments for all the exported types and functions in miningmanager.
* [NOD-1414] Add comments to the upper levels of KaspadState.
* [NOD-1414] Replace AddNode with ReachabilityChangeset.
* [NOD-1414] Add payAddress and extraData to GetBlockTemplate.
* [NOD-1414] Add scriptPublicKey and extraData to BuildBlock.
* [NOD-1414] Rename algorithms to processes.
* [NOD-1414] Rename kaspadState to consensus.
* [NOD-1414] Add ValidateAgainstPastUTXO and ValidateFinality.
* [NOD-1414] Add BlockGHOSTDAGData to ReachabilityChangeset.
* [NOD-1414] Fix the comment over Mempool.
* [NOD-1414] Fix the comment over ValidateTransaction.
* [NOD-1414] Fill up the data structures.
* [NOD-1414] Add comments to remaining uncommented items in miningmanager.
* [NOD-1414] Add comments to structs and constructors.
* [NOD-1414] Rename Set to Insert.
* [NOD-1414] Add comments to everything inside datastructures.
* [NOD-1414] Add comments to everything inside models.
* [NOD-1414] Add comments to the interfaces in processes.
* [NOD-1414] Add comments to everything in processes.
* [NOD-1414] Make go vet happy.
* [NOD-1414] Rename scriptPublicKey to coinbaseScriptPublicKey.
* [NOD-1414] Add handlers to the consensus.
* [NOD-1414] Add highHash to blockAtDepth.
* [NOD-1414] Add resolveFinalityConflict.
* [NOD-1414] Reorg BlockValidator.
* [NOD-1414] In ResolveFinalityConflicts, rename blockHash to newFinalityBlockHash.
* [NOD-1414] Fix a comment.
* [NOD-1414] Make reachability structs public.
* [NOD-1414] Make UTXO structs public.