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

EIP-7702: devnet-4 changes #7809

Merged
merged 51 commits into from
Dec 3, 2024
Merged

EIP-7702: devnet-4 changes #7809

merged 51 commits into from
Dec 3, 2024

Conversation

daniellehrner
Copy link
Contributor

PR description

  • Warm target of delegated account if a delegated account is the transaction destination
  • restrict authorization nonce to 2**64 -1
  • fix gas calculation for code delegation resolution if target is precompile
  • verify auth nonce less than 2**64-1 during auth processing
  • auth to zero address deletes delegation
  • auth to precompile returns empty code
  • auth nonce < 2**8
  • increase auth base cost to 12500

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

daniellehrner and others added 30 commits October 2, 2024 16:07
… nonce to 2**64-1

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
…compile always as warm account when resolving code

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* auth to zero address deletes delegation
* auth to precompile returns empty code
* auth nonce < 2**8
* increase auth base cost to 12500

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>

don't return request type in getPayload result

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
…equests

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
… rebase

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
…ve specific processors

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
jframe and others added 12 commits October 17, 2024 16:43
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
@daniellehrner daniellehrner mentioned this pull request Oct 24, 2024
4 tasks
@daniellehrner daniellehrner marked this pull request as ready for review November 25, 2024 15:22
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Copy link
Contributor

@Matilda-Clerke Matilda-Clerke left a comment

Choose a reason for hiding this comment

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

LGTM but I'm not familiar with this code or the required changes for devnet-4, so leaving unapproved for now

@@ -89,6 +94,22 @@ private void processAuthorization(
return;
}

if (codeDelegation.nonce() == MAX_NONCE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (codeDelegation.nonce() == MAX_NONCE) {
if (codeDelegation.nonce() >= MAX_NONCE) {

Would make more sense to me, given the trace log this causes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That check is a bit confusing, but is correct. nonce is a long and MAX_NONCE (which is 2^64-1) is the maximum value that a long can be. So nonce can never be greater than MAX_NONCE, because it would overflow to 0 in that case.

@daniellehrner daniellehrner enabled auto-merge (squash) December 3, 2024 10:29
@daniellehrner daniellehrner merged commit 07637cf into main Dec 3, 2024
43 checks passed
@daniellehrner daniellehrner deleted the pectra-devnet-4 branch December 3, 2024 10:51
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.

4 participants