-
Notifications
You must be signed in to change notification settings - Fork 17
chore(deps): bump revm 27.0.2 #53
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
…should be - considering it should strictly be derived we could use alloy-hardforks to match the block number. Foundry only instantiates using ::new with the block environment already configured
…from block due to changes in BlobExcessGasAndPrice
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, but imo we dont need the chainid arg
difficulty: U256::from(block.header.difficulty()), | ||
basefee: block.header.base_fee_per_gas().unwrap_or_default(), | ||
gas_limit: block.header.gas_limit(), | ||
prevrandao: block.header.mix_hash(), | ||
blob_excess_gas_and_price: Some(BlobExcessGasAndPrice::new( | ||
block.header.excess_blob_gas().unwrap_or_default(), | ||
false, | ||
blob_base_fee_update_fraction, |
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.
do we really need this, this previously also just defaulted to pre-prague and I believe we only use this to tag the metadata?
should we just use BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE and remove the chainid arg?
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.
Updated, now we have a builder method set_chain
that allows for optional setting of the chain, defaulting to use BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE
if none is set. This should be both correct and a good user experience.
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
src/cache.rs
Outdated
@@ -244,6 +265,7 @@ impl<'de> Deserialize<'de> for BlockchainDbMeta { | |||
|
|||
let Meta { block_env, hosts } = Meta::deserialize(deserializer)?; | |||
Ok(Self { | |||
chain: None, |
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 gets lost now when loading from cache, we also need to add this to meta
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.
Good catch: fixed in 18c4ceb
pub struct BlockchainDbMeta { | ||
/// The chain of the blockchain of the block environment | ||
pub chain: Option<Chain>, |
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.
can we mark this default and skip if none
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.
Fixed in 221098e
Motivation
Bumps to revm 27.0.2
Solution
Removes
with_block
as it is unused, decided that this was more sensible as it is unused in Foundry and we would need to pull in multiple dependencies to accurately set theblob_excess_gas_and_price
field.PR Checklist
Breaking changes
with_block
method is unused and users can construct theBlockEnv
accordingly themselvesset_block_env
no longer consumes, returnsSelf