-
Notifications
You must be signed in to change notification settings - Fork 11
chore: bump to reth 1.4.3 #72
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
Conversation
| BlobScheduleBlobParams { | ||
| cancun: CANCUN_BLOB_PARAMS, | ||
| prague: PRAGUE_BLOB_PARAMS, | ||
| osaka: PRAGUE_BLOB_PARAMS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assigned the prague blob params here for now,
this entire thing is subject to change as the format is still wip
| let components = |spec: Arc<C::ChainSpec>| { | ||
| ( | ||
| GnosisExecutorProvider::new(spec.clone()), | ||
| GnosisEvmConfig::new(spec.clone()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in 1.4 the ExecutorProvider was unified with EvmConfig
| Commands::ImportEra(_) => unimplemented!(), | ||
| Commands::Download(_) => unimplemented!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are new wip commands for era import /pre-merge history expiry
|
|
||
| #[allow(missing_debug_implementations)] // missing revm::Context Debug impl | ||
| pub struct GnosisEvm<DB: Database, I, PRECOMPILE = EthPrecompiles> { | ||
| pub struct GnosisEvm<DB: Database, I, PRECOMPILE = PrecompilesMap> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a different representation of the precompiles
|
|
||
| /// Provides a mutable reference to the EVM inspector. | ||
| pub fn inspector_mut(&mut self) -> &mut I { | ||
| &mut self.inner.0.data.inspector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this layer has been flattened
| type Precompiles = PRECOMPILE; | ||
| type Inspector = I; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are additional AT that allow us to access this via the trait directly
src/evm/gnosis_evm.rs
Outdated
| fn validate_against_state_and_deduct_caller( | ||
| &self, | ||
| evm: &mut Self::Evm, | ||
| ) -> Result<(), Self::Error> { | ||
| // TODO: is this equivalent to pre_execution::validate_against_state_and_deduct_caller(evm.ctx()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this replaced deduct_caller but I'm not sure if this here is equivalent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rakita how to migrate this from fn deduct_caller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It merges two function validate_agains_state and deduct_caller
We should call pre_execution::validate_against_state_and_deduct_caller(evm.ctx()) from revm here
And add gnosis specific code after it
reth_gnosis/src/evm/gnosis_evm.rs
Lines 283 to 296 in 5d65422
| // GNOSIS-SPECIFIC // START | |
| let spec: SpecId = context.cfg().spec().into(); | |
| if spec.is_enabled_in(SpecId::PRAGUE) { | |
| let fee_collector_account = context.journal().load_account(fee_collector)?.data; | |
| // Set new fee collector account balance. | |
| fee_collector_account.info.balance = fee_collector_account | |
| .info | |
| .balance | |
| .saturating_add(U256::from(blob_gas_cost)); | |
| // Touch account so we know it is changed. | |
| fee_collector_account.mark_touch(); | |
| } | |
| // GNOSIS-SPECIFIC // END |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made this change
dapplion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
migrates to latest reth 1.4.3
this includes a few breaking changes around the executor/evm type and some internal revm changes.
there's only one thing I'm not entirely sure of of which is the deduct_caller change, which I need to double check.
we also swapped out the EthPrecompiles type to a more flexible
PrecompilesMap