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

Support code delegations when purging confirmed blocks in the layered txpool #8018

Merged

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Dec 11, 2024

PR description

When an EIP-7702 transaction is confirmed, we need to look at its code delegations and extract the nonce for the authority and use that information to purge pending transaction in the txpool, like we do for the senders of all the confirmed txs.

Fixed Issue(s)

fixes #7985

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 force-pushed the txpool-confirmed-block-7702-management branch from f7f0833 to 9442e4c Compare December 11, 2024 17:21
@fab-10 fab-10 changed the title Support code delegations when purging confirmed blocks in the layered… Support code delegations when purging confirmed blocks in the layered txpool Dec 11, 2024
@fab-10 fab-10 marked this pull request as ready for review December 11, 2024 17:28
@fab-10 fab-10 force-pushed the txpool-confirmed-block-7702-management branch 3 times, most recently from 3f11111 to eaea960 Compare December 17, 2024 11:48
@fab-10 fab-10 force-pushed the txpool-confirmed-block-7702-management branch from eaea960 to 2e66fa6 Compare January 7, 2025 13:53
@@ -430,7 +430,7 @@ public interface MemorySize {
int ACCESS_LIST_ENTRY_SHALLOW_SIZE = 248;
int OPTIONAL_ACCESS_LIST_SHALLOW_SIZE = 40;
int OPTIONAL_CODE_DELEGATION_LIST_SHALLOW_SIZE = 40;
int CODE_DELEGATION_ENTRY_SIZE = 472;
int CODE_DELEGATION_ENTRY_SIZE = 520;
Copy link
Contributor

Choose a reason for hiding this comment

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

The chain id of the authorisation tuple has recently been changed from uint64 to uint256. Does the size need to be changed because of that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the estimation trades the accuracy for speed, so the chainId is estimated on the base it is a long, which is true for named networks and probably in most of the other cases, so I think we can keep this estimation, also because for a EIP-7702 tx to be in the pool the chainIds in the authorization tuple must be 0 or match the networkId.

@fab-10 fab-10 force-pushed the txpool-confirmed-block-7702-management branch from 2e66fa6 to 4fea3c7 Compare January 10, 2025 09:53
@fab-10 fab-10 enabled auto-merge (squash) January 10, 2025 09:53
@fab-10 fab-10 merged commit 0698734 into hyperledger:main Jan 10, 2025
43 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.

Add support for EIP-7702 transactions to the txpool
2 participants