-
Notifications
You must be signed in to change notification settings - Fork 392
feat(tests): EIP-7928 OOG edge cases for EIP-7702 delegations #1856
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
base: eips/amsterdam/eip-7928
Are you sure you want to change the base?
feat(tests): EIP-7928 OOG edge cases for EIP-7702 delegations #1856
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## eips/amsterdam/eip-7928 #1856 +/- ##
========================================================
Coverage 83.85% 83.85%
========================================================
Files 402 402
Lines 25105 25105
Branches 2287 2287
========================================================
Hits 21051 21051
Misses 3615 3615
Partials 439 439
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. π New features to boost your workflow:
|
jochem-brouwer
left a comment
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.
Two comments π π
| # Bob is a pre-deployed account with 7702 delegation to target_contract | ||
| bob = pre.deploy_contract( | ||
| nonce=1, | ||
| code=Spec7702.delegation_designation(target_contract), |
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.
I'm not sure how the test framework translates this, but if it tries to deploy a contract with the designated 7702 delegation pointer then this will not work (contract deployment will fail because it attempts to deploy 0xEF-prefixed code (see EIP-3541)
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.
The deployment goes through (we've done the same for the other tests). My understanding that this just adds to the pre-state before invoking EVM so its fine.
cc: @fselmo
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.
Ah right, yes this would work to generate the fixtures but it would fail on a live network (uv run execute remote)
| # Provide enough for intrinsic + pushes + Bob access, | ||
| # but not TargetContract | ||
| tx_gas_limit = ( | ||
| intrinsic_gas_cost + push_cost + bob_cold_cost + target_cold_cost - 1 |
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 test is almost similar to the previous one, right? The only difference is the gas limit of the tx and the expected BAL π€ I think those should be merged in one test (and it should be parametrized)
ebc749e to
6044b67
Compare
π docs: Changelog entry β¨ feat(tests): test_bal_7702_oog_at_target π₯’ nit: reduce gas stipend to zero β¨ feat: test_bal_7702_oog_at_authority π docs: Update 7702 OOG desc
2d2473d to
3c37b64
Compare
|
@raxhvl, we had a lot of changes this time that came from |
* fix(tests): fix invalid kwarg fails in 7702 `test_set_code_to_log` * docs: update and fix changelog
* fix(tests): fix invalid kwarg fails in 7702 `test_set_code_to_log` * docs: update and fix changelog
ποΈ Description
The PR adds two test cases targeting OOG scenarios when accessing 7702 delegation:
The overall goal is to ensure when an account access runs out of gas, it does not make it to BAL.
π Related Issues or PRs
N/A.
β Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.Cute Animal Picture