Skip to content

feat(tests): Additional EIP-7702 cases: #1400

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

Closed
wants to merge 1 commit into from

Conversation

fselmo
Copy link
Contributor

@fselmo fselmo commented Apr 4, 2025

🗒️ Description

  • Test a chained delegation stops after one hop (does not delegate to an address that is itself delegated)
    • I believe this is already covered by the pointer_to_pointer test. It's a bit hard to tell what that test intends to test, but it does effectively test the same case
  • Test delegation to an initially-empty address that later has bytecode deployed to it. This tests before and after and makes sure once code is present, it successfully delegates to the deployed code.

🔗 Related Issues

#1299

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.


@pytest.mark.valid_from("Prague")
@pytest.mark.parametrize("chain_id", [0, 1])
def test_chained_delegation_stops_after_one_hop(
Copy link
Contributor Author

@fselmo fselmo Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is the same test case as pointer_to_pointer state test, though the state test does not have a control. I think that's fine. Should I remove this or merge them somehow?


edit: The OOG comment in the docstring throws me off a bit in the pointer_to_pointer test. Not sure if it expects the loop contract to trigger and lead to OOG or test that it doesn't trigger, in which case isn't that testing a no-op?

@fselmo fselmo force-pushed the eip7702-test-additions branch 2 times, most recently from c3fb63f to c052467 Compare April 4, 2025 22:00
@fselmo fselmo mentioned this pull request Apr 4, 2025
33 tasks
@fselmo fselmo force-pushed the eip7702-test-additions branch 2 times, most recently from 0e508c3 to 7461fcf Compare April 4, 2025 22:29
@fselmo fselmo added scope:tests Scope: Changes EL client test cases in `./tests` type:chore Type: Chore labels Apr 4, 2025
@fselmo fselmo changed the title Additional EIP-7702 cases: chore(tests): Additional EIP-7702 cases: Apr 4, 2025
@fselmo fselmo changed the title chore(tests): Additional EIP-7702 cases: feat(tests): Additional EIP-7702 cases: Apr 4, 2025
@fselmo fselmo added type:feat type: Feature and removed type:chore Type: Chore labels Apr 4, 2025
@fselmo fselmo force-pushed the eip7702-test-additions branch 2 times, most recently from ceea2e4 to 7c80f36 Compare April 5, 2025 01:44
- Test a chained delegation stops after one hop (does not delegate to and
  address that is itself delegated).
- Test delegation to an initially-empty address that later has bytecode
  deployed to it, making sure delegation to the newly deployed code
  succeeds.
@fselmo fselmo force-pushed the eip7702-test-additions branch from 7c80f36 to d433502 Compare April 5, 2025 17:34
@fselmo fselmo removed the type:feat type: Feature label Apr 8, 2025
@fselmo fselmo closed this Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:tests Scope: Changes EL client test cases in `./tests`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant