-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(mempool)!: optimisations,excess sig index,fix weight calc (#…
…3691) Description --- - fix weighting calculation for metadata (integer division bug: `(∑v_i) / d != v_1 / d + v_2/d +.... v_n/d` unless all `v`s are multiples of `d` due to integer rounding) - updated fee estimation in wallet - add excess signature index in mempool (required for compact block propagation) - account for multiple kernels in transactions in mempool - many smaller mempool optimisations (clones, etc) - remove blocking thread pool usage for mempool - remove unused mempool event stream (fills up and never empties, consuming some memory) - clean up some legacy code (from when base node contained the wallet and miner) - updated tests Because the block weight calculation changed, this is a breaking change only affecting full/near full blocks Motivation and Context --- A bug in the way metadata weights are calculated meant that a set of transactions can have a different total weight from a block containing those same transactions. After a correctly weighted full block is returned from get block template, the block validator could incorrectly reject a block once mined as exceeding maximum weight. Create a many to many index between transactions and kernels in the mempool. How Has This Been Tested? --- Unit: Existing tests updated Manual: Producing 3 blocks worth of transactions, mining and checking the block is accepted and the transactions removed from the mempool
- Loading branch information
Showing
57 changed files
with
1,181 additions
and
1,178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.