Skip to content

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Aug 16, 2025

Reth also does this e.g.

This makes sense, as for RPC we're only accessing state and more complex calls might need accessing the same parts of the trie. We can save a bunch of I/O time by caching the results (and state changes when tracing, which once implemented should be faster with this layer).

Reth also does this [e.g](https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc/src/eth/bundle.rs#L151).

This makes sense, as for RPC we're only accessing state and more complex calls might need accessing the same parts of the trie. We can save a bunch of I/O time by caching the results (and state changes when tracing, which once implemented should be faster with this layer).
@Evalir Evalir requested a review from a team as a code owner August 16, 2025 13:13
Copy link
Member Author

Evalir commented Aug 16, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@prestwich
Copy link
Member

prestwich commented Aug 16, 2025

state already internally caches, this would make sense iff we deconstructed the State and then re-used the CacheDb elsewhere, which we don't do afaik

https://docs.rs/revm/latest/revm/database/struct.State.html
https://docs.rs/revm/latest/revm/database/struct.CacheState.html

https://docs.rs/revm-database/7.0.4/src/revm_database/states/state.rs.html#190-212

@Evalir Evalir closed this Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants