pwasm-ethereum icon indicating copy to clipboard operation
pwasm-ethereum copied to clipboard

Missing EVM opcodes

Open DemiMarie opened this issue 6 years ago • 2 comments

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, or calldatasize. 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.

DemiMarie avatar Dec 20 '18 00:12 DemiMarie

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 avatar Dec 20 '18 14:12 NikVolf

@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.

DemiMarie avatar Dec 20 '18 14:12 DemiMarie