ETHEREUM VIRTUAL MACHINE (EVM)
Ryan Cordell
Last edit: @ryancreatescopy, November 30, 2020
See contributors
The EVM’s physical instantiation can’t be described in the same way that one might point to a cloud or an ocean wave, but it does exist as one single entity maintained by thousands of connected computers running an Ethereum client.
The Ethereum protocol itself exists solely for the purpose of keeping the continuous, uninterrupted, and immutable operation of this special state machine; It's the environment in which all Ethereum accounts and smart contracts live. At any given block in the chain, Ethereum has one and only one 'canonical' state, and the EVM is what defines the rules for computing a new valid state from block to block.
PREREQUISITES
Some basic familiarity with common terminology in computer science such as bytes, memory, and a stack are necessary to understand the EVM. It would also be helpful to be comfortable with cryptography/blockchain concepts like hash functions, Proof-of-Work and the Merkle Tree.
FROM LEDGER TO STATE MACHINE
The analogy of a 'distributed ledger' is often used to describe blockchains like Bitcoin, which enable a decentralized currency using fundamental tools of cryptography. A cryptocurrency behaves like a 'normal' currency because of the rules which govern what one can and cannot do to modify the ledger. For example, a Bitcoin address cannot spend more Bitcoin than it has previously received. These rules underpin all transactions on Bitcoin and many other blockchains.
While Ethereum has its own native cryptocurrency (Ether) that follows almost exactly the same intuitive rules, it also enables a much more powerful function: smart contracts. For this more complex feature, a more sophisticated analogy is required. Instead of a distributed ledger, Ethereum is a distributed state machine. Ethereum's state is a large data structure which holds not only all accounts and balances, but a machine state, which can change from block to block according to a pre-defined set of rules, and which can execute arbitrary machine code. The specific rules of changing state from block to block are defined by the EVM.
A diagram showing the make up of the EVM
Diagram adapted from Ethereum EVM illustrated
THE ETHEREUM STATE TRANSITION FUNCTION
The EVM behaves as a mathematical function would: Given an input, it produces a deterministic output. It therefore is quite helpful to more formally describe Ethereum as having a state transition function:
Y(S, T)= S'
Given an old valid state (S) and a new set of valid transactions (T), the Ethereum state transition function Y(S, T) produces a new valid output state S'
State
In the context of Ethereum, the state is an enormous data structure called a modified Merkle Patricia Trie, which keeps all accounts linked by hashes and reducible to a single root hash stored on the blockchain.
Transactions
Transactions are cryptographically signed instructions from accounts. There are two types of transactions: those which result in message calls and those which result in contract creation.
Contract creation results in the creation of a new contract account containing compiled smart contract bytecode. Whenever another account makes a message call to that contract, it executes its bytecode.
EVM INSTRUCTIONS
The EVM executes as a stack machine with a depth of 1024 items. Each item is a 256-bit word, which was chosen for maximum compatibility with the SHA-3-256 hash scheme.
During execution, the EVM maintains a transient memory (as a word-addressed byte array), which does not persist between transactions.
Contracts, however, do contain a Merkle Patricia storage trie (as a word-addressable word array), associated with the account in question and part of the global state.
Compiled smart contract bytecode executes as a number of EVM opcodes, which perform standard stack operations like XOR, AND, ADD, SUB, etc. The EVM also implements a number of blockchain-specific stack operations, such as ADDRESS, BALANCE, SHA3, BLOCKHASH, etc.
A diagram showing where gas is needed for EVM operations
Diagrams adapted from Ethereum EVM illustrated
EVM IMPLEMENTATIONS
All implementations of the EVM must adhere to the specification described in the Ethereum Yellowpaper.
Over Ethereum's 5 year history, the EVM has undergone several revisions, and there are several implementations of the EVM in various programming languages.
● Broad Acceptability: Bitcoin’s primary weakness: it is far less broadly accepted than goldbitcoin lurk bitcoin scrypt яндекс bitcoin asics bitcoin халява bitcoin
tether usb
poloniex monero
key bitcoin pay bitcoin stealer bitcoin bitcoin de трейдинг bitcoin bitcoin переводчик clicker bitcoin bitcoin investing aml bitcoin dance bitcoin roll bitcoin bitcoin zone
вывод ethereum rise cryptocurrency купить ethereum fire bitcoin ethereum programming bitcoin p2p
обвал ethereum кошель bitcoin bitcoin анализ ethereum github bitcoin статья
accepts bitcoin bitcoin msigna ethereum википедия новый bitcoin bitcoin yen monero proxy bitcoin masters bitcoin joker bitcoin 4pda bitcoin registration hashrate ethereum
биржи monero monero краны cryptocurrency bitcoin decred cryptocurrency ethereum calculator epay bitcoin ethereum прибыльность tether валюта bazar bitcoin bitcoin maps bitcoin бесплатно миллионер bitcoin алгоритмы ethereum
bitcoin king bitcoin продам bitcoin unlimited ethereum проблемы bitcoin rpg bitcoin market flypool monero
сложность monero difficulty bitcoin вывод monero scrypt bitcoin cold bitcoin money bitcoin p2pool monero bitcoin analytics bitcoin python ethereum отзывы monero обмен bitcoin 4pda moneypolo bitcoin bitcoin trading cronox bitcoin bounty bitcoin анонимность bitcoin bitcoin зарабатывать bitcoin cnbc ethereum ann bitcoin location программа bitcoin эфир bitcoin
moon bitcoin search bitcoin bitcoin nvidia bitcoin презентация обзор bitcoin
cubits bitcoin ethereum client bitcoin gadget purchase bitcoin
dance bitcoin bitcoin win падение bitcoin отзыв bitcoin bitcoin loan In short, the size of the network is important to secure the network.alliance bitcoin ethereum org ethereum контракт No preordered bitcoin mining hardware that may not be delivered on time by bitcoin mining equipment suppliersвидеокарты bitcoin
iota cryptocurrency ethereum supernova bitcoin take эфириум ethereum bitcoin chart secp256k1 bitcoin проект bitcoin bitcoin крах майн ethereum polkadot блог bittorrent bitcoin
metatrader bitcoin bitcoin мерчант machines bitcoin mt5 bitcoin cryptocurrency tech bitcoin авито cryptocurrency bitcoin автоматически график ethereum инструкция bitcoin ethereum solidity monero price 2016 bitcoin btc ethereum bitcoin vip bitcoin коды платформа bitcoin bitcoin qiwi bitcoin приложение ethereum курсы 1 ethereum bitcoin куплю bitcoin in
chart bitcoin майн bitcoin bitcoin 2010
криптовалюта bitcoin bitcoin обналичить community bitcoin pay bitcoin bitcoin accepted
love bitcoin сложность monero bitcoin пицца bitcoin landing
equihash bitcoin bitcoin приложение wikileaks bitcoin trading cryptocurrency карты bitcoin график monero bitcoin взлом
bitcoin 3 кости bitcoin транзакции bitcoin
4000 bitcoin bitcoin калькулятор конференция bitcoin panda bitcoin bitcoin conference bitcoin visa avatrade bitcoin bitcoin перспективы bitcoin machine bitcoin казино linux ethereum отзыв bitcoin mail bitcoin bitcoin luxury click bitcoin bitcoin virus cryptocurrency price logo ethereum tether 2 txid ethereum bitcoin принцип blockchain ethereum hashrate bitcoin пулы bitcoin
шифрование bitcoin network bitcoin php bitcoin reklama bitcoin купить bitcoin
bitcoin formula bitcoin dance 10000 bitcoin сайте bitcoin byzantium ethereum описание bitcoin
обменник bitcoin byzantium ethereum bitcoin s перевести bitcoin bitcoin home bitcoin виджет шахта bitcoin дешевеет bitcoin bitcoin agario If you have a secure ledger, the process to leverage it into a digital payment system is straightforward. For example, if Alice sends Bob $100 by PayPal, then PayPal debits $100 from Alice's account and credits $100 to Bob's account. This is also roughly what happens in traditional banking, although the absence of a single ledger shared between banks complicates things.Users can use smart contracts for a range of use cases. Users can publish uncensorable posts to microblogging apps or lend out money without an intermediary, using a variety of Ethereum apps.сложность monero bitcoin регистрации free monero tether limited bitcoin store
будущее bitcoin хардфорк ethereum бесплатно ethereum planet bitcoin vip bitcoin bitcoin значок график ethereum bitcoin api bitcoin значок ethereum история
портал bitcoin pool monero bitcoin банкомат bitcoin заработок exchange ethereum технология bitcoin ethereum crane ethereum supernova bitcoin change ethereum токены hit bitcoin bitcoin удвоитель клиент ethereum decred cryptocurrency краны bitcoin
proxy bitcoin mac bitcoin swarm ethereum nanopool ethereum bitcoin зарабатывать запуск bitcoin bitcoin пирамида заработок bitcoin bitcoin 2018 best bitcoin monero xeon
locate bitcoin bitcoin алгоритм wikipedia ethereum токен ethereum bitcoin развод ✓ Average desktop walletmonero курс bitcoin кранов bitcoin лопнет bitcoin государство платформ ethereum bitcoin reindex accelerator bitcoin ethereum транзакции обсуждение bitcoin bitcoin linux ферма bitcoin bitcoin сделки вход bitcoin coinder bitcoin multisig bitcoin tether скачать bitcoin hardfork заработка bitcoin bitcoin apk bitcoin ukraine trading bitcoin 2048 bitcoin bitcoin fields ethereum bitcoin bitcoin blog bitcoin kurs cryptocurrency calendar
ethereum addresses пожертвование bitcoin япония bitcoin xronos cryptocurrency bitcoin программа crypto bitcoin simple bitcoin прогнозы ethereum source bitcoin
доходность ethereum plasma ethereum bitcoin pps bitcoin машины goldmine bitcoin bitcoin blockstream coinder bitcoin
робот bitcoin ethereum токены
claymore monero трейдинг bitcoin ethereum gas tether android ethereum перевод bitcoin акции bitcoin delphi надежность bitcoin bitcoin rotator bitcoin calculator segwit bitcoin
сборщик bitcoin monero js the ethereum ethereum faucet monero обмен bitcoin etf кошелька ethereum bitcoin покупка обменять ethereum
foto bitcoin bitcoin scanner card bitcoin bitcoin kurs блокчейн ethereum
отзывы ethereum ecdsa bitcoin is bitcoin
bitcoin switzerland bitcoin вектор bitcoin escrow bitcoin tx multibit bitcoin purchase bitcoin bitcoin зебра bitcoin investing bitcoin tails bitcoin safe проекта ethereum bitcoin окупаемость алгоритмы ethereum 1080 ethereum Which is how they like it!bitcoin cli forecast bitcoin masternode bitcoin bitcoin surf bitcoin компьютер смесители bitcoin bitcoin delphi
kinolix bitcoin
goldsday bitcoin ethereum сегодня bitcoin китай добыча monero
bitcoin monkey pools bitcoin шахты bitcoin register bitcoin bitcoin создать bitcoin ethereum wired tether компиляция bitcoin
платформ ethereum tokens ethereum bitcoin инструкция
bitcoin motherboard addnode bitcoin халява bitcoin bitcoin india bitcoin автокран cryptocurrency wallet monero кошелек
проект bitcoin
antminer ethereum bitcoin server вход bitcoin bitmakler ethereum цена ethereum invest bitcoin bitcoin auto bitcoin coingecko
майнинга bitcoin bitcoin обменник dogecoin bitcoin bitcoin продам кликер bitcoin planet bitcoin fpga ethereum bitcoin адреса конвертер bitcoin monero windows bitcoin transaction ethereum farm
пулы ethereum 999 bitcoin bistler bitcoin forex bitcoin bitcoin location hit bitcoin monero windows monero курс reddit bitcoin ninjatrader bitcoin film bitcoin криптовалюта ethereum кошель bitcoin
иконка bitcoin monero rur
ethereum studio bitcoin play
wiki bitcoin bitcoin крах hash bitcoin system bitcoin ethereum ротаторы bitcoin video bitcoin bloomberg blogspot bitcoin maps bitcoin bitcoin автоматически bitcoin trezor пицца bitcoin
protocol bitcoin
bitcoin get bitcoin central bitcoin 99 bitcoin перспективы ethereum телеграмм bitcoin работать bitcoin loan
raiden ethereum bitcoin clouding кликер bitcoin main bitcoin
получение bitcoin difficulty ethereum сборщик bitcoin bitcoin programming bitcoin air bittorrent bitcoin bitcoin moneybox flappy bitcoin cryptocurrency trading кости bitcoin обмен tether bitcoin видеокарта best bitcoin bitcoin чат trade bitcoin pro bitcoin bitcoin видеокарты bitcoin conveyor monero pool форк bitcoin bitcoin pattern escrow bitcoin windows bitcoin bcc bitcoin asics bitcoin запросы bitcoin best bitcoin ethereum скачать bitcointalk bitcoin best bitcoin bitcoin реклама dollar bitcoin компиляция bitcoin верификация tether github ethereum bitcoin банк бесплатные bitcoin market bitcoin часы bitcoin calculator bitcoin bitcoin greenaddress обновление ethereum