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

Clarify EXTCODESIZE of EOF container mid-creation #126

Closed
chfast opened this issue Jun 6, 2024 · 2 comments · Fixed by #128
Closed

Clarify EXTCODESIZE of EOF container mid-creation #126

chfast opened this issue Jun 6, 2024 · 2 comments · Fixed by #128
Assignees

Comments

@chfast
Copy link
Member

chfast commented Jun 6, 2024

I'm getting empty contract results from all EXTCODE* opcodes when called to a EOF container mid-creation, which I guess makes sense because the container is not there yet so technically it should still return empty.

Maybe only this should be explicitly specified? @shemnon @chfast @gumb0

Originally posted by @marioevz in ethereum/execution-spec-tests#601 (comment)

@shemnon
Copy link
Contributor

shemnon commented Jun 7, 2024

This is how it behaves for legacy. Do we want to change it for EOF? It requires EOF/Legacy calls. And the spec would be a clarification and not a special case - "Like Legacy Initcode, the contract code of an EOF create is empty during an initcall, so EXTCODE* operations from a legacy contract will see zero-length code"

@chfast
Copy link
Member Author

chfast commented Jun 10, 2024

I think we just should clarify that an "EOF container mid-creation" looks like an account without code (i.e. a legacy account).

The alternative to pretend the account has EOF code (i.e. report "EF00" as the code) is no-go because there is no guarantee that the EOF account will be actually created (creation can fail for multiple reasons). So the account may remain empty after creation.

@pdobacz pdobacz self-assigned this Jun 10, 2024
pdobacz added a commit that referenced this issue Jun 10, 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 a pull request may close this issue.

3 participants