fix: gas cost calculation in eip-3860#159
Merged
sorpaas merged 3 commits intorust-ethereum:masterfrom Apr 18, 2023
Merged
Conversation
sorpaas
approved these changes
Mar 28, 2023
Contributor
Author
|
The rust toolchain version was on 1.64 but one of the dependencies must have updated to a newer Rust version (with breaking if-let statements) without bumping the major version, I suspect, so that caused CI to fail here. I bumped the Rust version to 1.68.2 in the |
Contributor
Author
|
There were still a bunch of unrelated clippy lints (assuming that came from the update). I fixed those now. Can we retry @sorpaas? |
vimpunk
commented
Mar 31, 2023
| assert_eq!(Wrapping(i8::MIN) / Wrapping(-1), Wrapping(i8::MIN)); | ||
| assert_eq!(i8::MIN / 1, i8::MIN); | ||
| assert_eq!(i8::MAX / 1, i8::MAX); | ||
| assert_eq!(i8::MAX / -1, -i8::MAX); |
Contributor
Author
There was a problem hiding this comment.
I'm not a 100% sure it's okay to remove these but clippy was complaining that they had no effect.
Contributor
There was a problem hiding this comment.
I'm curious about the point of these lines 😄
mattsse
added a commit
to mattsse/evm
that referenced
this pull request
Jan 17, 2026
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
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.
The gas calculation for the initcode analysis introduced in EIP-3860 contained a bug in that it did not round up the code size to the nearest 32-byte word multiple.
The evm-tests repo has been updated with the most recent Ethereum tests for Shanghai: rust-blockchain/evm-tests#19.
FYI, there are more test failures for the Shanghai changes, this was just one of the bugs I could find. I'll send fixes for the other bugs as separate PRs.