Skip to content

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

Merged
merged 18 commits into from
Jul 10, 2025
Merged

chore(deps): bump revm 27.0.2 #53

merged 18 commits into from
Jul 10, 2025

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Jun 24, 2025

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 the blob_excess_gas_and_price field.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Breaking changes

  • Removed with_block method is unused and users can construct the BlockEnv accordingly themselves
  • set_block_env no longer consumes, returns Self

…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
@zerosnacks zerosnacks changed the title chore(deps): bump revm 26.0.0 chore(deps): bump revm 27.0.2 Jul 7, 2025
@zerosnacks zerosnacks marked this pull request as ready for review July 9, 2025 13:10
@zerosnacks zerosnacks requested a review from yash-atreya July 9, 2025 13:12
Copy link
Member

@mattsse mattsse left a 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,
Copy link
Member

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?

Copy link
Member Author

@zerosnacks zerosnacks Jul 10, 2025

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.

@zerosnacks zerosnacks requested a review from mattsse July 10, 2025 09:25
Copy link
Member

@yash-atreya yash-atreya left a 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,
Copy link
Member

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

Copy link
Member Author

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>,
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 221098e

@zerosnacks zerosnacks requested a review from mattsse July 10, 2025 09:58
@mattsse mattsse merged commit 4471728 into main Jul 10, 2025
15 checks passed
@mattsse mattsse deleted the zerosnacks/bump-revm-26.0.0 branch July 10, 2025 10:01
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.

3 participants