feat(trie): implement change set walker#9970
Conversation
4eb8e1c to
53aa0da
Compare
|
Hey @mattsse it's good to hear from you again, thanks for the quick feedback. I just got back from a week long break so I hope this effort didn't seem too abandoned! Anywho, I'm glad that this looks more clear to you as I see clarity as important. |
|
that's great to hear, |
|
@RomanHodulak thanks for the PR, however I do not see any good reason for abstracting away the transaction from |
|
@RomanHodulak jumped the gun and misread the changes |
|
@RomanHodulak i see, this is for pub trait DatabaseHashedState<'a, TX> {
fn from_reverts(tx: &'a TX, from: BlockNumber) -> Result<Self, DatabaseError>;
} |
cbf756c to
91ec1c2
Compare
…pendency in `HashedPostState`
91ec1c2 to
4c76dfa
Compare
|
closed in favor of #9987 |
About
This PR is about decoupling trait and implementation of an iterator over change sets in a transaction.
Motivation
Expanding on #9282 with a focus on
statemodule ofreth-triecrate.Goals
reth-dbandreth-db-apiinstatemodule ofreth-triecrate.Solution
TrieRangeWalkerandTrieRangeWalkerFactoryDatabaseAccountChangeSetsCursorandDatabaseStorageChangeSetsCursorreth-trieto use the trait onlyreth-trieto supply the proper implementationAdditional notes
The newly created database implementations of
TrieRangeWalkerandTrieRangeWalkerFactoryshould be a part ofreth-trie-dbcrate instead ofreth-trieas done here. However, this is not a concern of this PR, instead will be a concern of a PR focusing on moving all database implementations of trie readers/writers toreth-trie-db. Mostly in favor of keeping the PRs small and focused as explained in #9585 motivation section.