ipsilon / eof

Validation code for the EOF specification
Apache License 2.0
31 stars 15 forks source link

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

Open chfast opened 3 months ago

shemnon commented 3 months ago

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

Or add flags to the call for error handling

Arguments against:

pdobacz commented 3 months ago

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 commented 3 months ago

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.

chfast commented 2 months ago

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

Originally posted by @shemnon in https://github.com/ethereum/pm/issues/1077#issuecomment-2183431430

frangio commented 2 months ago

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 commented 1 week ago

should we close this in favor of https://github.com/ethereum/EIPs/pull/8838 ?