Skip to content

deps: bump alloy 2.4.0/1.6.1, revm 42.0.1, op-revm for reth 2.5.0 compat - #69

Merged
meyer9 merged 5 commits into
base-anvil-forkfrom
meyer9/bump-alloy-reth-2.5.0
Aug 19, 2026
Merged

deps: bump alloy 2.4.0/1.6.1, revm 42.0.1, op-revm for reth 2.5.0 compat#69
meyer9 merged 5 commits into
base-anvil-forkfrom
meyer9/bump-alloy-reth-2.5.0

Conversation

@meyer9

@meyer9 meyer9 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

base/base is upgrading to reth 2.5.0, which requires bumping its workspace alloy-* family to 2.3.0 (and alloy-primitives/alloy-sol-types to 1.6.1, alloy-evm to 0.38.0, revm to 42.0.1). The base-std-fork-tests.yml CI job in base/base patches base-common-precompiles/base-common-chains into this pinned base-anvil snapshot for the Cobalt fork-test matrix entry. Since those crates use revm.workspace = true / alloy-*.workspace = true, and this repo's committed Cargo.lock locks the older 1.x/41.x versions, Cargo's conservative resolver fails to reconcile the two, breaking the CI job (error: failed to select a version for alloy-primitives...).

This follows the same pattern as #55 (bump revm 41 / alloy-evm 0.37 for reth 2.4 compat): bump this repo's pinned deps to match, and unpin base/base's BASE_ANVIL_REF to this commit in a companion PR.

Changes

  • alloy-* 2.0.5 -> 2.4.0
  • alloy-primitives/alloy-sol-types/alloy-dyn-abi/alloy-json-abi/alloy-sol-macro-* 1.6.0 -> 1.6.1
  • op-alloy-* 0.24.0 -> 2.0.0
  • alloy-evm 0.37.0 -> 0.38.0
  • revm 41.0.0 -> 42.0.1, revm-inspectors 0.41.1 -> 0.42.2
  • op-revm switched to a direct git dependency on foundry-rs/optimism (the crate moved out of the standalone foundry-rs/op-revm repo into this monorepo), pinned to the same rev as the [patch.crates-io] entries for alloy-op-evm/op-alloy-*/alloy-op-hardforks
  • foundry-fork-db and tempo-primitives git pins bumped to revisions compatible with revm 42 (previous pins pulled stray older revm versions into the lockfile)

This exact version combination is validated against upstream foundry-rs/foundry's master branch, which already carries this dependency set.

Source fixes required by the resulting API breaks

  • revm-handler::Handler::last_frame_result gained a GasTracker parameter (crates/evm/core/src/evm.rs)
  • revm-interpreter::CreateOutcome gained charged_create_state_gas; switched all call sites to the new CreateOutcome::new(result, address) constructor (evm.rs, cheatcodes/inspector.rs, inspectors/stack.rs)
  • alloy-op-hardforks 0.5.0 removed OpHardfork::Interop in favor of Karst/Lagoon; updated the OpHardfork -> OpSpecId mapping and its test (crates/evm/core/src/hardfork.rs)
  • revm-context-interface::calculate_initial_tx_gas gained an EIP-2780 eip2780 parameter; passing None preserves prior semantics in this reporting-only gas recomputation (executors/mod.rs)
  • strum 0.28 renamed NamedChain::VARIANTS to NamedChain::VARIANT_NAMES (cli/opts/chain.rs, forge/cmd/cache.rs)
  • alloy-rpc-types-trace 2.4.1 added GethDebugBuiltInTracerType::StateGasTracer; bundled it into the existing "unsupported tracer" arms, matching upstream foundry-rs/foundry (anvil/eth/backend/mem/mod.rs)

Testing

cargo build --release --no-default-features --features anvil/cli -p anvil -p forge

builds cleanly, and both ./target/release/anvil --version / ./target/release/forge --version run successfully.

Draft while the companion base/base PR is put together and this gets a look from a maintainer.

Bumps the alloy-* family (2.0.5 -> 2.4.0, alloy-primitives/alloy-sol-types
1.6.0 -> 1.6.1), alloy-evm 0.37.0 -> 0.38.0, and revm 41.0.0 -> 42.0.1 to
match the dependency set required by base/base's reth 2.5.0 upgrade.

op-revm moved from the standalone foundry-rs/op-revm repo into the
foundry-rs/optimism monorepo (rust/op-revm); switched to a direct git
dependency at foundry-rs/optimism@566d19e, matching the [patch.crates-io]
pins for alloy-op-evm/op-alloy-*/alloy-op-hardforks. Also bumped
foundry-fork-db and tempo-primitives pins to revisions compatible with
revm 42, since the previous pins pulled stray older revm versions into
the lockfile.

