-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat(mpt): Simplify TrieDB
#198
Merged
Merged
Conversation
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 was referenced Jun 1, 2024
This stack of pull requests is managed by Graphite. Learn more about stacking. |
clabby
force-pushed
the
cl/hide-recursive-params
branch
from
June 1, 2024 22:05
5573789
to
92f9394
Compare
clabby
force-pushed
the
cl/hide-recursive-params
branch
from
June 1, 2024 22:09
92f9394
to
2901cba
Compare
clabby
force-pushed
the
cl/trie-state
branch
2 times, most recently
from
June 1, 2024 22:26
c46842f
to
e9e160a
Compare
clabby
force-pushed
the
cl/hide-recursive-params
branch
from
June 1, 2024 22:27
2901cba
to
3dbcf50
Compare
clabby
force-pushed
the
cl/trie-state
branch
2 times, most recently
from
June 2, 2024 01:52
db8e6f9
to
222e7f9
Compare
clabby
force-pushed
the
cl/hide-recursive-params
branch
from
June 3, 2024 22:50
3dbcf50
to
c349b63
Compare
clabby
force-pushed
the
cl/hide-recursive-params
branch
from
June 3, 2024 22:56
c349b63
to
9ff3949
Compare
refcell
reviewed
Jun 4, 2024
refcell
approved these changes
Jun 4, 2024
clabby
force-pushed
the
cl/hide-recursive-params
branch
from
June 4, 2024 15:12
9ff3949
to
ff35886
Compare
Simplifies `TrieDB` by assuming it will be wrapped with [`revm::State`](https://github.com/bluealloy/revm/blob/fadf6fbe43a3022c1406c0d8ee062a83e951d4d3/crates/revm/src/db/states/state.rs#L29). The `State` struct in `revm` is better for our usecase, since it allows for merging a `BundleState` after a full block's execution. The previous implementation had the fatal flaw having to recompute the state root every time the `DatabaseCommit` trait implementation was invoked, which was not suitable. Examples of usage may be found within the rustdoc for `TrieDB`.
This was referenced Jun 11, 2024
Closed
Closed
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Simplifies
TrieDB
by assuming it will be wrapped withrevm::State
. TheState
handles the cache layer for in-memory accounts / storage, allowing theTrieDB
to focus solely on caching open trie state and state root recomputation.The
State
struct inrevm
is better for our usecase, since it allows for merging aBundleState
after a full block's execution. The previous implementation had the fatal flaw having to recompute the state root every time theDatabaseCommit
trait implementation was invoked, which was not suitable.Examples of usage may be found within the rustdoc for
TrieDB
.