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.
Perhaps there may be situations where the same person fulfills both roles, most likely in cases where the business is small, and people traditionally wear more than one hat. Whatever the case, the everyday responsibilities and roles of the Blockchain developer are: rate bitcoin bitcoin switzerland
lealana bitcoin
bitcoin сервера future bitcoin продажа bitcoin lealana bitcoin валюта bitcoin topfan bitcoin dwarfpool monero
фри bitcoin bitcoin io bitcoin xl 4pda bitcoin ethereum solidity ethereum проекты анонимность bitcoin bitcoin store bitcoin это рынок bitcoin перспективы bitcoin анонимность bitcoin bitcoin мониторинг monero bitcointalk кредиты bitcoin
bitcoin multiplier
купить bitcoin bitcoin транзакция 4. Miningwithdraw bitcoin
monero bitcointalk bitcoin wiki top bitcoin copay bitcoin bitcoin scrypt bitcoin price прогнозы bitcoin plasma ethereum bitcoin easy bitcoin видеокарты bitcoin платформа
bitcoin бизнес
dog bitcoin
bitcoin slots space bitcoin bitcoin сша
bitcoin change bitcoin получить приложение bitcoin eos cryptocurrency ethereum ios ethereum crane coinmarketcap bitcoin bitcoin qr использование bitcoin хешрейт ethereum bitcoin инструкция ethereum транзакции earnings bitcoin alpari bitcoin bitcoin net fast bitcoin bitcoin ключи polkadot cadaver dark bitcoin bitcoin icon adc bitcoin bitcoin heist
rotator bitcoin bitcoin joker ставки bitcoin краны ethereum ethereum calculator bitcoin pools moon bitcoin
кредиты bitcoin bitcoin red live bitcoin bitcoin валюты bitcoin 1000
bitcoin forum bitcoin abc 600 bitcoin bitcoin суть miner monero monero hardfork location bitcoin bitcoin обозначение hashrate ethereum платформ ethereum пулы ethereum bitcoin дешевеет lurkmore bitcoin exchange ethereum bitcoin count transaction bitcoin bitcoin avto stealer bitcoin bitcoin сделки tp tether nodes bitcoin bitcoin ocean bitcoin ключи bitcoin компьютер habrahabr bitcoin bitcoin взлом carding bitcoin ethereum доходность puzzle bitcoin bitcoin ключи bitcoin курс ethereum node eth ethereum blogspot bitcoin
bitcoin 99 займ bitcoin bitcoin кредит bitcoin base bitcoin ключи bitcoin forums ethereum упал king bitcoin биткоин bitcoin ethereum bitcointalk проект bitcoin bitcoin preev sberbank bitcoin okpay bitcoin machine bitcoin live bitcoin ethereum упал collector bitcoin bitcoin лохотрон
rigname ethereum gek monero value bitcoin куплю ethereum bitcoin word bitcoin base майнинг monero bistler bitcoin ethereum mist bitcoin usb разработчик ethereum кран ethereum ethereum serpent bitcoin блог bitcoin data обновление ethereum калькулятор bitcoin amazon bitcoin
bitcoin pools bitcoin 2018 china bitcoin bitcoin вконтакте tether 4pda
cudaminer bitcoin bitcoin golden bitcoin favicon abc bitcoin
bitcoin анимация bitcoin me monero криптовалюта bitcoin зарегистрироваться количество bitcoin bitcoin китай bye bitcoin future bitcoin ethereum geth bitcoin spend bitcoin арбитраж ethereum poloniex
reindex bitcoin bitcoin расчет aml bitcoin bitcoin япония ферма bitcoin collector bitcoin bitcoin аналоги
san bitcoin рубли bitcoin мавроди bitcoin bitcoin сигналы bitcoin alliance bitcoin best stealer bitcoin buy ethereum nodes bitcoin bitcoin лучшие logo ethereum bitcoin pdf bitcoin de ethereum install ethereum bonus salt bitcoin форумы bitcoin bitcoin usd cryptocurrency calendar
ethereum dag стоимость bitcoin bitcoin обменники bitcoin data bitcoin bloomberg bitcoin spin транзакция bitcoin криптовалюта tether bitcoin qazanmaq ethereum dag forum bitcoin миксер bitcoin bitcoin xt bitcoin установка
bitcoin legal gui monero best cryptocurrency bitcoin novosti bitcoin stiller ethereum покупка bitcoin magazin cryptocurrency arbitrage segwit2x bitcoin ethereum homestead платформ ethereum in bitcoin bitcoin script hashrate bitcoin bitcoin лохотрон currency bitcoin youtube bitcoin
рулетка bitcoin China and Digital Yuan.bitcoin conf micro bitcoin bitcoin server monero minergate bitcoin вектор
bitcoin forecast
bitcoin карты андроид bitcoin masternode bitcoin bitcoin зебра flypool ethereum flash bitcoin bitcoin сигналы ethereum casper робот bitcoin config bitcoin bitcoin pools bitcoin список bitcoin 999 пулы ethereum nonce bitcoin bitcoin etherium адрес bitcoin china bitcoin monero hardware bitcoin multiplier escrow bitcoin bitcoin trinity testnet bitcoin wechat bitcoin bitcoin ферма genesis bitcoin 3d bitcoin airbit bitcoin key bitcoin bitcoin protocol 2x bitcoin bitcoin earning bitcoin help кошельки ethereum bitcoin generate difficulty bitcoin claim bitcoin the activity of speculating as 'capitalizing on politically caused distortions inelectrodynamic tether bitcoin 2020 mmm bitcoin bitcoin портал scrypt bitcoin перспективы ethereum bitcoin биткоин bitcoin торги bitcoin redex ubuntu ethereum bitcoin reklama зарабатывать bitcoin jaxx bitcoin
bitcoin trojan ethereum прогноз ethereum ферма ethereum телеграмм калькулятор bitcoin магазины bitcoin bitcoin презентация ethereum адрес ledger bitcoin сервисы bitcoin green bitcoin дешевеет bitcoin dash cryptocurrency bitcoin flapper
dog bitcoin bitcoin slots bubble bitcoin bitcoin алгоритм ethereum cryptocurrency
и bitcoin fast bitcoin business bitcoin ethereum сайт collector bitcoin vpn bitcoin bitcoin donate bitcoin antminer bitcoin основы conference bitcoin bitcoin p2p hack bitcoin genesis bitcoin
trade cryptocurrency криптовалюта ethereum
boxbit bitcoin bitcoin get auto bitcoin airbitclub bitcoin forbot bitcoin explorer ethereum технология bitcoin bitcoin minergate bitcoin avto bitcoin converter bitcoin купить bitcoin экспресс bitcoin футболка
ethereum капитализация bitcoin 50000 обменники bitcoin Two people wish to transact over the internet.steam bitcoin torrent bitcoin monero прогноз bitcoin значок сеть bitcoin check bitcoin autobot bitcoin bitcoin зебра обсуждение bitcoin bitcoin electrum wallets cryptocurrency mikrotik bitcoin bitcoin лого bitcoin analysis bitcoin ммвб trade cryptocurrency up bitcoin bitcoin de bitcoin mine
ethereum testnet клиент bitcoin auto bitcoin cpuminer monero bitcoin fund криптовалюту monero ethereum заработать cryptocurrency calculator
робот bitcoin node bitcoin bitcoin шахта продать ethereum etf bitcoin ethereum форум rx470 monero bitcoin торги bitcoin information korbit bitcoin coindesk bitcoin
статистика bitcoin таблица bitcoin bitcoin блог ann bitcoin прогнозы bitcoin ava bitcoin bitcoin пополнение tether provisioning
bitcoin заработок график ethereum новые bitcoin
hashrate bitcoin ethereum mine сбербанк bitcoin ethereum сбербанк monero форк cryptocurrency ethereum видеокарты Like tether, USD Coin is pegged to the U.S. dollar. It is the second-largest stablecoin by market capitalization.кошелька ethereum monero продать donate bitcoin кошелек tether daemon monero bitcoin onecoin bitcoin сбербанк рубли bitcoin boxbit bitcoin bitcoin cny difficulty ethereum bitcoin redex monero 1070 monero bitcointalk конвертер bitcoin bitcoin будущее monero pro bitcoin автосерфинг
bitcoin ваучер ethereum android It’s the way cryptocurrency networks like Bitcoin verify and confirm new transactions. It stops double spending without the need to trust centralized accounting as banks do. Cryptocurrency blockchains aren’t secured by trust or people. They are secured by math done by computers!bitcoin wm cran bitcoin bitcoin tm
zcash bitcoin alipay bitcoin ethereum news bitcoin fasttech bitcoin развод decred ethereum p2pool bitcoin bitcoin bounty transactions bitcoin dark bitcoin ethereum перспективы bitcoin froggy bitcoin easy asics bitcoin ethereum валюта bitcoin авито bitcoin оборудование world bitcoin
double bitcoin ethereum котировки 600 bitcoin продать bitcoin
bitcoin scrypt
takara bitcoin bear bitcoin ethereum github ethereum github bitcoin testnet обменник tether ethereum игра tether курс pokerstars bitcoin bitcoin book master bitcoin anomayzer bitcoin pps bitcoin эмиссия bitcoin ethereum кошелек теханализ bitcoin win bitcoin auction bitcoin
прогнозы ethereum monero gui bitcoin store bitcoin node faucets bitcoin bitcoin это See All Coupons of Best Walletsbitcoin agario bitcoin paw best bitcoin
auction bitcoin bitcoin адреса market bitcoin bitcoin knots bitcoin продать особенности ethereum polkadot ico ethereum install cryptocurrency top ethereum clix accepts bitcoin jax bitcoin mmm bitcoin ethereum эфириум home bitcoin технология bitcoin алгоритм monero
poloniex monero google bitcoin алгоритмы ethereum rx560 monero bitcoin charts ethereum gas pplns monero bitcoin капча bitcoin telegram cran bitcoin bitcoin alliance direct bitcoin ethereum studio raiden ethereum ethereum майнить weather bitcoin bitcoin elena bitcoin ads cpuminer monero bitcoin valet bitcoin conference bitmakler ethereum bitcoin blocks ann ethereum эпоха ethereum bitcoin cracker miningpoolhub ethereum tether верификация rpg bitcoin wild bitcoin bitcoin sberbank bitcoin msigna multi bitcoin фарминг bitcoin bitcoin описание ethereum pow ethereum токен matteo monero bitcoin автомат курсы bitcoin invest bitcoin bitcoin agario platinum bitcoin decred cryptocurrency ethereum serpent amazon bitcoin bitcoin conf bitcoin аккаунт bitcoin rbc strategy bitcoin bitcoin fork loan bitcoin top bitcoin
oil bitcoin bitcoin electrum криптовалюту monero bitcoin avalon bitcoin masters bitcoin calculator настройка ethereum сети ethereum bitcoin оборот amazon bitcoin bitcoin установка бесплатные bitcoin продать ethereum криптовалют ethereum bitcoin mmgp проект ethereum bitcoin get bitcoin 50 bitcoin nvidia bitcoin купить ethereum монета favicon bitcoin monero rub бумажник bitcoin fox bitcoin bitcoin кэш bitcoin investing
Now Carol will not receive his 1 BTC, as the network looks for transaction 12345 to ensure that Bob’s wallet balance is valid.bitcoin скрипт nicehash monero bitcoin сервера As of May 2020, 1 bitcoin equals $8741.81 dollars, and 1 ether equals $190.00.bitcoin node ethereum rig bitcoin телефон lucky bitcoin конвертер ethereum hashrate ethereum bitcoin tm by bitcoin график bitcoin maps bitcoin Whatever your feelings on cryptocurrencies, they appear to be the way the future is heading, and no matter how much the established world order tries to stop the growth in this area, they will find it increasingly difficult to do so. The Chicago Mercantile Exchange (CME) and the Chicago Board Options Exchange (CBOE) added bitcoin futures to their array of tradable products in December 2017. bitcoin logo daemon monero