Skip to content

Commit

Permalink
feat(mpt): Simplify TrieDB (#198)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
clabby authored Jun 4, 2024
1 parent 7e4d948 commit 3b6c4d8
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 253 deletions.
Loading

0 comments on commit 3b6c4d8

Please sign in to comment.