-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Conversation
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.
✅ All reviewers have approved. |
The commit aa8f602 (as a parent of 79737db) contains errors. |
|
||
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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]>
There was a problem hiding this 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...
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: