
What makes the Ethereum Virtual Machine tick?
The EVM uses six data locations during execution, with three dedicated to storage:
- Stack (Temporary): This follows LIFO (Last-In-First-Out) for temporary data used during transactions. It's cleared after each execution.
- Calldata (Temporary): Holds transaction parameters and function inputs for a smart contract.
- Memory (Temporary): A temporary, indexed byte array for data manipulation during transactions (think scratchpad).
- Storage: A key-value store holding the smart contract's state variables between transactions.
- Code: Stores the contract's code and static data as immutable strings (unchangeable).
- Logs (Write-Only): Output for the Ethereum event system, stored in transaction receipts.
Application Binary Interface
This is a JSON representation of a smart contract's interface, allowing external applications to interact with the contract.
Turing Completeness
These components work together to ensure the EVM's Turing completeness, enabling it to execute any computable function given enough resources.