-
Notifications
You must be signed in to change notification settings - Fork 181
✨ feat(tests): EIP-7928 test cases for EIP-7702 transactions #2212
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
Conversation
We should rebase this and fix the lint errors. Do you think these tests deserve their own file as well? I don't mind it for 7702 but I'd rather take a step back and see how we want to organize them so there aren't only a few per file and many files. |
13eaf46
to
184d5d7
Compare
tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py
Outdated
Show resolved
Hide resolved
tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py
Show resolved
Hide resolved
I feel 7702 test cases would need a separate file. Say we create a new file if we hit > 500 LOC? Any other method for organization in mind? I lean towards smaller files. Would you know if is there a perf hit for splitting files? Another idea: #2167 (comment) I rebased on main. |
0810b37
to
907a64b
Compare
🧹 chore: Update test case ✨ feat(tests): test_bal_7702_invalid_chain_id_authorization ✨ feat(tests): test_bal_7702_invalid_nonce_authorization ✨ feat(tests): test_bal_7702_delegated_storage_access ✨ feat(tests): test_bal_7702_delegation_clear ✨ feat(tests): test_bal_7702_delegation_update ✨ feat(tests): test_bal_7702_delegation_create
907a64b
to
f88b604
Compare
@raxhvl I'm good with 7702 having its own file. At least for now. We should wait until this PR is reviewed by Toni and merged but can you make sure that this looks good on your end? It looks good to me but please review the last two commits here as a sanity check. I added the test case for calling a delegated address from all call opcodes because I had a hunch this was also not working right still and I made some updates to the specs side (what we should wait for to merge there). All tests now pass with those changes for me. I am holding off on approving only because I want to prevent merging until the specs are updated and merged so we can point the resolver to the updated hash there and get the correct logic for these 7702 tests to actually fill. |
c1599e2
to
a73376d
Compare
I think we get this one settled and then we can rebase #2116, remove duplicates, do one last pass there and hopefully get that merged pretty quickly after this. |
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.
LGTM! Pointed this to the updated specs and all tests are filling as they should. Nice work 👌🏼
🗒️ Description
test_bal_7702_delegation_create
- Ensure BAL captures creation of EOA delegationtest_bal_7702_delegation_update
- Ensure BAL captures update of existing EOA delegationtest_bal_7702_delegation_clear
- Ensure BAL captures clearing of EOA delegationtest_bal_7702_delegated_storage_access
- Ensure BAL captures storage operations when calling a delegated EIP-7702 account.test_bal_7702_invalid_nonce_authorization
- Ensure BAL handles failed authorization due to wrong nonce.test_bal_7702_invalid_chain_id_authorization
- Ensure BAL handles failed authorization due to chain id.✅ Checklist
tox
checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
type(scope):
.