Change evm_env_cache
to header cache
#12902
Labels
A-rpc
Related to the RPC implementation
C-enhancement
New feature or request
D-good-first-issue
Nice and easy! A great choice to get started
Describe the feature
This currently bakes in the
revm
environments into caching:reth/crates/rpc/rpc-eth-types/src/cache/mod.rs
Lines 240 to 241 in 51afa4c
this will no longer with with upcoming revm changes where these settings will be generic, or if we want to support something that is not revm, like a different kind of execution.
The environment settings are derived from the header:
reth/crates/evm/src/provider.rs
Lines 28 to 37 in 51afa4c
so what we can do here is:
first change the cache from caching env objects to
Header
and convert the environments on demandthis is only called here:
reth/crates/rpc/rpc-eth-api/src/helpers/state.rs
Line 238 in 51afa4c
so as a first step we can do is change the cache to
Header
,and move this step:
reth/crates/rpc/rpc-eth-types/src/cache/mod.rs
Lines 441 to 453 in 51afa4c
Additional context
No response
The text was updated successfully, but these errors were encountered: