EVM is a virtual machine simulated by Ethereum Network. Like any physical machine, the programming interface for EVM is EVM instruction set, with specification and found here and here.

A smart contract is a program executed on an EVM. To compose a smart contract, authors can directly program in EVM machine code or use high-level languages like Solidity. “Solc” is Solidity compiler, which convert Solidity code to EVM machine code. A smart contract runs in a sandbox on the EVM and can access two kinds of memory. One is a persistent memory called storage. Storage is a KV store which maps 256-bit keys to 256-bit values. The other one, memory, is a fresh one upon every message call. EVM is not a register machine but a stack-machine, all computations on a area called stack.

Interacting with EVM machine is done by calling Ethereum interface, “send_tx()”. The transaction content must be composed following EVM Application Binary Interface, ABI.

Users can interact with Ethereum Network (e.g. calling send_tx()) by using its JSON PRC interface.

EVM Illustration

Check here for the illustration of the EVM.