Version combination validated against upstream foundry-rs/foundry's
master branch Cargo.toml, which already carries this exact dependency
set.

Source changes required by the resulting API breaks:
- revm-handler: Handler::last_frame_result gained a GasTracker parameter
  (crates/evm/core/src/evm.rs)
- revm-interpreter: CreateOutcome gained charged_create_state_gas; switch
  all call sites to the new CreateOutcome::new(result, address)
  constructor (evm.rs, cheatcodes/inspector.rs, inspectors/stack.rs)
- alloy-op-hardforks 0.5.0 removed OpHardfork::Interop in favor of
  Karst/Lagoon; update the OpHardfork -> OpSpecId mapping and its test
  (crates/evm/core/src/hardfork.rs)
- revm-context-interface: calculate_initial_tx_gas gained an EIP-2780
  eip2780 parameter; pass None to preserve prior semantics in the
  reporting-only gas recomputation (executors/mod.rs)
- strum 0.28 renamed NamedChain::VARIANTS to NamedChain::VARIANT_NAMES
  (cli/opts/chain.rs, forge/cmd/cache.rs)
- alloy-rpc-types-trace 2.4.1 added GethDebugBuiltInTracerType::StateGasTracer;
  bundle it into the existing 'unsupported tracer' arms, matching
  upstream foundry-rs/foundry (anvil/eth/backend/mem/mod.rs)

Verified anvil and forge build and run (--version) with:
  cargo build --release --no-default-features --features anvil/cli -p anvil -p forge
base/base#4390 (reth 2.5.0 upgrade) has merged to main, which bumped
alloy-genesis and added a bogota_time field to ChainConfig literals in
base-common-chains. The previously pinned base/base commit predates that
change and fails to compile against this repo's now-newer alloy-genesis
version (missing-field E0063 on ChainConfig).

Repoint crates/evm/networks/Cargo.toml at base/base main HEAD
(cea79451170a576cd9fd7d8189b660daceb45001), via ./script/bump-base.sh main.

Verified: cargo build --release -p anvil -p forge succeeds, both binaries
run --version successfully.
meyer9 added a commit to base/base that referenced this pull request Aug 18, 2026
base-anvil's pinned alloy/revm deps (locked in its Cargo.lock) conflicted
with base/base's workspace alloy 2.3.0 / revm 42 bump from #4390 (now on
main), since the fork-tests job patches base-common-precompiles/base-common-chains
(which use workspace-inherited alloy-*/revm deps) into the pinned
base-anvil snapshot. Point the Cobalt matrix entry at
base/base-anvil@33efc584 (base/base-anvil#69), which bumps base-anvil's
pinned deps to the alloy 2.4.0/1.6.1, revm 42.0.1 combination validated
against upstream foundry-rs/foundry's master branch, and repoints its own
base/base pin at main HEAD (post-#4390) to pick up the bogota_time
ChainConfig field.

The Beryl entry is untouched -- it is a separate, fully retired
historical pin unrelated to this change.
meyer9 added 3 commits August 18, 2026 14:12
The alloy 2.4.0 bump pulls in a newer evmole (via cast), which now
depends on minicbor v2.3.0, licensed BlueOak-1.0.0 (OSI-approved
permissive license). Allow it in deny.toml, matching upstream
foundry-rs/foundry's deny.toml which already allows this license.

Verified: cargo deny --all-features check all now reports
'licenses ok' (previously failed with license-rejected).
Two issues surfaced only under CI's clippy job (which runs with
RUSTFLAGS=-Dwarnings, unlike a plain cargo build):

- crates/cli and crates/forge declared a direct 'strum' dependency that
  became unused once NamedChain::VARIANTS was renamed to
  NamedChain::VARIANT_NAMES (a strum 0.28 rename, re-exported via
  alloy-chains) and the 'use strum::VariantNames' import was dropped.
  Removed the now-unused dependency from both crates' Cargo.toml,
  matching upstream foundry-rs/foundry, which does not declare strum in
  either crate.
- The alloy/revm bump pulled a newer transitive 'time' crate (0.3.47 ->
  0.3.55), crossing the version where 'format_description::parse' was
  deprecated in favor of 'format_description::parse_borrowed::<VERSION>'.
  Switched crates/chisel/src/session.rs to parse_borrowed::<1>, which is
  exactly what the deprecated function forwarded to internally, so
  behavior is unchanged.
clap 4.6 renders [alias: X] (singular) instead of [aliases: X] when a
flag has exactly one alias. Update the -j/--threads help snapshots in
forge and cast to match.
@meyer9
meyer9 marked this pull request as ready for review August 18, 2026 22:34
@meyer9
meyer9 requested review from chunter-cb and refcell August 18, 2026 22:35
@meyer9
meyer9 merged commit 9df661b into base-anvil-fork Aug 19, 2026
20 checks passed
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.

2 participants