* [NOD-975] Don't include block transactions inside its UTXO commitment (#711)
* [NOD-975] Don't include block transactions inside its UTXO commitment.
* Revert "[NOD-975] Don't include block transactions inside its UTXO commitment."
This reverts commit b1a2ae66
* [NOD-975] Implement a (currently failing) TestUTXOCommitment.
* [NOD-975] Remove the block's own transactions from calcMultiset.
* [NOD-975] Simplify calcMultiset.
* [NOD-975] Add a comment on top of selectedParentMultiset.
* [NOD-975] Use pastUTXO instead of selectedParentUTXO in calcMultiset.
* [NOD-975] Use selected parent's pastUTXO instead of this block's pastUTXO in calcMultiset.
* [NOD-975] Extract selectedParentPastUTXO to a separate function.
* [NOD-975] Remove selectedParentUTXO from pastUTXO's return values.
* [NOD-975] Add txs to TestUTXOCommitment.
* [NOD-975] Remove debug code.
* [NOD-975] In pastUTXOMultiSet, copy the multiset to avoid modifying the original.
* [NOD-975] Add a test: TestPastUTXOMultiSet.
* [NOD-975] Improve TestPastUTXOMultiSet.
* [NOD-976] Implement tests for UTXO commitments (#715)
* [NOD-975] Don't include block transactions inside its UTXO commitment.
* Revert "[NOD-975] Don't include block transactions inside its UTXO commitment."
This reverts commit b1a2ae66
* [NOD-975] Implement a (currently failing) TestUTXOCommitment.
* [NOD-975] Remove the block's own transactions from calcMultiset.
* [NOD-975] Simplify calcMultiset.
* [NOD-975] Add a comment on top of selectedParentMultiset.
* [NOD-975] Use pastUTXO instead of selectedParentUTXO in calcMultiset.
* [NOD-975] Use selected parent's pastUTXO instead of this block's pastUTXO in calcMultiset.
* [NOD-975] Extract selectedParentPastUTXO to a separate function.
* [NOD-975] Remove selectedParentUTXO from pastUTXO's return values.
* [NOD-975] Add txs to TestUTXOCommitment.
* [NOD-976] Generate new blockDB blocks for tests.
* [NOD-976] Fix TestBlueBlockWindow.
* [NOD-976] Fix TestIsKnownBlock.
* [NOD-976] Fix TestGHOSTDAG.
* [NOD-976] Fix TestUTXOCommitment.
* [NOD-976] Remove kaka.
* [NOD-990] Save utxo diffs of past UTXO (#724)
* [NOD-990] Save UTXO diffs of past UTXO
* [NOD-990] Check for block double spends with its past instead of building its UTXO
* [NOD-990] Call resetExtraNonceForTest in TestUTXOCommitment
* [NOD-990] Remove redundant functions diffFromTx and diffFromAcceptedTx
* [NOD-990] Rename i->j to avoid confusion
* [NOD-990] Break long lines
* [NOD-990] Rename ErrDoubleSpendsWithBlockTransaction -> ErrDoubleSpendInSameBlock
* [NOD-990] Make ErrDoubleSpendInSameBlock more detailed
* [NOD-990] Add testProcessBlockRuleError
* [NOD-990] Fix comment
* [NOD-990] Add test for duplicate transactions on the same block
* [NOD-990] Use pkg/errors on panic
* [NOD-990] Make cloneWithoutBase method
* [NOD-990] Break long lines
* [NOD-990] Fix comment
* [NOD-990] Fix wrong variable names
* [NOD-990] Fix comment
* [NOD-974] Generate new test blocks.
* [NOD-974] Fix TestIsKnownBlock and TestGHOSTDAG.
* [NOD-974] Fix TestUTXOCommitment.
* [NOD-974] Fix comments
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
Co-authored-by: stasatdaglabs <stas@daglabs.com>
Co-authored-by: Ori Newman <orinewman1@gmail.com>
* [NOD-700] Convert blockSet to map[*blockNode]struct{}.
* [NOD-700] Rename bluestNode to bluestBlock in bluest().
* [NOD-700] Make IsInSelectedParentChain not use the now-slower containsHash.
* [NOD-700] Rename block to node in blockset.go.
* [NOD-700] Remove containsHash and hashesEqual.
* [NOD-700] Add a comment to IsInSelectedParentChain about how it'll fail if the given blockHash is not within the block index.
* [NOD-652] Add selectedTip and getSelectedTip messages
* [NOD-652] Remove peerSyncState.isSelectedTipKnown
* [NOD-652] Do nothing on OnSelectedTip if the peer selected tip hasn't changed
* [NOD-652] Handle selected tip message with block handler
* [NOD-652] Add comments
* [NOD-652] go mod tidy
* [NOD-652] Fix TestVersion
* [NOD-652] Use dag.AdjustedTime instead of dag.timeSource.AdjustedTime
* [NOD-652] Create shouldQueryPeerSelectedTips and queueMsgGetSelectedTip functions
* [NOD-652] Change selectedTip to selectedTipHash where needed
* [NOD-652] add minDAGTimeDelay constant
* [NOD-652] add comments
* [NOD-652] Fix names and comments
* [NOD-652] Put msg.reply push in the right place
* [NOD-652] Fix comments and names
* [NOD-616] Remove unused methods from BlockDAG.
* [NOD-616] Remove Height from GetRawMempoolVerboseResult and TxDesc.
* [NOD-616] Replaced BlockDAG.ChainHeight with SelectedTipBlueScore.
* [NOD-616] Remove the unused BlockChainHeightByHash.
* [NOD-616] Remove the unused blockChainHeight from checkBlockHeaderContext.
* [NOD-616] Remove chainHeight from util.Block.
* [NOD-616] Remove TestChainHeight.
* [NOD-616] Update unknown rule activation warning to use blueScore.
* [NOD-616] Update thresholdState to use blueScore instead of chainHeight.
* [NOD-616] Update blockLocator to use blueScore instead of chainHeight.
* [NOD-616] Remove blockNode.chainHeight.
* [NOD-616] Fix comments and variable names.
* [NOD-616] Replace a weird for loop with a while loop.
* [NOD-616] Fix a comment.
* [NOD-616] Remove pre-allocation in blockLocator.
* [NOD-616] Coalesce checks that startHash and stopHash are not the same into the same condition.
* [NOD-616] Fix a comment.
* [NOD-616] Remove weird blueScore logic around childHashStrings.
* [NOD-616] Fix hash pointer comparison.
* [NOD-616] Fix a comment.
* [NOD-616] Add ban score to peers misusing GetBlockLocator.
* [NOD-616] Replace adding ban score with disconnecting.
* [NOD-616] Add blueScore to FilteredBlockAddedNtfn.
* [NOD-540] Implement reachability (#545)
* [NOD-540] Begin implementing reachability.
* [NOD-540] Finish implementing reachability.
* [NOD-540] Implement TestIsFutureBlock.
* [NOD-540] Implement TestInsertFutureBlock.
* [NOD-540] Add comments.
* [NOD-540] Add comment for interval in blockNode.
* [NOD-540] Updated comments over insertFutureBlock and isFutureBlock.
* [NOD-540] Implement interval splitting methods.
* [NOD-540] Begin implementing tree manipulation in blockNode.
* [NOD-540] Implement countSubtreesUp.
* [NOD-540] Add a comment explaining an impossible condition.
* [NOD-540] Implement applyIntervalDown.
* [NOD-540] Moved the reachability tree stuff into reachability.go.
* [NOD-540] Add some comments.
* [NOD-540] Add more comments, implement isInPast.
* [NOD-540] Fix comments.
* [NOD-540] Implement TestSplitFraction.
* [NOD-540] Implement TestSplitExact.
* [NOD-540] Implement TestSplit.
* [NOD-540] Add comments to structs.
* [NOD-540] Implement TestAddTreeChild.
* [NOD-540] Fix a comment.
* [NOD-540] Rename isInPast to isAncestorOf.
* [NOD-540] Rename futureBlocks to futureCoveringSet.
* [NOD-540] Rename isFutureBlock to isInFuture.
* [NOD-540] move reachabilityInterval to the top of reachability.go.
* [NOD-540] Change "s.t." to "such that" in a comment.
* [NOD-540] Fix indentation.
* [NOD-540] Fix a potential bug involving float inaccuracy.
* [NOD-540] Wrote a more descriptive error message.
* [NOD-540] Fix error messsage.
* [NOD-540] Fix the recursive countSubtreesUp.
* [NOD-540] Rename countSubtreesUp to countSubtrees and applyIntervalDown to propagateInterval.
* [NOD-540] Implement updating reachability for a valid new block.
* [NOD-540] Implement a disk storage for reachability data.
* [NOD-540] Fix not all tree nodes being written to the database.
* [NOD-540] Implement serialization for reachabilityData.
* [NOD-540] Implement some deserialization for reachabilityData.
* [NOD-540] Implement restoring the reachabilityStore on node restart.
* [NOD-540] Made interval and remainingInterval pointers.
* [NOD-540] Rename setTreeInterval to setInterval.
* [NOD-540] Rename reindexTreeIntervals to reindexIntervals and fixed the comment above it.
* [NOD-540] Expand the comment above reindexIntervals.
* [NOD-540] Fix comment above countSubtrees.
* [NOD-540] Fix comment above countSubtrees some more.
* [NOD-540] Fix comment above split.
* [NOD-540] Fix comment above isAncestorOf.
* [NOD-540] Fix comment above reachabilityTreeNode.
* [NOD-540] Fix weird condition in addTreeChild.
* [NOD-540] Rename addTreeChild to addChild.
* [NOD-540] Fix weird condition in splitFraction.
* [NOD-540] Reverse the lines in reachabilityTreeNode.String().
* [NOD-540] Renamed f to fraction and x to size.
* [NOD-540] Fix comment above bisect.
* [NOD-540] Implement rtn.isAncestorOf().
* [NOD-540] Use treeNode isAncestorOf instead of treeInterval isAncestorOf.
* [NOD-540] Use newReachabilityInterval instead of struct initialization.
* [NOD-540] Make reachabilityTreeNode.String() use strings.Join.
* [NOD-540] Use sync.RWMutex instead of locks.PriorityMutex.
* [NOD-540] Rename thisTreeNode to newTreeNode.
* [NOD-540] Rename setTreeNode to addTreeNode.
* [NOD-540] Extracted selectedParentAnticone to a separate function.
* [NOD-540] Rename node to this.
* [NOD-540] Move updateReachability and isAncestorOf from dag.go to reachability.go.
* [NOD-540] Add whitespace after multiline function signatures in reachability.go.
* [NOD-540] Make splitFraction return an error on empty interval.
* [NOD-540] Add a comment about rounding to splitFraction.
* [NOD-540] Replace sneaky tabs with spaces.
* [NOD-540] Rename split to splitExponential.
* [NOD-540] Extract exponentialFractions to a separate function.
* [NOD-540] Rename bisect to findIndex.
* [NOD-540] Add call to reachabilityStore.clearDirtyEntries at the end of saveChangesFromBlock.
* [NOD-540] Explain the dirty hack in reachabilityStore.init().
* [NOD-540] Split the function signature for deserializeReachabilityData to two lines.
* [NOD-540] Add a comment about float precision loss to exponentialFractions.
* [NOD-540] Corrected a comment about float precision loss to exponentialFractions.
* [NOD-540] Fixed a comment about float precision loss to exponentialFractions some more.
* [NOD-540] Added further comments above futureCoveringBlockSet.
* [NOD-540] Rename addTreeNode to setTreeNode.
* [NOD-540] Rename splitExponential to splitWithExponentialBias.
* [NOD-540] Fix object references in reachabilityData deserialization (#563)
* [NOD-540] Fix broken references in deserialization.
* [NOD-540] Fix broken references in futureCoveringSet deserialization. Also add comments.
* [NOD-540] Don't deserialize on the first pass in reachabilityStore.init().
* [NOD-540] Remove redundant assignment to loaded[hash].
* [NOD-540] Use NewHash instead of SetBytes. Rename data to destination.
* [NOD-540] Preallocate futureCoveringSet.
* [NOD-541] Implement GHOSTDAG (#560)
* [NOD-541] Implement GHOSTDAG
* [NOD-541] Replace the old PHANTOM variant with GHOSTDAG
* [NOD-541] Move dag.updateReachability to the top of dag.applyDAGChanges to update reachability before the virtual block is updated
* [NOD-541] Fix blueAnticoneSize
* [NOD-541] Initialize node.bluesAnticoneSizes
* [NOD-541] Fix pastUTXO and applyBlueBlocks blues order
* [NOD-541] Add serialization logic to node.bluesAnticoneSizes
* [NOD-541] Fix GHOSTDAG to not count the new block and the blue candidates anticone, add selected parent to blues, and save to node.bluesAnticoneSizes properly
* [NOD-541] Fix test names in inner strings
* [NOD-541] Writing TestGHOSTDAG
* [NOD-541] In blueAnticoneSize change node->current
* [NOD-541] name ghostdag return values
* [NOD-541] fix ghostdag to return slice
* [NOD-541] Split k-cluster violation rules
* [NOD-541] Add missing space
* [NOD-541] Add comment to ghostdag
* [NOD-541] In selectedParentAnticone rename past->selectedParentPast
* [NOD-541] Fix misrefernces to TestChainUpdates
* [NOD-541] Fix ghostdag comment
* [NOD-541] Make PrepareBlockForTest in blockdag package
* [NOD-541] Make PrepareBlockForTest in blockdag package
* [NOD-541] Assign to selectedParentAnticone[i] instead of appending
* [NOD-541] Remove redundant forceTransactions arguments from PrepareBlockForTEST
* [NOD-541] Add non-selected parents to anticoneHeap
* [NOD-541] add test for ghostdag
* [NOD-541] Add comments
* [NOD-541] Use adjusted time for initializing blockNode
* [NOD-541] Rename isAncestorOf -> isAncestorOfBlueCandidate
* [NOD-541] Remove params from PrepareBlockForTest
* [NOD-541] Fix TestChainHeight
* [NOD-541] Remove recursive lock
* [NOD-541] Fix TestTxIndexConnectBlock
* [NOD-541] Fix TestBlueBlockWindow
* [NOD-541] Put prepareAndProcessBlock in common_test.go
* [NOD-541] Fix TestConfirmations
* [NOD-541] Fix TestAcceptingBlock
* [NOD-541] Fix TestDifficulty
* [NOD-541] Fix TestVirtualBlock
* [NOD-541] Fix TestSelectedPath
* [NOD-541] Fix TestChainUpdates
* [NOD-541] Shorten TestDifficulty test time
* [NOD-541] Make PrepareBlockForTest use minimal valid block time
* [NOD-541] Remove TODO comment
* [NOD-541] Move blockdag related mining functions to mining.go
* [NOD-541] Use NextBlockCoinbaseTransaction instead of NextBlockCoinbaseTransactionNoLock in NextCoinbaseFromAddress
* [NOD-541] Remove useMinimalTime from BlockForMining
* [NOD-541] Make MedianAdjustedTime a *BlockDAG method
* [NOD-541] Fix ghostdag to use anticone slice instead of heap
* [NOD-541] Fix NewBlockTemplate locks
* [NOD-541] Fix ghostdag comments
* [NOD-541] Convert MedianAdjustedTime to NextBlockTime
* [NOD-541] Fix ghostdag comment
* [NOD-541] Fix TestGHOSTDAG comment
* [NOD-541] Add comment before sanity check
* [NOD-541] Explicitly initialize .blues in ghostdag
* [NOD-541] Rename *blockNode.lessThan to *blockNode.less
* [NOD-541] Remove redundant check if block != chainBlock
* [NOD-541] Fix comment
* [NOD-541] Fix comment
* [NOD-497] Add comment; General refactoring
* [NOD-497] General refactoring.
* [NOD-497] Use isAncestor of the tree rather than the node
* [NOD-497] Remove reachability mutex lock as it is redundant (dag lock is held so no need); General refactoring.
* [NOD-497] Update comment
* [NOD-497] Undo test blocktimestamp
* [NOD-497] Update comments; Use BlockNode.less for blockset;
* [NOD-497] Change processBlock to return boolean and not the delay duration (merge conflict)
* [NOD-497] Undo change for bluest to use less; Change blocknode less to use daghash.Less
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
Co-authored-by: Dan Aharoni <dereeno@protonmail.com>
* [NOD-420] Delay blocks with valid timestamp (non-delayed) that point to a delayed block.
* [NOD-420] Mark block as requested when setting as delayed.
* [NOD-420] Merge master; Use dag.timeSource.AdjustedTime() instead of time.Now;
* [NOD-420] Return nil when not expecting an error
* [NOD-420] Initialise delyaed blocks mapping
* [NOD-420] Trigger delayed blocks processing every time we process a block.
* [NOD-420] Hold the read lock in processDelayedBlocks
* [NOD-420] Add delayed blocks heap sorted by their process time so we could process them in order.
* [NOD-420] Update debug log
* [NOD-420] Fix process blocks loop
* [NOD-420] Add comment
* [NOD-420] Log error message
* [NOD-420] Implement peek method for delayed block heap. extract delayed block processing to another function.
* [NOD-420] Trigger process delayed blocks only in process block
* [NOD-420] Move delayed block addition to process block
* [NOD-420] Use process block to make sure we fully process the delayed block and deal with orphans.
* [NOD-420] Unexport functions when not needed; Return isDelayed boolean from ProcessBlock instead of the delay duration
* [NOd-420] Remove redundant delayedBlocksLock
* [NOD-420] Resolve merge conflict; Return delay 0 instead of boolean
* [NOD-420] Do not treat delayed block as orphan
* [NOD-420] Make sure block is not processed if we have already sa delayed.
* [NOD-420] Process delayed block if parent is delayed to make sure it would not be treated as orphan.
* [NOD-420] Rename variable
* [NOD-420] Rename function. Move maxDelayOfParents to process.go
* [NOD-420] Fix typo
* [NOD-420] Handle errors from processDelayedBlocks properly
* [NOD-420] Return default values if err != nil from dag.addDelayedBlock
* [NOD-420] Return default values if err != nil from dag.addDelayedBlock in another place
Co-authored-by: Svarog <feanorr@gmail.com>
* [NOD-502] Remove checkpoints.
* [NOD-502] Remove remaining references to checkpoints.
* [NOD-500] Split RejectFinality to RejectDifficulty.
* [NOD-500] Remove support for headers-first in p2p.
* [NOD-500] Panic in newHashFromStr in case of an error.
* [NOD-350] Implement testnet faucet
* [NOD-350] Add JSON annotations to api server response types
* [NOD-350] Fix IP check query, update IP usage with upsert, and make IP a primary key
* [NOD-377] Remove redundant float conversion
* [NOD-377] Change not current database error message
* [NOD-377] change API route from /money_request to /request_money
* [NOD-377] Add a constant for 24 hours
* [NOD-377] Remove redundant call for getWalletUTXOSet()
* [NOD-377] Condition refactoring
* [NOD-377] Fix POST request to API server content type
* [NOD-350] Rename day -> timeBetweenRequests
* [NOD-377] Rename timeBetweenRequests -> minRequestInterval, timeBefore24Hours -> minRequestInterval
* [NOD-350] Rename file responsetypes -> response_types
* [NOD-350] Rename convertTxModelToTxResponse -> convertTxDBModelToTxResponse
* [NOD-350] Explicitly select blue_score in fetchSelectedTipBlueScore
* [NOD-350] Refactor and add comments
* [NOD-350] Make calcFee use MassPerTxByte
* [NOD-350] Convert IP column to varchar(39) to allow ipv6 addresses
* [NOD-350] Add comments to isFundedAndIsChangeOutputRequired
* [NOD-350] Remove approximateConfirmationsForCoinbaseMaturity
* [NOD-350] Fix comments
* [NOD-337] In CheckTransactionSanity, made max mass of transaction to be half of block max mass.
* [NOD-337] Added a comment for MaxMassPerTx.
* [NOD-337] Fixed a couple of comments.
* [NOD-289] Implemented database isCurrent checking and connection.
* [NOD-289] Added GetChainFromBlock to RPCClient.
* [NOD-289] Limited the amount of blocks in GetChainFromBlockResponse.
* [NOD-289] Fixed various issues that were keeping GetChainFromBlocks from working properly.
* [NOD-289] Created blockloop.go.
* [NOD-289] Updated go.mod after merge.
* [NOD-289] Implemented collection of current selected parent chain.
* [NOD-289] Fixed test. Reverted not deleting utxoDiffData from the DB.
* [NOD-289] Implemented GetBlocks.
* [NOD-289] Added comment to BlockHashesFrom.
* [NOD-289] Added GetBlocks to rpcclient.
* [NOD-289] Added verboseBlocks to GetBlocks.
* [NOD-289] Implemented block insertion.
* [NOD-289] Added AUTO_INCREMENT to tables that were missing it.
* [NOD-289] Made gasLimit in subnetwork nullable.
* [NOD-289] Renamed transactions_outputs to transaction_outputs.
* [NOD-289] Fixed weird coinbase behavior in vin.
* [NOD-289] Made collectCurrentBlocks start from the most recent startHash.
* [NOD-289] Added IsChainBlock to GetBlockVerboseResult.
* [NOD-289] Implemented adding a block from onBlockAdded.
* [NOD-289] Added removedParentChainHashes to getChainFromBlock.
* [NOD-289] Implemented updating the selected parent chain from onChainChanged.
* [NOD-289] Implemented some initial logic for updating the UTXO.
* [NOD-289] Fixed merge errors.
* [NOD-326] Fixed some more merge errors.
* [NOD-289] Added error handling for missing required records.
* [NOD-289] Implemented handling removedChainHashes.
* [NOD-289] Implemented handling addedChainBlocks.
* [NOD-289] Fixed incorrect coinbase check.
* [NOD-289] Implemented inserting the transaction output address.
* [NOD-289] Added updating block.IsChainBlock.
* [NOD-289] Split insertBlock into many small functions.
* [NOD-289] Split updateSelectedParentChain into smaller functions.
* [NOD-289] Fixed pointer errors.
* [NOD-289] Fixed a bad exists check.
* [NOD-289] Fixed a couple of small bugs.
* [NOD-289] Fixed a TxID/Hash mixup.
* [NOD-289] Added block/tx mass to getBlockVerboseResponse.
* [NOD-289] Renamed blockLoop.go to sync.go. Added comments.
* [NOD-289] Deleted apiserver README.
* [NOD-289] Fixed golint errors.
* [NOD-289] Renamed findMostRecentBlockHash to findHashOfBluestBlock.
* [NOD-289] Fixed style in syncBlocks and fixed a comment.
* [NOD-289] Copied NewErrorFromDBErrors over from NOD-324.
* [NOD-289] Created a couple of utils to make error handling with gorm slightly less painful.
* [NOD-289] Added error handling for database calls.
* [NOD-289] Fixed some more style/comments.
* [NOD-289] Fixed comments.
* [NOD-289] Renamed TransactionInput.TransactionOutput to TransactionInput.PreviousTransactionOutput.
* [NOD-289] Added a commends about pagination in getBlocks and getChainFromBlock.
* [NOD-289] Removed the coinbase field from Vin.
* [NOD-289] Deferred handling chainChangedMsgs until we have the appropriate data.
* [NOD-289] Optimized queries in updateRemovedChainHashes and updateAddedChainBlocks.
* [NOD-289] Optimized queries in insertBlockParents.
* [NOD-289] Optimized queries in insertTransactionInput.
* [NOD-289] Split Where calls to separate lines.
* [NOD-289] Fixed merge errors.
* [NOD-289] Exited early from insertBlockParents if we're the genesis block.
* [NOD-289] Improved nextChainChangedChan mechanism.
* [NOD-289] Fixed the above sync mechanism a bit.
* [NOD-289] Renamed IsDBRecordNotFoundError to HasDBRecordNotFoundError and IsDBError to HasDBError.
* [NOD-289] Replaced old error handling for db errors with the lovely new stuff.
* [NOD-289] Exited early if we already inserted a block. This saves us checking if a record already exists for some record types.
* [NOD-289] Decoupled syncBlocks from syncSelectedParentChain.
* [NOD-289] Made a comment more explicit.
* [NOD-289] Extracted net resolution to a separate function.
* [NOD-289] Extracted syncing to a separate function.
* [NOD-289] Fixed a comment.
* [NOD-289] Fixed merge erros.
* [NOD-289] Fixed a couple of bugs.
* [NOD-289] Fixed another bug.
* [NOD-289] Extracted ChainChangedMsg conversion to a separate function.
* [NOD-289] Optimized queries in canHandleChainChangedMsg.
* [NOD-289] Moved the sync function closer to its call site.
* [NOD-289] Renamed HasDBRecordNotFoundError to IsDBRecordNotFoundError.
* [NOD-289] Used count instead of first.
* [NOD-289] Renamed address to hexAddress.
* [NOD-264] Implemented calcTxSelectionValue.
* [NOD-264] Fixed bad subnetworkID in calcTxSelectionValue.
* [NOD-264] Implemented sorting the txDescs by value.
* [NOD-264] Got rid of txPrioItem.
* [NOD-264] Moved transaction selection to a separate file.
* [NOD-264] Renamed the result object to txsForBlockTemplate.
* [NOD-264] Implemented tx selection.
* [NOD-264] Fixed trying to get the gas limit for built-in subnetworks.
* [NOD-264] Wrote comments where appropriate.
* [NOD-264] Moved calcTxSelectionValue to the mining package. (Non-mining nodes shouldn't be forced to calc selection value for every transaction)
* [NOD-264] Wrote a test for selectTxs.
* [NOD-264] Fixed a comment.
* [NOD-264] Fixed misunderstood test.
* [NOD-264] Added zero fee check. Added a couple more tests.
* [NOD-264] Added probabilistic tests. Fixed a couple of bugs in tx selection.
* [NOD-264] Fixed tests with missing fees.
* [NOD-264] Added a test over a range of txs with different gas/mass.
* [NOD-264] Added expected probability to the rest of the test cases.
* [NOD-264] Tightened bounds in probability test.
* [NOD-264] Fixed values in probabily test.
* [NOD-264] Added a comments for alpha and rebalanceThreshold.
* [NOD-264] Fixed a couple of comments, renamed result to txsForBlockTemplate.
* [NOD-264] Removed an irrelevant comment. Changed Tracef to Warnf in some logs.
* [NOD-264] Renamed selectionValue -> txValue.
* [NOD-264] Moved rebalancing to the start of the tx selection loop.
* [NOD-264] Added overflow check for gasUsage.
* [NOD-264] Renamed blockSigOps and blockMass to totalSigOps and totalMass.
* [NOD-264] Removed the need to pass usedCount to reblanaceCandidates. Also relaxed bounds in a test.
* [NOD-264] Split selectTxs into smaller functions. Also relaxed bounds in a test some more.
* [NOD-264] Added a comment for findTx.
* [NOD-264] Ordered candidateTxs by subnetwork instead of txValue.
* [NOD-264] Disallowed zero tx fees in mempool and config. Renamed iterateCandidateTxs to populateTemplateFromCandidates.
* [NOD-264] Changed isFinalizedTransaction log level from Warn to Debug.
* [NOD-264] Removed references to SigOps in txSelection.
* [NOD-264] Removed SigOps validation. Validating mass should suffice.
* [NOD-264] Renamed wasUsed to isMarkedForDeletion.
* [NOD-264] Renamed markCandidateTxUsed to markCandidateTxForDeletion.
* [NOD-264] Made some probabilistic tests less likely to fail when they shouldn't.
* [NOD-264] Added a message warning people about probabilistic tests.
* [NOD-264] Rephrased a comment about rebalanceThreshold.
* [NOD-264] Removed IsCoinBase, CheckTransactionInputsAndCalulateFee, and ValidateTransactionScripts from txSelection.
* [NOD-264] Removed a condition that is no longer relevant.
* [NOD-264] "which's" -> "whose"
* [NOD-264] Removed wasteful preallocations.
* [NOD-264] Fixed a comment referring to "used" transactions.
* [NOD-237] Implemented transaction mass.
* [NOD-237] Added transaction mass validation to the mempool.
* [NOD-237] Made blockMaxMassMax not rely on MaxBlockPayload.
* [NOD-237] Added comments describing the new constants in validate.go.
* [NOD-237] Changed the default blockmaxmass to 10,000,000.
* [NOD-237] Fixed a comment that erroneously didn't refer to mass.
* [NOD-237] Added comments to ValidateTxMass and CalcTxMass.
* [NOD-237] Renamed "size" to "byte". Made validateBlockMass exit early if validation fails. Fixed unit names in comments. In CalcTxMass, moved summing of mass to the bottom of the function.
* [NOD-237] Instead of ErrMassTooHigh, renamed ErrBlockTooBig and ErrTxTooBig. Replaced wire.MaxBlockPayload with MaxMassPerBlock.
* [NOD-237] Fixed sanity checks related to block size in commands.
* [NOD-237] To use up less memory during testing, made the mass in the "too big" test come from pkScripts rather than input bytes.
* [NOD-237] Added an overflow check to validateBlockMass.
* [NOD-225] Finalize nodes below finality point
* [NOD-225] finalizeNodesBelowFinalityPoint only if dag.lastFinalityPoint is changed
* [NOD-225] change comment in validateParents
* [NOD-225] add string to ErrInvalidParentsRelation error
* [NOD-225] Change comment in validateParents
* [NOD-225] Change comment in validateParents
* [NOD-225] change comment in validateParents
* [NOD-225] Delete diff data from db directly from finalizeNodesBelowFinalityPoint
* [NOD-225] Refactor updateFinalityPoint
* [NOD-208] Added blockBlueScore to UTXOEntry.
* [NOD-208] Added blueBlockScore to NewUTXOEntry.
* [NOD-208] Fixed compilation errors in policy, utxoset, and dag tests.
* [NOD-208] Changed validateBlockRewardMaturity and CheckTransactionInputsAndCalulateFee to use blueScore.
* [NOD-208] Changed CalcBlockSubsidy to use blueScore.
* [NOD-208] Changed SequenceLockActive to use blueScore.
* [NOD-208] Removed ExtractCoinbaseHeight.
* [NOD-208] Removed reference to block height in ensureNoDuplicateTx.
* [NOD-208] Changed IsFinalizedTransaction to use blueScore.
* [NOD-208] Fixed merge errors.
* [NOD-208] Made UTXOEntry serialization use blueScore.
* [NOD-208] Changed CalcPriority and calcInputValueAge to use blueScore.
* [NOD-208] Changed calcSequenceLock to use blueScore.
* [NOD-208] Removed blockChainHeight from UTXOEntry.
* [NOD-208] Fixed compilation errors in feeEstimator. Fixed a bug in the test pool hardness.
* [NOD-208] Fixed oldestChainBlockWithBlueScoreGreaterThan not handling an extreme case.
* [NOD-208] Fixed TestDiffFromTx.
* [NOD-208] Got rid of priority and support of free transactions.
* [NOD-208] Fixed TestProcessTransaction.
* [NOD-208] Fixed TestTxFeePrioHeap.
* [NOD-208] Fixed TestAddrIndex and TestFeeEstimatorCfg.
* [NOD-208] Removed unused rateLimit parameter from ProcessTransaction.
* [NOD-208] Fixed tests that rely on CreateTxChain.
* [NOD-208] Fixed tests that rely on CreateSignedTxForSubnetwork.
* [NOD-208] Fixed TestFetchTransaction.
* [NOD-208] Fixed TestHandleNewBlock. Fixed HandleNewBlock erroneously processing fee transactions.
* [NOD-208] Fixed TestTxIndexConnectBlock.
* [NOD-208] Removed the use of Height() from the fee estimator.
* [NOD-208] Removed unused methods from rpcwebsocket.go.
* [NOD-208] Removed Height from util.Block.
* [NOD-208] Removed ErrForkTooOld. It doesn't make sense in a DAG.
* [NOD-208] Made blockHeap use blueScore instead of height.
* [NOD-208] Removed fee estimator.
* [NOD-208] Removed DAG.Height.
* [NOD-208] Made TestAncestorErrors test chainHeight instead of height.
* [NOD-208] Fixed a couple of comments that were still speaking about block height.
* [NOD-208] Replaced all uses of HighestTipHash with SelectedTipHash.
* [NOD-208] Remove blockNode highest and some remaining erroneous uses of height.
* [NOD-208] Fixed a couple of comments. Fixed outPoint -> outpoint merge error.
* [NOD-208] Fixed a couple more comments.
* [NOD-208] Used calcMinRequiredTxRelayFee instead of DefaultMinRelayTxFee for mempool tests.
* [NOD-208] Renamed mempool Config BestHeight to DAGChainHeight.
* [NOD-208] Fixed a bug in oldestChainBlockWithBlueScoreGreaterThan. Made calcSequenceLock use the node's selected parent chain rather than the virtual block's.
* [NOD-208] Removed chainHeight from blockNode String().
Renamed checkpointsByHeight to checkpointsByChainHeight and prevCheckpointHeight to prevCheckpointChainHeight.
Removed reference to chainHeight in blockIndexKey.
Fixed comments in dagio.go.
* [NOD-208] Removed indexers/blocklogger.go, as no one was using it.
* [NOD-208] Made blocklogger.go log blueScore instead of height.
* [NOD-208] Fixed typo.
* [NOD-208] Fixed comments, did minor renaming.
* [NOD-208] Made a "common sense" wrapper around sort.Search.
* [NOD-208] Fixed comment in SearchSlice.
* [NOD-195] Made fee tx implicit
* [NOD-195] Removed redundant checks for fee transactions
* [NOD-195] Add fee tx data into acceptence data and fee data
* [NOD-195] Fix some tests
* [NOD-195] Update Block100000 with new data
* [NOD-195] Fixed remaining tests
* [NOD-195] Save and load feeTx to/from database
* [NOD-195] Remove DisconnectBlock methods from indexers, since they are not used anywhere
* [NOD-195] Add fee tx to addrindex
* [NOD-195] Don't populate inputs for fee transactions
* [NOD-195] Delete feeTxBucket in removeDAGState
* [NOD-195] Got rid of util.FeeTRansactionIndex
* [NOD-177] Removed references to idMerkleRoot.
* [NOD-177] Generated new genesis hashes.
* [NOD-177] Generated new blk_ blocks.
* [NOD-177] Fixed TestHaveBlock.
* [NOD-177] Fixed The rest of the tests.
* [NOD-177] Fixed a couple of comments and a duplicate test.
* [NOD-177] Fixed blocks1-256.bz2.
* [NOD-144] Use chainHeight in SelectedAncestor, and update all logic that uses it
* [NOD-144] Moved UnminedHeight to blockdag, and updated all references
* [NOD-142] Updated util.FastLog2Floor to work on uint64
* [NOD-142] Convert height and chainHeight to uint64
* [NOD-142] A couple fixes in comments of TestFastLog2Floor
* [NOD-142] Make spendableOutOffset uint64 too
* [NOD-83] Modify block parents' children only after validation
* [NOD-83] Creating CheckConnectBlockTemplateWithLock with RLock
* [NOD-83] Put updateParentsChildren inside updateParents
* [NOD-83] create updateParentsDiffs function
* [NOD-58] Replace lastBlock with selected tip in version message (#210)
* [NOD-58] Replace lastBlock with selected tip in version message
* [NOD-58] Fix typo in comment
* [NOD-58] Add mutex to SelectedTipHash
* [NOD-58] Remove redundant comment
* [NOD-58] Remove wantStartingHeight from peerStats
* [NOD-58] Remove lock from SelectedTipHash
* Nod 53 change getheaders message to handle new block locator (#213)
* [NOD-53] Change getheaders message to handle the new block locator mechanism
* [NOD-53] Use heap in locateHeaders
* [NOD-53] Create a constructor for each heap direction
* [NOD-57] Check if a node is synced only by timestamps (#214)
* [NOD-60] implement isSyncCandidate (#218)
* [NOD-60] Implement isSyncCandidate
* [NOD-60] Fix typo
* [NOD-65] Fix netsync related tests and remove fields optionality from… (#220)
* [NOD-65] Fix netsync related tests and remove fields optionality from msgversion
* [NOD-65] gofmt rpcserver.go
* [NOD-65] add missing test for verRelayTxFalse
* [NOD-62] Change getblocks message to handle the new block locator mechanism (#219)
* [NOD-62] Change getblocks message to handle the new block locator mechanism
* [NOD-62] Add locateBlockNodes function
* [NOD-68] Adjust orphan parents requesting for a DAG (#222)
* [NOD-68] Adjust orphan parents requesting for a DAG
* [NOD-68] add sendInvsFromRequestedQueue and trigger it when requested blocks slice is empty, or immediatly if we're not in sync mode
* [NOD-68] Prevent duplicates from entering to state.requestQueue and add wrapping locks to addBlocksToRequestQueue
* [NOD-68] Fix Lock -> Unlock in sendInvsFromRequestedQueue
* [NOD-74] Starts syncing again when the current sync peer is done (#225)
* [NOD-74] Starts syncing again when the current sync peer is done
* [NOD-74] Unlock mtx before netsync is restarted
* [NOD-74] Fix name isSyncPeerFree -> isWaitingForBlocks
* [NOD-75] fixing netsync bugs (#227)
* [NOD-74] Starts syncing again when the current sync peer is done
* [NOD-74] Unlock mtx before netsync is restarted
* [NOD-75] Fixing netsync bugs
* [NOD-80] Request block data from block propagation just after you are… (#231)
* [NOD-80] Request block data from block propagation just after you are current
* [NOD-80] Fix adding to both queues in addInvToRequestQueue
* [NOD-81] Start to mine on top of genesis iff all peers selected tip is genesis (#232)
* [NOD-81] Start to mine on top of genesis only if all of your peers' selected tip is genesis
* [NOD-81] Explain forAllPeers/forAllOutboundPeers shouldContinue behaviour in comments
* [NOD-81] Add forAllInboundPeers and add return values for forAllPeers/forAllOutboundPeers/forAllInboundPeers functions
* [NOD-16] Add pushSet to the BlockHeap type
* [NOD-16] Fixed syntax error
* [NOD-56] Created devnet
* [NOD-56] Fixed tests
* [NOD-56] Fixed go vet errors
* [NOD-56] Added TestSolveGenesisBlock function
* [NOD-56] Created command line tool for solving genesis blocks
* [NOD-42] Split checkFinalityRules and newFinalityPoint
* [NOD-42] Rename connectToDAG -> addBlock + move anything that is not actually connecting block to DAG out of connectBlock
* [NOD-42] Extract methods from PastUTXO
* [NOD-42] Give names to outputs in verifyAndBuildUTXO and propagate name
changes up the call tree
* [NOD-42] Split loop that creates UTXODiff and updates acceptance data into 2 separate methods
* [NOD-42] Removed from applyUTXOChanges any validation logic, moved in any logic related to updating the DAG and renamed to applyDAGChanges
* [NOD-42] Rename: CheckTransactionInputs -> CheckTransactionInputsAndCalculateFee
* [NOD-42] Revise some comments
* [NOD-42] Removed finalityErr constant - it's not needed
* Multiple chain -> dag corrections in comments
* [NOD-42] Removed redundant declaration of feeData
* [NOD-42] Reworded some comments
* [NOD-42] Rename MultiblockTxsAcceptanceData -> MultiBlockTxsAcceptanceData