Skip to content
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

fix: check for gas limit overflow #711

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Oct 8, 2024

When initiating a child context for CALL-like ops, we do not check if the gas limit is smaller than the parent context's, and more specifically we don't even check if the value specified fits in a u32 (our assumption for gas-costs), which yields an IntegerTooLarge error triggered when exiting the kernel.

This is testable with txn 44 of block 2841 (the last STATICCALL has a gas arg of 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67), added as regression test.

5.5/N @praetoriansentry

@Nashtare Nashtare self-assigned this Oct 8, 2024
@Nashtare Nashtare added this to the Testing and Validation milestone Oct 8, 2024
@github-actions github-actions bot added crate: trace_decoder Anything related to the trace_decoder crate. crate: evm_arithmetization Anything related to the evm_arithmetization crate. labels Oct 8, 2024
@Nashtare Nashtare merged commit 34307b4 into develop Oct 9, 2024
20 checks passed
@Nashtare Nashtare deleted the fix/gas_limit_overflow branch October 9, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate. crate: trace_decoder Anything related to the trace_decoder crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants