-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(revm bump
): add serialization method that serializes as u64
if fits or U256
if not
#11008
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
zerosnacks
merged 4 commits into
zerosnacks/bump-revm-26.0.0
from
zerosnacks/bump-revm-26.0.0-serialize-to-u64-if-fits-or-u256
Jul 15, 2025
Merged
feat(revm bump
): add serialization method that serializes as u64
if fits or U256
if not
#11008
zerosnacks
merged 4 commits into
zerosnacks/bump-revm-26.0.0
from
zerosnacks/bump-revm-26.0.0-serialize-to-u64-if-fits-or-u256
Jul 15, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 tasks
@DaniPopes / @yash-atreya do you have any ideas how we could fix the deserialization issue with values close to |
yash-atreya
approved these changes
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this lgtm!
yash-atreya
reviewed
Jul 15, 2025
…26.0.0-serialize-to-u64-if-fits-or-u256
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 <[email protected]> * 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 <[email protected]> Co-authored-by: DaniPopes <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We currently allow users to specify as:
but serialize (when running
forge config
) / work internally with:which is difficult to read / not in a format users regularly encounter when looking at a block explorer
Solution
We have a serialization method that attempts to fit the number in a
u64
, else serializing inU256
per suggestion by @DaniPopes in #10838 (comment)foundry.toml
set as:serializes as:
foundry.toml
set as:serializes as:
foundry.toml
set as (u64::max):serializes as:
foundry.toml
set as (u64::max + 1):serializes as:
PR Checklist