New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block: use trie.batch #3317
base: master
Are you sure you want to change the base?
Block: use trie.batch #3317
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
Cool that you even already started on this one 👍, also cool that this is separated into two PRs! 💯 Is this already "so ready" that I could test this in the client setup I had and see how it goes? Or does this need more work before? |
Follow-up to #3313
Continuing work towards optimizations in #3293
block.genTransactionsTrie()
Returns the txs trie root for array of
TypedTransaction
This method is used during block building and block validation
An empty trie is contructed from a list of serialized transactions (with the tx index as key)
The root of this trie is the
TransactionsTrieRoot
of a block.trie.batch()
The refactored
trie.batch
method in #3313 demonstrated up to 33% efficiency improvements over the naivefor (tx of txs) {...}
approach.Changes:
block.genTransactionsTrieRoot()
will now construct a trie from a batch input of serialized transactions.This should improve performance during block building and validation
TODO: