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.
bitcoin cfd
bitcoin venezuela
ethereum скачать goldmine bitcoin cryptocurrency index bitcoin казахстан bitcoin auction
monero difficulty tether coin лотерея bitcoin bitcoin графики bitcoin free ethereum обменять frontier ethereum криптовалют ethereum bloomberg bitcoin q bitcoin акции bitcoin разделение ethereum monero hardware txid bitcoin bitcoin png bitcoin etherium bitcoin de партнерка bitcoin bitcoin hardware A small-scale miner with a single consumer-grade computer may spend more on electricity than they will earn mining bitcoins. Bitcoin mining is profitable only for those who run multiple computers with high-performance video processing cards and who join a group of miners to combine hardware power.платформу ethereum monero transaction ethereum cgminer казино bitcoin кошель bitcoin bitcoin скачать remix ethereum cryptocurrency nem bitcoin kurs bitcoin talk bye bitcoin что bitcoin boom bitcoin
bitcoin foto bitcoin ebay исходники bitcoin bitcoin monkey bistler bitcoin
alliance bitcoin ethereum видеокарты bitcoin бесплатно cubits bitcoin bitcoin zone system bitcoin bitcoin вирус bitcoin widget Basically, these efforts are treating digital assets as a bearer instrument, which is a wide and dexterous application.поиск bitcoin bitcoin instagram lamborghini bitcoin bitcoin click алгоритм bitcoin bitcoin word bitcoin store bitcoin pay bitcoin life ethereum обмен консультации bitcoin трейдинг bitcoin приложения bitcoin кредит bitcoin bitcoin зарегистрировать freeman bitcoin ethereum btc bitcoin marketplace курсы ethereum
33 bitcoin bcn bitcoin cronox bitcoin purchase bitcoin bittrex bitcoin topfan bitcoin bitcoin вложить ethereum org bitcoin compare ethereum заработок ethereum buy mine monero wallet tether криптовалюту bitcoin wikipedia ethereum bitcoin okpay
bitcoin key bitcoin разделился ethereum homestead bitcoin торги ethereum клиент валюта monero half bitcoin bitcoin synchronization froggy bitcoin bitcoin drip cryptocurrency law
bitcoin 3 ethereum russia киа bitcoin bitcoin pizza ethereum myetherwallet отзыв bitcoin tether обменник bitcoin основы protocol bitcoin byzantium ethereum обменник bitcoin arbitrage cryptocurrency bitcoin создать lootool bitcoin ethereum complexity play bitcoin ethereum доходность инвестиции bitcoin
bitcoin onecoin tinkoff bitcoin blogspot bitcoin bitcoin windows bitcoin service p2pool ethereum pool bitcoin apple bitcoin bitcoin adress alpha bitcoin bitcoin portable bitcoin surf bitcoin криптовалюта
сбербанк ethereum bitcoin биржа convert bitcoin
polkadot блог bitcoin отзывы ubuntu bitcoin bitcoin ann bitcoin продам
boom bitcoin bitcoin nvidia bitcoin развод ethereum валюта mikrotik bitcoin monero прогноз ethereum contracts bitcoin capital платформы ethereum doubler bitcoin lootool bitcoin bitcoin mmm настройка monero сделки bitcoin
gemini bitcoin депозит bitcoin
bitcoin ne bitcoin компьютер
bitcoin приложение coinder bitcoin bitcoin airbit
linux bitcoin bitcoin реклама 999 bitcoin fox bitcoin ethereum сбербанк ethereum прибыльность
byzantium ethereum bitcoin fan
bonus bitcoin bitcoin регистрации ethereum биткоин
bitcoin rotator statistics bitcoin monero hardware ethereum forum dwarfpool monero bank bitcoin ethereum wikipedia monero free bitcoin api
golang bitcoin bitcoin china bitcoin mempool mercado bitcoin
bitcoin paypal eos cryptocurrency ninjatrader bitcoin card bitcoin ropsten ethereum прогнозы bitcoin компания bitcoin
bitcoin рынок bitcoin markets пожертвование bitcoin mine monero анимация bitcoin tether 2 е bitcoin tether перевод bitcoin 2048 secp256k1 ethereum заработка bitcoin bitcoin instant трейдинг bitcoin proxy bitcoin пузырь bitcoin ethereum пулы фонд ethereum bitcoin compare bitcoin casino bitcoin видеокарта партнерка bitcoin
etoro bitcoin кошелек ethereum gemini bitcoin addnode bitcoin bitcoin calculator пример bitcoin ethereum история bitcoin earnings connect bitcoin index bitcoin bitcoin автоматом all bitcoin ethereum habrahabr bitcoin eth будущее ethereum торговля bitcoin red bitcoin bitcoin покупка bitcoin рынок cryptocurrency magazine bitcoin монеты bitcoin agario bitcoin registration bitcoin telegram stealer bitcoin bitcoin community chvrches tether hashrate bitcoin monero price проекты bitcoin claymore monero bitcoin часы bitcoin analytics bitcoin окупаемость bitcoin doge bitcoin generation ethereum 1070 cold bitcoin cryptocurrency law bitcoin apple box bitcoin bitcoin лотерея ethereum rotator
bitcoin ebay community bitcoin 999 bitcoin bitcoin аналоги
tether android инвестирование bitcoin bitcoin golang капитализация bitcoin bitcoin reddit monero address nicehash bitcoin bitcoin create bitcoin cryptocurrency mmm bitcoin
film bitcoin терминалы bitcoin golang bitcoin bitcoin nachrichten
описание ethereum ethereum сбербанк алгоритм ethereum bitcoin сайты bitcoin алматы япония bitcoin андроид bitcoin китай bitcoin cryptocurrency mining cryptocurrency nem wikileaks bitcoin ethereum ico monero ann криптовалюта monero zcash bitcoin bitcoin script bitcoin cap bitcoin best monero ethereum пулы boxbit bitcoin agario bitcoin bitcoin loan подтверждение bitcoin bitcoin cli bitcoin prominer ферма bitcoin обмен monero bitcoin safe bitcoin фарминг unconfirmed monero bitcoin anonymous bitcoin сети
mt5 bitcoin шахта bitcoin bitcoin source bitcoin loans
pools bitcoin ecopayz bitcoin bitcoin рулетка secp256k1 ethereum bitcoin bit ethereum calculator виталик ethereum технология bitcoin monero gui виталик ethereum blocks bitcoin bitcoin center
bitcoin уязвимости bitcoin отзывы ethereum coingecko ethereum 1080
bitcoin life bitcoin stellar store bitcoin android ethereum курс bitcoin conference bitcoin email bitcoin bitcoin school bitcoin scrypt lightning bitcoin bitcoin спекуляция bitcoin ann bitcoin майнить
bitcoin timer mempool bitcoin bitcoin рбк A mining pool is a joint group of cryptocurrency miners who combine their computational resources over a network to strengthen the probability of finding a block or otherwise successfully mining for cryptocurrency.bitcoin hype bitcoin матрица wild bitcoin алгоритмы ethereum electrum ethereum bitcoin valet takara bitcoin настройка ethereum
bitcoin отследить
bitcoin services wikileaks bitcoin токен ethereum зарабатывать ethereum nya bitcoin coffee bitcoin bitcoin список mindgate bitcoin bitcoin проверить bitcoin ферма ethereum network pos ethereum bitcoin зарегистрировать blue bitcoin 1 monero адрес bitcoin bitcoin бумажник metropolis ethereum бонусы bitcoin life bitcoin bitcoin fund будущее ethereum платформу ethereum bitcoin php bitcoin отслеживание bitcoin dynamics bitcoin безопасность bitcoin платформа multiplier bitcoin
bitcoin лопнет ethereum перспективы darkcoin bitcoin casper ethereum dwarfpool monero total cryptocurrency bitcoin кошелька bitcoin график bitcoin халява bitcoin таблица bitcoin blog ethereum chaindata ethereum forum ethereum контракты mining bitcoin blog bitcoin avto bitcoin bitcoin торговля bitcoin адрес вход bitcoin 3d bitcoin bitcoin land rx470 monero collector bitcoin обмен tether stratum ethereum bitcoin зарабатывать cryptocurrency mining matrix bitcoin scrypt bitcoin bitcoin pro bitcoin сколько ethereum пулы bitcoin create ethereum addresses
ethereum майнить терминалы bitcoin loans bitcoin
bitcoin выиграть Earning, Mining, Or Staking Cryptocurrencyдинамика ethereum покупка bitcoin bitcoin ферма динамика ethereum connect bitcoin ethereum вывод clicker bitcoin котировка bitcoin raiden ethereum kong bitcoin bitcoin stiller bitcoin purse
tether верификация
cardano cryptocurrency
криптовалюта monero iphone bitcoin bitcoin currency bitcoin scrypt us bitcoin bitcoin pattern logo ethereum обмен bitcoin
arbitrage bitcoin bitcoin бонус ethereum coingecko ethereum капитализация magic bitcoin explorer ethereum bitcoin эмиссия ethereum bitcoin hardware bitcoin конвектор avto bitcoin cryptocurrency dash casinos bitcoin скачать bitcoin bitcoin golang bitcoin get amazon bitcoin 1024 bitcoin mac bitcoin geth ethereum форки bitcoin capitalization bitcoin all bitcoin surf bitcoin space bitcoin bitcoin деньги
qr bitcoin сети bitcoin alliance bitcoin карты bitcoin bitcoin click monero nicehash to bitcoin ethereum ферма
часы bitcoin excel bitcoin bitcoin trade bitcoin суть ethereum калькулятор bitcoin перспективы bitcoin metatrader ethereum ethash bitcoin gambling bitcoin компьютер homestead ethereum bitcoin today etoro bitcoin bitcoin графики bitcoin скрипт wechat bitcoin bitcoin multisig favicon bitcoin cgminer ethereum bitcoin vk ethereum прибыльность оборудование bitcoin kran bitcoin forum cryptocurrency
cgminer monero
отзыв bitcoin ethereum обменники bitcoin xapo шахты bitcoin ethereum wiki bitcoin blocks monero новости moneybox bitcoin bitcoin vip loco bitcoin supernova ethereum
bitcoin debian bitcoin видеокарты пример bitcoin bitcoin motherboard faucet cryptocurrency bitcoin etf bitcoin ethereum fast bitcoin ethereum web3 форк bitcoin bitcoin прогноз nanopool ethereum перевести bitcoin ethereum course bitcointalk ethereum ethereum алгоритм ethereum пул bitcoin local