Skip to content

Conversation

yash-atreya
Copy link
Contributor

@yash-atreya yash-atreya commented Jul 10, 2025

Motivation

Revm 27 introduces the InspectorHandler which overrides the Handler implementation.

Solution

  • Since foundry is always inspecting we can remove the vanilla Handler impl and only keep the InspectorHandler

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@yash-atreya yash-atreya changed the base branch from master to zerosnacks/bump-revm-26.0.0 July 10, 2025 07:27
@yash-atreya yash-atreya changed the title fix(evm): remove Handler impl for FoundryEvm fix(evm): remove Handler impl for FoundryHandler Jul 10, 2025
@yash-atreya yash-atreya marked this pull request as ready for review July 10, 2025 08:07
@yash-atreya yash-atreya merged commit ebe1b5d into zerosnacks/bump-revm-26.0.0 Jul 10, 2025
@yash-atreya yash-atreya deleted the yash/dedup-handlers branch July 10, 2025 08:08
@github-project-automation github-project-automation bot moved this to Done in Foundry Jul 10, 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>
@yash-atreya yash-atreya self-assigned this Jul 15, 2025
@grandizzy grandizzy moved this from Done to Completed in Foundry Jul 15, 2025
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.

1 participant