diff --git a/README.md b/README.md index 0d8f15054d..694b7db567 100644 --- a/README.md +++ b/README.md @@ -14,20 +14,38 @@ Created by members of the [Ewasm] team, the project aims for clean, standalone E that can be imported as an execution module by Ethereum Client projects. The codebase of _evmone_ is optimized to provide fast and efficient execution of EVM smart contracts. -#### Characteristic of evmone +### Characteristic of evmone 1. Exposes the [EVMC] API. -2. The _indirect call threading_ is the dispatch method used - +2. Requires C++17 standard. +3. The [intx] library is used to provide 256-bit integer precision. +4. The [ethash] library is used to provide Keccak hash function implementation + needed for the special `KECCAK256` instruction. +5. Contains two interpreters: **Advanced** (default) and **Baseline** (experimental). + +### Advanced Interpreter + +1. The _indirect call threading_ is the dispatch method used - a loaded EVM program is a table with pointers to functions implementing virtual instructions. -3. The gas cost and stack requirements of block of instructions is precomputed +2. The gas cost and stack requirements of block of instructions is precomputed and applied once per block during execution. -4. The [intx] library is used to provide 256-bit integer precision. -5. The [ethash] library is used to provide Keccak hash function implementation - needed for the special `SHA3` instruction. -6. Requires C++17 standard. +3. Performs extensive and expensive bytecode analysis before execution. + +### Baseline Interpreter + +1. Provides relatively straight-forward EVM implementation. +2. Performs only minimalistic `JUMPDEST` analysis. +3. Experimental. Can be enabled with `O=0` option. + ## Usage +### Optimization levels + +The option `O` controls the "optimization level": +- `O=2` uses Advanced interpreter (default), +- `O=0` uses Baseline interpreter. + ### As geth plugin evmone implements the [EVMC] API for Ethereum Virtual Machines.