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

EOF CREATE3 test vectors #1205

Open
gumb0 opened this issue Apr 5, 2023 · 0 comments
Open

EOF CREATE3 test vectors #1205

gumb0 opened this issue Apr 5, 2023 · 0 comments

Comments

@gumb0
Copy link
Member

gumb0 commented Apr 5, 2023

Validation

Valid cases

Container format
  • Container with one container section.
  • Container with multiple container sections.
  • Container with maximum number (255) container sections.
Instructions
  • Code section with CREATE3 referring to container section 0, 1, 255.
  • Code section with RETURNCONTRACT referring to container section 0, 1, 255.

Invalid cases

Invalid container format
  • Truncated container section header
  • Container secton header with 0 elements.
  • Container section with size 0.
  • Container section out of order (before code section, after data section).
  • Container section body missing.
Invalid instructions
  • Truncated CREATE3 without immediate.
  • Truncated RETURNCONTRACT without immediate.
  • RJUMP/RJUMPI/RJUMPV into immediate byte of CREATE3
  • RJUMP/RJUMPI/RJUMPV into immediate byte of RETURNCONTRACT
  • CREATE3 as last instruction in code section.
  • Code section with CREATE3 referring to non-existing container section.
  • Code section with RETURNCONTRACT referring to non-existing container section.
  • Unreachable instructions after RETURNCONTRACT

Execution

Success cases

  • CREATE3 with container section 0, 1, 255
  • RETURNCONTRACT with container section 0, 1, 255
  • CREATE3 with empty input data
  • CREATE3 with non-empty input data
  • RETURNCONTRACT with empty aux data
  • RETURNCONTRACT with non-empty aux data
  • REVERT in initcode with empty return data
  • REVERT in initcode with non-empty return data
  • CREATE3 transferring value
  • CREATE3 with the same container but different salt values - check that generated address is different
  • CREATE3 with the same container and salt but different input data - check that generated address is different

Error cases

  • Initcontainer is invalid
  • Exceptional abort during initcontainer execution
  • RETURN during initcontainer execution
  • STOP during initcontainer execution
  • Returned container has invalid format
  • Appending aux_data to returned container results in size above 24K
  • Container is invalid after aux_data concatenation
  • CREATE3 in legacy code aborts execution
  • RETURNCONTRACT in legacy code aborts execution
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

1 participant