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
mattsse
left a comment
There was a problem hiding this comment.
lgtm, but imo we dont need the chainid arg
| 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.
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.
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.
src/cache.rs
Outdated
|
|
||
| let Meta { block_env, hosts } = Meta::deserialize(deserializer)?; | ||
| Ok(Self { | ||
| chain: None, |
There was a problem hiding this comment.
this gets lost now when loading from cache, we also need to add this to meta
| #[derive(Clone, Debug, Default, Eq, Serialize)] | ||
| pub struct BlockchainDbMeta { | ||
| /// The chain of the blockchain of the block environment | ||
| pub chain: Option<Chain>, |
There was a problem hiding this comment.
can we mark this default and skip if none
Motivation
Bumps to revm 27.0.2
Solution
Removes
with_blockas 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_pricefield.PR Checklist
Breaking changes
with_blockmethod is unused and users can construct theBlockEnvaccordingly themselvesset_block_envno longer consumes, returnsSelf