diff --git a/backwardsCompatibility.md b/backwardsCompatibility.md index 285b4edb..1e11d4b8 100644 --- a/backwardsCompatibility.md +++ b/backwardsCompatibility.md @@ -14,7 +14,9 @@ cost. The fee schedule for eWASM is yet to be specified. ## Identification of code We assume there is some sort of code handler function that all clients have implemented. The code handler identifies the instruction set type by whether it -starts with WASM's magic number or not. +starts with the *eWASM preamble* or not. + +The *eWASM preamble* consists of an invalid EVM1 opcode (`0xEF`) followed by the WASM magic number. The WASM magic number is the following byte sequence: `0x00, 0x61, 0x73, 0x6d`. diff --git a/contract_interface.md b/contract_interface.md index 06e3e672..573507fa 100644 --- a/contract_interface.md +++ b/contract_interface.md @@ -6,6 +6,8 @@ The eWASM Contract Interface (ECI) specifies the structure of a contract module. Every contract must be stored in the [WebAssembly Binary Encoding](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md) format (in short, WASM bytecode). +The WASM bytecode must be prefixed with an invalid EVM1 opcode (`0xEF`). + ### Imports A contract can only import symbols specified in the [Ethereum Environment Interface](./eth_interface.md).