-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor(trie): trie node iterators #5048
Conversation
// TODO: remove in the next breaking release. | ||
/// The last walker key processed. | ||
pub last_walker_key: Vec<u8>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing i can do here atm without breaking the format, will open a separate PR for this
Codecov Report
... and 9 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a simple refactor that makes the Walker type nicer.
I think we have enough coverage for that, since this mostly moved things around?
#[derive(Debug)] | ||
pub struct TrieWalker<'a, K, C> { | ||
pub struct TrieWalker<C> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks indeed simpler
@mattsse the main refactor is creating these iterators https://github.com/paradigmxyz/reth/blob/7a080f7a3d2941feed5cb074ee529374ae983af2/crates/trie/src/node_iter.rs |
7a080f7
to
81fede3
Compare
81fede3
to
b83dc81
Compare
tested on sepolia ✔️ |
Description
Refactor common iteration steps into
AccountNodeIter
andStorageNodeIter
iterators, get rid of redundant generics.Summary
🤖 Generated by Copilot at b424fb4
This pull request refactors the state root and storage root calculation logic in the
reth
crate, using new iterator-based abstractions and moving some types and functions to theprimitives
crate. It also simplifies the code, fixes a bug in the proof generation, and adds a new dependency on theauto_impl
crate. The affected files are mostly in thetrie
crate, but also in thestages
andprimitives
crates.