The Ethereum Virtual Machine (EVM)

Published by Mario Oettler on

The Ethereum Virtual Machine is the execution environment for transactions and smart contracts. It implements the rules of how the state transitions from one state s1 to the following state s2 if a transaction is executed. The EVM Opcodes are here [LINK: https://www.ethervm.io/]

The EVM runs on many nodes of the network independently. Each block proposer has to run the EVM in order to calculate the new state. And each validator can (and must) run the EVM to check if a proposed block (and state) is correct.

It takes all transactions that are in this block and executes them in the given order. The result should be the same for each node.

The EVM takes transactions and the current state as input and calculates the new state of the Ethereum network.

There are different implementations of the EVM (e.g., Geth, Nethermind, Besu, Erigon, and Py-EVM), but they all follow the same rules. Different implementations are very important for the safety of the network. Suppose a software developer makes a mistake, and the EVM crashes or computes the wrong results. If only one implementation exists, the network will halt or produce a nonsense state.

However, if different people develop multiple implementations, the same error is less likely to occur in all implementations. This approach increases the resilience of the network against bugs.

Categories: