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

Extended EXT*CALL return codes: detect account without code #117

Open
chfast opened this issue May 22, 2024 · 6 comments
Open

Extended EXT*CALL return codes: detect account without code #117

chfast opened this issue May 22, 2024 · 6 comments

Comments

@chfast
Copy link
Member

chfast commented May 22, 2024

No description provided.

@shemnon
Copy link
Contributor

shemnon commented May 29, 2024

Current codes as speced:

0 - success
1 - failure in called code (ex: REVERT)
2 - failure in EVM call (ex: OOG)

Possible alternative

1 - success from code
2 - success, no code

128 - failure in code (REVERT, et al.)
129 - failure in EVM (OOG in call et.al.)

EXTCALL xxxx
RJUMPI [error]

vs.

EXTCALL xxx
PUSH1[127]
GT
RJUMPI [errpr]

Or restore EXTCODESIZE or something similar

Or Ban all EXTCALLS outside of EOF

  • but then you cannot send Eth to EOAs
  • Then we can add PAY opcode to cover
    • PAY opcode has some client restrictions

Or add flags to the call for error handling

  • A flag that will error if no code is executed
  • some other flags as needed

Arguments against:

  • This is soft Code introspection and shouldn't be done
  • AA will be moving EOAs to have code

@pdobacz
Copy link
Member

pdobacz commented Jun 5, 2024

Current codes as speced:

FYI I edited this note, REVERT comes at code 1 now. I also swapped the proposed 128/129 to match.

@pdobacz
Copy link
Member

pdobacz commented Jun 6, 2024

Per EOF impleneters call 49: No action to be taken for the reasons noted here. If necessary, Solidity to make a stronger request for it.

@pdobacz pdobacz closed this as completed Jun 6, 2024
@chfast
Copy link
Member Author

chfast commented Jun 23, 2024

Revisit EXT*CALL returncodes - onReceived must be able to distinguish successful calls

Originally posted by @shemnon in ethereum/pm#1077 (comment)

@frangio
Copy link

frangio commented Jun 24, 2024

Has it been considered to just return 0/1 from *CALL and have separate opcode to get the status code of the last call? This would allow to keep the shorter sequence *CALL RJUMPI.

@pdobacz
Copy link
Member

pdobacz commented Sep 9, 2024

should we close this in favor of ethereum/EIPs#8838 ?

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

4 participants