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

feat: add eip3074 integration test #30

Merged
merged 26 commits into from
Apr 18, 2024
Merged

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented Apr 2, 2024

Adds an integration test for the EIP-3074 instructions:

  • an AlphaNet node is created
  • two smart contracts are deployed:
    • SenderRecorder has a function to record msg.sender in storage
    • GasSponsorInvoker allows an EOA to call a separate contract using AUTH and AUTHCALL by receiving a commit and a signature from a separate authority EOA
  • an EOA without funds signs a commit
  • a separate EOA with funds interacts with GasSponsorInvoker to call the recorder function in SenderRecorder on behalf of the authority
  • the test verifies that the authority was recorded as sender in SenderRecorder

As part of the test development a few fixes were required in the instructions implementation:

  • The nonce used for the digest should be from the authority
  • AUTHCALL should read value_ext and verify that it is 0
  • All the gas should be forwarded to the subsequent call if gas_limit == 0

@fgimenez fgimenez force-pushed the fgimenez/eip3074-integration-test branch 2 times, most recently from a8d859c to 28dedcb Compare April 12, 2024 07:30
@fgimenez fgimenez force-pushed the fgimenez/eip3074-integration-test branch from 8290a6f to 76e0de3 Compare April 17, 2024 10:13
@fgimenez fgimenez force-pushed the fgimenez/eip3074-integration-test branch from e2386a1 to 4fca29a Compare April 17, 2024 18:50
@fgimenez fgimenez force-pushed the fgimenez/eip3074-integration-test branch from 460514e to d2d70ae Compare April 18, 2024 10:49
@fgimenez fgimenez force-pushed the fgimenez/eip3074-integration-test branch from 668a25d to c89e7f9 Compare April 18, 2024 18:26
@fgimenez fgimenez marked this pull request as ready for review April 18, 2024 18:59
@fgimenez fgimenez requested a review from Rjected as a code owner April 18, 2024 18:59
@fgimenez fgimenez requested a review from mattsse April 18, 2024 18:59
Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nice!
love the test!

pending @Rjected

Copy link
Contributor

Choose a reason for hiding this comment

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

this is pretty cool!

Copy link
Member

Choose a reason for hiding this comment

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

yeah this is great!

Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

nice! this is really clean, great work

Copy link
Member

Choose a reason for hiding this comment

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

yeah this is great!

@fgimenez fgimenez merged commit 10bcdde into main Apr 18, 2024
13 checks passed
@fgimenez fgimenez deleted the fgimenez/eip3074-integration-test branch April 18, 2024 19:47
fgimenez added a commit to fgimenez/alphanet that referenced this pull request Apr 22, 2024
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.

3 participants