Skip to content

fix(tests): EIP-7702: send tx of eoa after setcode tx is mined #1411

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

Merged

Conversation

sonhv0212
Copy link
Contributor

πŸ—’οΈ Description

Currently, the test test_eoa_tx_after_set_code is including both setcode tx that sets code for an EOA and tx using EOA as sender in same block. However, it is invalid due to changes introduced in this PR ethereum/go-ethereum#31430. When I try to run this test in execute mode, the second tx is rejected with the error gapped-nonce tx from delegated accounts

Here is my solution to fix it:

  • I split txs into two blocks; the first includes setcode tx that set code for an EOA, and the second is the tx from that EOA
  • We need to ensure txs of two different blocks must be included in different block as their order in node, so I refactored TransactionPost a little bit to send batches of txs by block.

@sonhv0212 sonhv0212 force-pushed the fix/eip7702-test-eoa-after-setcode branch from e2f83b3 to 61af666 Compare April 8, 2025 10:17
@sonhv0212
Copy link
Contributor Author

cc @marioevz , seems that you're the author of this test case. Can you help me verify this?
Thank you!!! πŸ˜„

@sonhv0212 sonhv0212 force-pushed the fix/eip7702-test-eoa-after-setcode branch from 61af666 to 45aaf92 Compare April 8, 2025 10:19
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for these changes, I think it's a good idea to make this distinction.

I added a parametrization to fill the same test as it existed before this PR, whilst skipping it for execute, and the new variant you introduced.

@marioevz marioevz merged commit efc39d5 into ethereum:main Apr 8, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants