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

Update EIP-7761: Change HASCODE to EXTCODETYPE #9229

Merged
merged 7 commits into from
Jan 23, 2025

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Jan 9, 2025

Change the EIP to return the type of the account (EOA, Legacy Code, EOFv1 code) instead of a boolean has/no code.

Expand upon these decisions in the rationale and motivation.

ATTENTION: ERC-RELATED PULL REQUESTS NOW OCCUR IN ETHEREUM/ERCS

--

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md

We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

Change the EIP to return the type of the account (EOA, Legacy Code, EOFv1 code) instead of a boolean has/no code.

Expand upon these decisions in the rationale and motivation.
@github-actions github-actions bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Jan 9, 2025
@eth-bot
Copy link
Collaborator

eth-bot commented Jan 9, 2025

✅ All reviewers have approved.

@eth-bot eth-bot changed the title Change HASCODE to EXTCODETYPE Update EIP-7761: Change HASCODE to EXTCODETYPE Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

The commit aa8f602 (as a parent of 79737db) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jan 9, 2025
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jan 9, 2025
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved
EIPS/eip-7761.md Outdated Show resolved Hide resolved

One potential solution to this would be to have a generalized `CONTRACT_KIND` instruction instead of `HASCODE` which would further discriminate the account into legacy or EOFv1 with a `0` / `1` / `2` return value, thereby providing means for an additional safeguard against such a scenario.
In parallel to the ERC-721 / ERC-1155 problem, another potential risk has been brought to attention. Since EOFv1 prohibits `EXTDELEGATECALL` targeting legacy contracts, there exists a scenario where an EOF proxy contract accidentally upgrades its implementation to a legacy EVM one. Since reverting this or upgrading again (using current proxy standards) requires the implementation contract to be called, it would effectively render the contract unusable.
Copy link
Member

Choose a reason for hiding this comment

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

Imho this explanation would be nice to have in Motivation

Copy link
Contributor Author

@shemnon shemnon Jan 23, 2025

Choose a reason for hiding this comment

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

It is in the motivation, line 25, just not with the full technical drill down.

shemnon and others added 4 commits January 23, 2025 13:32
Co-authored-by: Andrei Maiboroda <[email protected]>
Co-authored-by: Andrei Maiboroda <[email protected]>
Co-authored-by: Andrei Maiboroda <[email protected]>
Co-authored-by: Andrei Maiboroda <[email protected]>
@shemnon shemnon marked this pull request as ready for review January 23, 2025 20:37
@shemnon shemnon requested a review from eth-bot as a code owner January 23, 2025 20:37
@eth-bot eth-bot enabled auto-merge (squash) January 23, 2025 20:38
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit d5ee6dd into ethereum:master Jan 23, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-update Modifies an existing proposal s-draft This EIP is a Draft t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants