pwasm-ethereum
pwasm-ethereum copied to clipboard
Missing EVM opcodes
There are EVM opcodes that have no corresponding externs. This is causing problems in porting the POA Networks Bridge Contracts to Rust/WASM.
So far, I have run into the following limitations:
- No
returndatacopy
,returndatasize
,calldatacopy
, orcalldatasize
. These are used here for transparent proxying of calls. - No
extcodesize
opcode, used here and here for determining whether an address is a contract.
Additionally, it is not clear whether contract member variables are persistent accross calls to a contract.
I see no use-cases for those opcodes, since wasm can hardly reason about its own code (because of wasm Harvard architecture), not everything is implementable in the same way as it is done in EVM.
@NikVolf wasm can’t reason about its own code, but none of these require that. All of these are queries regarding the host that the wasm code is running in, not the wasm code itself.