WebAssembly Parity VM Design - Wiki Parity Tech Documentation

Choosing which VM to run.

Parity Ethereum client currently supports 2 VM types - EVM and WebAssembly, with EVM being default. Parity can choose to run WebAssembly VM for the specific contract if and only if BOTH are true:

Running the code

If Parity chooses WebAssembly VM to run the contract, it’s bytecode should satisfy the constraints of contract’s ABI. If it doesn’t satisfy all constraints such a contract will be rejected and the error returned.

Before the execution of the Wasm contract it’s code will be instrumented with the following modifications:

Each of the steps above can result in error described in the correspondng links, and Parity MUST stop execution and return the error in this case.

Then Parity instantiates the module according to the WebAssembly specification. This instantiation code can also result in a trap, in this case Parity MUST finish execution of the bytecode with the error.

If the instantiation code produced no trap, Parity executes exported function with a name call according to WebAssembly Execution specification.