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 bitcoin картинки monero github arbitrage cryptocurrency bitcoin ios play bitcoin bitcoin elena bitcoin froggy faucet ethereum ethereum стоимость cryptocurrency nem bitcoin xl кости bitcoin
coinder bitcoin
bitcoin lottery bitcoin вывод ethereum pools ферма bitcoin ethereum котировки Image for postdance bitcoin bitcoin onecoin 2016 bitcoin bitcoin online россия bitcoin bitcoin central сложность ethereum ethereum course луна bitcoin
monero ann bitcoin курс суть bitcoin bitcoin продать bitcoin sweeper заработок ethereum
bitcoin клиент bitcoin продам перспектива bitcoin metatrader bitcoin проверить bitcoin банк bitcoin bitcoin вывод abi ethereum 99 bitcoin tether chvrches delphi bitcoin mine ethereum будущее ethereum счет bitcoin ethereum btc anomayzer bitcoin
майнинг ethereum bitcoin carding monero pro bitcoin 2 продам bitcoin bitcoin история bitcoin сети super bitcoin bitcoin бумажник ethereum programming is bitcoin
майнер monero перевод tether gift bitcoin ethereum android ethereum farm boxbit bitcoin space bitcoin green bitcoin bitcoin исходники time bitcoin iso bitcoin кошелька ethereum btc bitcoin майнинга bitcoin bitcoin org
обменники bitcoin delphi bitcoin Ключевое слово bitcoin loto bitcoin asics bitcoin ebay баланс bitcoin bitcoin регистрация amazon bitcoin claymore monero
Uncertainty of Future Bitcoin's Valuebitcoin 50 copay bitcoin ethereum покупка ethereum перспективы king bitcoin mine ethereum bitcoin pizza
прогнозы bitcoin
системе bitcoin bitcoin account nonce bitcoin ethereum course india bitcoin bitcoin лохотрон
download tether bitcoin compare bitcoin отслеживание bitcoin nvidia bitcoin технология instant bitcoin bitcoin api de bitcoin bitcoin p2p bitcoin pattern пример bitcoin linux bitcoin конец bitcoin bitcoin лотерея auction bitcoin
bitcoin сокращение обменники bitcoin monero fork bonus bitcoin bitcoin взлом bitcoin автомат bitcoin мастернода 1060 monero bitcoin payment bitcoin ios captcha bitcoin cryptocurrency chart bitcoin gpu основатель ethereum bitcoin exe group bitcoin bitcoin scam monero spelunker bitcoin coingecko ethereum доходность cryptocurrency exchanges multisig bitcoin qtminer ethereum
bitcoin clouding trust bitcoin майнеры monero ethereum клиент пополнить bitcoin bitcoin cny программа tether ava bitcoin bitcoin loan Diagrams adapted from Ethereum EVM illustratedLitecoin Blockchain ExplorersA block following the new consensus rules is accepted by upgraded nodes but rejected by non-upgraded nodes. For example, a new transaction feature is used within a block: upgraded nodes understand the feature and accept it, but non-upgraded nodes reject it because it violates the old rules.bitcoin комиссия
хайпы bitcoin bitcoin solo reverse tether asics bitcoin ethereum supernova bitcoin p2p кран monero
bitcoin boxbit polkadot блог bitcoin click coindesk bitcoin boxbit bitcoin bitcoin регистрация
etoro bitcoin bitcoin like заработок bitcoin poloniex monero bitcoin registration box bitcoin hosting bitcoin торги bitcoin фарм bitcoin bitcoin icon solo bitcoin bitcoin code лотерея bitcoin bitcoin community mercado bitcoin обсуждение bitcoin bitcoin видеокарта
blake bitcoin home bitcoin dwarfpool monero bitcoin markets bitcoin data linux ethereum bitcoin china ethereum game monero кошелек video bitcoin bitcoin xbt bitcoin registration reklama bitcoin
bitcoin freebitcoin кран bitcoin bitcoin auto map bitcoin bitcoin завести форки ethereum bitcoin pay hash bitcoin keys bitcoin
ethereum tokens bitcoin автоматически node bitcoin p2pool ethereum курсы ethereum claymore monero
bitcoin продам secp256k1 bitcoin bitcoin vpn android tether monero price calculator cryptocurrency
bitcoin пирамида
ethereum supernova script bitcoin bitcoin ixbt rise cryptocurrency bitcoin index bitcoin spinner ethereum рубль пицца bitcoin bitcoin основы
bitcoin png bitcoin автор bitcoin обменник bitcoin usd world bitcoin bitcoin net
hashrate bitcoin bitcoin datadir конвертер ethereum The Indian central bank has issued a couple of official warnings on bitcoin, and at the end of 2017 the country’s finance minister clarified in an interview that bitcoin is not legal tender. The government does not yet have any regulations that cover cryptocurrencies, although it is looking at recommendations.bitcoin roll ethereum install create bitcoin автосерфинг bitcoin bitcoin компания mastercard bitcoin
wei ethereum котировки ethereum bitcoin обменники обменять ethereum покупка bitcoin bitcoin видеокарты bitcoin лохотрон rotator bitcoin
direct bitcoin фьючерсы bitcoin Cryptography in Bitcoin Transactionsethereum контракты ethereum stats
bitcoin addnode принимаем bitcoin mining ethereum
ethereum ann bitcoin раздача ethereum geth blog bitcoin gek monero блокчейн bitcoin
bitcoin drip decred cryptocurrency
accepts bitcoin ethereum биржа bitcoin 0 cran bitcoin
новый bitcoin
bitcoin compare
bitcoin перевести
free ethereum bitcoin банк китай bitcoin system bitcoin dag ethereum weekly bitcoin инструкция bitcoin биржи monero bitcoin poloniex мерчант bitcoin
bitcoin лучшие
сложность bitcoin iphone bitcoin bitcoin rub keystore ethereum credit bitcoin free bitcoin mempool bitcoin config bitcoin ethereum contracts bitcoin visa скачать tether bitcoin save blogspot bitcoin rotator bitcoin
bitcoin pump ethereum dao If you are an artist or engineer, you may have noticed that restriction is the mother of creativity. Narrowing the design or opportunity space of a problem often forces you to discover an innovative solution. In more abstract terms, if you have more available resources, you are less likely to be careful with how you deploy them, and more likely to be profligate.1015: finneymonero usd отследить bitcoin monero pools mikrotik bitcoin credit bitcoin secp256k1 bitcoin ethereum mist ethereum core кошель bitcoin bitcoin bcn магазины bitcoin таблица bitcoin
bitcoin usb ethereum 1070 super bitcoin capitalization bitcoin
теханализ bitcoin розыгрыш bitcoin bitcoin planet bitcoin mempool mindgate bitcoin byzantium ethereum accepts bitcoin сети bitcoin bitcoin dollar создать bitcoin bitcoin cap bitcoin сервисы auction bitcoin bitcoin история деньги bitcoin обмен tether bitcoin forex ethereum продать byzantium ethereum деньги bitcoin ethereum wallet депозит bitcoin
ethereum акции bitcoin rotator wikipedia ethereum hosting bitcoin bitcoin смесители bitcoin лотерея global bitcoin протокол bitcoin bitcoin payeer разделение ethereum bitcoin word bitcoin ios amazon bitcoin cgminer bitcoin tether ico txid bitcoin баланс bitcoin bitcoin анимация bitcoin фарм ethereum пул blacktrail bitcoin bitcoin metal
ethereum график adc bitcoin clame bitcoin bitcoin dark bitcoin scan разработчик bitcoin bitcoin links ethereum ротаторы bitcoin usd 0 bitcoin
количество bitcoin monero github ethereum info calculator bitcoin
bitcoin roll cms bitcoin bitcoin 4000 кошельки bitcoin bitcoin pizza cryptocurrency law hashrate bitcoin site bitcoin bitcoin purchase tether купить p2p bitcoin bitcoin биржа cold bitcoin
майнер monero
tether limited 1060 monero pow bitcoin debian bitcoin poloniex ethereum wmx bitcoin форекс bitcoin bitcoin 99 bitcoin покупка nubits cryptocurrency bitcoin qazanmaq
bitcoin начало
калькулятор monero bitcoin автоматически bitcoin gift group bitcoin bitcointalk bitcoin доходность ethereum
шахты bitcoin zcash bitcoin bitcoin json
эпоха ethereum 100 bitcoin ethereum forks
wallet tether bitcoin elena ethereum twitter daily bitcoin bitcoin рухнул bitcoin antminer бесплатный bitcoin 1000 bitcoin bitcoin golden bitcoin видео bitcoin generator bitcoin get подтверждение bitcoin курс ethereum bitcoin greenaddress ethereum network оплата bitcoin money bitcoin ethereum forks bitcoin 3 bitcoin p2p 1080 ethereum ethereum swarm bitcoin реклама bitcoin prosto erc20 ethereum In aggregate, the incentive structure allows the network to reach consensus. Miners must incur significant upfront cost to secure the network but are only paid if valid work is produced; and the rest of the network can immediately determine whether work is valid or not based on consensus rules without incurring cost. While there are a number of consensus rules, if any pending transaction in a block is invalid, the entire block is invalid. For a transaction to be valid, it must have originated from a previous, valid bitcoin block and it cannot be a duplicate of a previously spent transaction; separately, each block must build off the most up to date version of history in order to be valid and it must also include a valid coinbase transaction. A coinbase transaction rewards miners with newly issued bitcoin in return for securing the network but it is only valid if the work is valid.bitcoin иконка accepts bitcoin