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

Max account nonce check #991

Closed
12 tasks
winsvega opened this issue Nov 19, 2021 · 1 comment
Closed
12 tasks

Max account nonce check #991

winsvega opened this issue Nov 19, 2021 · 1 comment

Comments

@winsvega
Copy link
Collaborator

winsvega commented Nov 19, 2021

In addition to what we already have:

  • transaction coming from account with maxNonce (should fail), maxNonce-1 (should work)

  • A delegate call B, B create/create2 contract A has maxNonce, B has maxNonce (create should fail)

  • A delegate call B, B create/create2 contract A has maxNonce-1, B has maxNonce (create should work)

  • A delegate call B, B create/create2 contract A has maxNonce-1, B has maxNonce - 1 (create should work)

  • A delegate call B, B create/create2 contract A has maxNonce, B has maxNonce - 1 (create should fail)

  • A call B, B create/create2 contract A has maxNonce, B has maxNonce (create should fail)

  • A call B, B create/create2 contract A has maxNonce-1, B has maxNonce (create should fail) (differs from delegatecall)

  • A call B, B create/create2 contract A has maxNonce-1, B has maxNonce - 1 (create should work)

  • A call B, B create/create2 contract A has maxNonce, B has maxNonce - 1 (create should work) (differs from delegatecall)

I think a bug might be in the cache where it does not expect code to be that large.
Such as state revert opeario. The state steps are getting huge with max code. and to revert them up to some point might trigger a bug.

  • A stores 1:1, A calls B, B create contracts with maxcodesize 10 times (no oog upto here), then B oogs the call. creations reverted. But A still stores 1:1 as it is the subcall that OOGed
  • A stores 1:1, A creates contracts with maxcodesize 5 times (success), A calls B, B create contracts with maxcodesize 10 times (no oog upto here), then B oogs the call. creations reverted. But A still stores 1:1 as it is the subcall that OOGed
  • A stores 1:1, A calls B, B create contracts with maxcodesize 10 times, A calls 5 newly created contracts to suicide themselves (clean the code from state but not all of it), check that suicided contracts has no code.

3 cases of above but with revert opcode at the end. telling to revert all the creations.

@marioevz
Copy link
Member

Test cases 2 through 9 will be covered by PR #989.
Test cases 10 through 12 will be covered by PR #992

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

No branches or pull requests

2 participants