Skip to content

Conversation

yash-atreya
Copy link
Contributor

Motivation

The revm bump includes breaking changes to block_timestamp and block_number. They have been changed from u64 to U256.

This change was applied in EvmOpts

Solution

However, the Config still retained the u64 type which was causing a failure in config extraction using figment because it has type mismatch with EvmOpts .

  • Changes the block_timestamp and block_number to be U256 in Config
  • Adds a deser helper to deserialize u64 to U256, prevent foundry.toml breaking change.

Prior to this change 131 tests were failing

cargo nextest run -p forge --no-fail-fast --all-features
Summary [ 566.329s] 560 tests run: 429 passed (2 slow, 2 flaky), 131 failed, 15 skipped

Now:

cargo nextest run -p forge --no-fail-fast --all-features
Summary [ 462.382s] 560 tests run: 547 passed (2 slow, 1 flaky), 13 failed, 15 skipped

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@yash-atreya yash-atreya marked this pull request as ready for review July 2, 2025 12:19
Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks!! Good find

@zerosnacks zerosnacks merged commit 442c3bf into zerosnacks/bump-revm-26.0.0 Jul 2, 2025
8 of 21 checks passed
@zerosnacks zerosnacks deleted the yash/fix-config-mismatch-revm27 branch July 2, 2025 12:21
@github-project-automation github-project-automation bot moved this to Done in Foundry Jul 2, 2025
@yash-atreya yash-atreya self-assigned this Jul 8, 2025
@grandizzy grandizzy moved this from Done to Completed in Foundry Jul 8, 2025
yash-atreya added a commit that referenced this pull request Jul 15, 2025
* bump revm, pending alloy-evm alloy-rs/evm#100, pending foundry-fork-db

* bump alloy-evm, foundry-fork-db

* bump deps

* apply alloy-evm fix

* start porting types

* unpin revm-inspectors

* fix issues

* continue preperation

* .control field was removed

* frame_return_result now needs to happen in bigger run_exec_loop block

* update handler and inspector per latest changes removing previous methods

* add new frame loop

* pass in frame

* fix transact_raw

* continue fixes

* apply will_exit, on continue should skip as it is none, on exit (any ok, revert or error) we exit

* continue clean up, some attention points in regards to InstructionResult::Continue

* continue porting

* continue porting

* temporarily use hardcoded BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE

* remove clamping now that revm supports U256 internally for number and timestamp

* fix clippy

* fix doctest

* bump alloy version

* make assertion on `bytecode`

* revert bytecode(), fix to come in upcoming release

* bump revm 27

* fix debug

* revert Cargo.toml change

* clean up

* fix(`config`): block_timestamp and block_number mismatch in Config and EvmOpts (#10903)

* fix clippy

* fix(`anvil/test`): change delegatecall.value in test_call_ots_trace_transaction

* bump revm: 27.0.2

* apply clippy fixes

* fix fmt

* fix config defaults

* fix config change of block_number, block_timestamp require hex formatting

* fix(`evm`): create2 in InspectorHandler and trace decoder for None status (#10925)

* fix: handler CREATE2 override in InspectorHandler

* fix: account for trace.status: None - this is due to removal of InstructionResult::Continue

* fix(`forge/test`): update test fixture: can_run_test_with_json_output_verbose - as trace.status can be null and trace.success can be false due to removal of InstructionResult::Continue

* fix(`forge/test`): repro 6501 - account for success being false due to status being None

* fix(`evm/inspectors`): prevent panic in should_revert_on_address_opcode (#10940)

* fix(`evm/inspectors`): prevent panic by checking interp.action.is_some - fixes: should_revert_on_address_opcode

* undo step removal

* fix merge conflict

* fix(`evm`): enable tx_chain_id_check (#10943)

* use dynamic blob_base_fee_update_fraction selection based on hardfork set

* bump alloy-chains version w/ foundry-fork-db

* fix: fork errors getting overriden by RevertDiagnostic inspector (#10954)

* fix: fork revert diagnostic

* feat(`cheatcodes`): introduces `ForkRevertDiagnostic`

* patch revm to include fix for `call_end` not being called

* fix: can_run_test_with_json_output_verbose

* Revert "fix: fork errors getting overriden by RevertDiagnostic inspector (#10954)"

This reverts commit b74f48a.

* fix(`cast`): disable balance check for impersonated txs. (#10972)

fix(`cast/test`): disable balance check for impersonated tx

* Revert "fix(`anvil/test`): change delegatecall.value in test_call_ots_trace_transaction"

This reverts commit 6db3d97.

* fix(`evm`): remove Handler impl for `FoundryHandler` (#10975)

* fix(`evm`): Handler impl for FoundryEvm

* cleanup

* fmt

* bump foundry-fork-db 0.16, fix tests

* bump alloy

* unify blob_base_fee_update_fraction in helper, clarify exception

* move helpers to evm-core for blob_base_fee_update_fraction

* Update mod.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* unpatch revm, update to 27.0.3

* fix fmt

* revert to solar 1.4, waiting for upgrade PR

* bump alloy-evm / alloy-op-evm

* forcibly downgrade solar-config, solar-macros due to breaking change in 0.1.5

* feat(`revm bump`): add serialization method that serializes as `u64` if fits or `U256` if not (#11008)

* add serialization method that serializes as u64 if fits or u256 if not

* clean up, no longer a need for 0x1

* toml spec limits number representation to i64

---------

Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

2 participants