-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
EVM opcode: designated invalid instruction #141
Comments
Do you want the VM to halt in an invalid instruction state or an invalid jump state? (The only other current choice is out of gass.) Or do want a new behavior entirely? I'd like a designated invalid instruction for other reasons, but it would behave like any other invalid instruction. I would also like an instruction I've been calling BREAKOUT which tells the EVM that what follows is code for some other VM. This seems more like what you need, but we would need a mechanism for finding that other VM. |
This issue didn't intend to introduce any new behaviour, just codify that |
I don't think we actually need that, but probably this belongs more to the evm2.0 discussions. |
I am fine with picking one instruction to stay unimplemented. |
Because Serpent (rather recklessly) already used |
Is there a process to move this to "accepted"? |
In any case I'll write up a document in the new format. |
EIP-141 ethereum/EIPs#141 has preserved 0xfe as an invalid opcode for aborting EVM execution. The EVM assembler supports this via the INVALID opcode. The LLL "panic" expression used to generate a jump to an invalid location in order to abort EVM execution. This change brings "panic" into line with EIP-141 by generating the INVALID opcode instead.
EIP-141 ethereum/EIPs#141 has preserved 0xfe as an invalid opcode for aborting EVM execution. The EVM assembler supports this via the INVALID opcode. The LLL "panic" expression used to generate a jump to an invalid location in order to abort EVM execution. This change brings "panic" into line with EIP-141 by generating the INVALID opcode instead.
EIP-141 ethereum/EIPs#141 has preserved 0xfe as an invalid opcode for aborting EVM execution. The EVM assembler supports this via the INVALID opcode. The LLL "panic" expression used to generate a jump to an invalid location in order to abort EVM execution. This change brings "panic" into line with EIP-141 by generating the INVALID opcode instead.
EIP-141 ethereum/EIPs#141 has preserved 0xfe as an invalid opcode for aborting EVM execution. The EVM assembler supports this via the INVALID opcode. The LLL "panic" expression used to generate a jump to an invalid location in order to abort EVM execution. This change brings "panic" into line with EIP-141 by generating the INVALID opcode instead.
This was merged in via #216. |
Overview
Designate
0xef
0xfe
as an invalid instruction.Rationale
An invalid instruction can be used to abort the execution (i.e. duplicates as an ABORT instruction). It is very similar to how an invalid jump behaves.
We have discussed this as part of EVM2.0 (ewasm/design#39), where it was suggested that we prepend any non-EVM code (such as WASM code) so that executing it as EVM1 will not cause undefined behaviour.
The text was updated successfully, but these errors were encountered: