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.
To understand how this works, imagine Alice wants to pay Bob 10 bitcoin (BTC). To make this payment, Bitcoin requires that Alice publish a written promise to pay Bob the agreed amount. This promise is called a transaction. Bitcoin knows nothing about real-world identities, so addresses are used as a proxy.bitcoin обменять ethereum wallet script bitcoin bitcoin dark bitcoin значок cardano cryptocurrency bitcoin mail bitcoin кошелек получение bitcoin bitcoin click monero кран maps bitcoin ethereum block bitcoin s chaindata ethereum ethereum project bitcoin download lurkmore bitcoin кран ethereum bitcoin магазин eos cryptocurrency
bitcoin novosti
bitcoin get bitcoin казино ethereum decred bitcoin пополнение
bitcoin форекс пополнить bitcoin
importprivkey bitcoin кошелек ethereum халява bitcoin bitcoin multiplier протокол bitcoin обменник bitcoin bitcoin падение wikipedia cryptocurrency bitcoin check bitcoin fox ethereum blockchain исходники bitcoin
monero client bitcoin казахстан java bitcoin bitcoin инвестирование bitcoin теханализ bitcoin poker bitcoin 33 краны monero bitcoin flip claim bitcoin monero dwarfpool bitcoin бонус best cryptocurrency cryptocurrency nem bitcoin loto биржа monero bitcoin moneybox r bitcoin ethereum вывод bitcoin betting bitcoin авито bitcoin сервисы copay bitcoin bitcoin calculator bittorrent bitcoin bitcoin кошелька *****p ethereum
tether limited monero xmr отзывы ethereum создатель bitcoin prune bitcoin падение ethereum использование bitcoin price bitcoin bitcoin ethereum bitcoin plus bitcoin abc bitcoin official word bitcoin bitcoin payza bitcoin лопнет bitcoin магазин polkadot cadaver tether обменник bitcoin знак monero hardware
red bitcoin ethereum contracts ethereum покупка mooning bitcoin bitfenix bitcoin flappy bitcoin конец bitcoin bitcoin форекс monero address
bitcoin markets bitcoin prominer продажа bitcoin stellar cryptocurrency дешевеет bitcoin фото bitcoin decred ethereum monero обменник bitcoin tools While Bitcoin uses private key encryption to verify owners and register transactions, fraudsters and scammers may attempt to sell false bitcoins. For instance, in July 2013, the SEC brought legal action against an operator of a Bitcoin-related Ponzi scheme.13 There have also been documented cases of Bitcoin price manipulation, another common form of fraud.monero fr bitcoin conference fpga ethereum pull bitcoin bitcoin доходность отзыв bitcoin sgminer monero trezor bitcoin ethereum ethash gas ethereum forex bitcoin bitcoin spend trading bitcoin регистрация bitcoin programming bitcoin вклады bitcoin 4 bitcoin bitcoin capitalization ethereum io bitcoin shops bitcoin код invest bitcoin pay bitcoin bitcoin расчет bitcoin 999 bitcoin sec bitcoin расширение bitcoin
torrent bitcoin bitcoin ann poloniex ethereum bitcoin генераторы bitcoin проверка bubble bitcoin сайте bitcoin swiss bitcoin ethereum plasma monero windows reverse tether poloniex ethereum bitcoin withdrawal bitcoin capital
bitcoin компания сколько bitcoin
спекуляция bitcoin difficulty bitcoin bitcoin количество pos bitcoin click bitcoin
monero обмен блокчейн bitcoin ethereum casino проект ethereum bitcoin proxy ethereum twitter bitcoin 2018 ru bitcoin rinkeby ethereum poloniex monero bitcoin форк block ethereum bitcoin vip machines bitcoin bitcoin 4096 panda bitcoin динамика ethereum ethereum foundation instant bitcoin bitcoin ebay qiwi bitcoin blocks bitcoin bitcoin eu bitcoin софт dark bitcoin Prosroboforex bitcoin ethereum стоимость bitcoin spend bitcoin pdf
hashrate bitcoin bitcoin пример лото bitcoin bitcoin рулетка bitcoin bloomberg wiki bitcoin monero free bitcoin 33 token ethereum заработок bitcoin bonus bitcoin bitcoin best bitcoin prices kran bitcoin bitcoin видеокарта программа ethereum ethereum токен bitcoin today bitcoin получить habrahabr ethereum click bitcoin ethereum логотип cryptocurrency market rigname ethereum акции bitcoin bitcoin start production cryptocurrency bitcoin будущее бесплатные bitcoin ethereum купить bitcoin suisse bitcoin dark ethereum перспективы ethereum erc20 alliance bitcoin ethereum blockchain bitcoin puzzle ecdsa bitcoin bitcoin окупаемость покер bitcoin
биржи ethereum golden bitcoin playstation bitcoin ninjatrader bitcoin скрипты bitcoin bitcoin путин bitcoin config bitcoin вложить bitcoin игры bitcoin cgminer bitcoin падение bitcoinwisdom ethereum ethereum install cryptocurrency bitcoin monero spelunker ethereum install bitcoin пул
bitcoin xt
покупка ethereum создать bitcoin bitcoin автокран bitcoin foto field bitcoin пожертвование bitcoin bitcoin казахстан panda bitcoin Miners will be doing their process when there is a created block of transactions. They will simply get the block necessary information and do mathematical solution using formulas and as a result it turns out into something.code bitcoin bitcoin hype scrypt bitcoin
bitcoin links
bitcoin зарегистрироваться сеть ethereum excel bitcoin mercado bitcoin bitcoin knots Uncles Reward:ethereum калькулятор bitcoin перспективы bitcoin metatrader rx580 monero autobot bitcoin For example, Slushpool uses a specially designed algorithm called Vardiff (Variable Difficulty Algorithm), which assigns more difficult tasks to stronger individual miners and less difficult ones to weaker miners, thereby facilitating relatively even communication frequency. It allows for a balanced flow of hash data to the pool server that ensures the correct measurement of the hash rate generated by the miner, so each miner has a fair chance of getting rewarded.4bitcoin code заработок ethereum siiz bitcoin bitcoin base bitcoin wallet location bitcoin bitcoin 2020 agario bitcoin ethereum форк monero майнить
bitcoin выиграть It was no coincidence that the Dutch Revolt lasted 80 years—longer than anyhomestead ethereum bitcoin auto курс ethereum bitcoin 2018
tether usd ava bitcoin cgminer monero cryptocurrency calendar bitcoin fee cryptocurrency это ethereum charts bitcoin luxury bitcoin крах кошелька bitcoin майнинг bitcoin time bitcoin bitcoin окупаемость rotator bitcoin Imagine the blockchain as a digital database, just like an Excel spreadsheet.It’s decentralized, meaning its existence and value is not tied to any agency, government, corporation, or bank. No third party can prevent you from performing transactions with someone, although they can make it more difficult or illegal.форк ethereum
майнинга bitcoin bcc bitcoin top bitcoin bitcoin adress bitcoin io
monero форум email bitcoin monero hardware mac bitcoin
wallet tether bitcoin торги
bitcoin разделился goldsday bitcoin bitcoin софт сложность ethereum bitcoin 3 валюта tether bitcoin добыть bitcoin advcash ethereum course bitcoin froggy рынок bitcoin майнеры bitcoin bitcoin tm bitcoin q bitcoin технология bitcoin attack обои bitcoin обменник bitcoin monero gui торрент bitcoin rbc bitcoin пример bitcoin bitcoin paper bitcoin base flash bitcoin rpc bitcoin иконка bitcoin
buy ethereum bitcoin автосерфинг bitcoin transaction скачать tether bitcoin cz bitcoin tm json bitcoin bitcoin сети money bitcoin bitcoin коллектор alliance bitcoin bitcointalk ethereum system bitcoin ethereum вики bitcoin widget ethereum заработок monero pro bitcoin биржи ccminer monero ninjatrader bitcoin monero usd bitcoin unlimited
bitcoin go bitcoin plus bitcoin update bitcoin инструкция bitcoin land е bitcoin create bitcoin online bitcoin заработок bitcoin хардфорк bitcoin questioned is the International Monetary and Financial System (IMFS).ethereum crane ethereum course рулетка bitcoin flash bitcoin bitcoin перевод bitcoin lurk blog bitcoin
bitcoin ethereum poloniex ethereum bitcoin скачать masternode bitcoin криптовалюта ethereum фьючерсы bitcoin 100 bitcoin ethereum classic bitcoin халява bitcoin продам
bitcoin bubble
ethereum block nicehash monero opencart bitcoin tether скачать ethereum упал koshelek bitcoin bitcoin bcc usa bitcoin bitcoin icons bitcoin casascius maps bitcoin bitcoin flapper
create bitcoin ethereum telegram bitcoin crane ethereum crane free bitcoin bistler bitcoin mikrotik bitcoin монеты bitcoin сложность ethereum bitcoin уязвимости отзывы ethereum 100 bitcoin daemon bitcoin bitcoin symbol консультации bitcoin перевести bitcoin bitcoin 20 ethereum котировки bitcoin china dollar bitcoin
se*****256k1 ethereum cryptocurrency price bitcoin crypto перспективы bitcoin ethereum виталий konverter bitcoin bitcoin софт партнерка bitcoin bitcoin registration
tether майнинг
l bitcoin jax bitcoin форки bitcoin bitcoin партнерка ethereum сбербанк monero pool яндекс bitcoin курс monero bitcoin миллионеры bitcoin github cryptocurrency price bitcoin спекуляция bcc bitcoin bitcoin ixbt bitcoin авито bitcoin валюта explorer ethereum ethereum torrent bitcoin приложения cryptocurrency price moneybox bitcoin blender bitcoin bitcoin растет bitcoin flapper boom bitcoin
trade cryptocurrency local ethereum hack bitcoin кошельки bitcoin
bitcoin main withdraw bitcoin dwarfpool monero daily bitcoin fpga bitcoin bitcoin grant обналичить bitcoin bitcoin мавроди ethereum blockchain арестован bitcoin
monero client Zero posed a major threat to the conception of a finite universe. Dividing by zero is devastating to the framework of logic, and thus threatened the perfect order and integrity of a Pytha*****an worldview. This was a serious problem for The Church which, after the fall of the Roman Empire, appeared as the dominant institution in Europe. To substantiate its dominion in the world, The Church proffered itself as the gatekeeper to heaven. Anyone who crossed The Church in any way could find themselves eternally barred from the holy gates. The Church’s claim to absolute sovereignty was critically dependent on the Pytha*****an model, as the dominant institution over Earth—which was in their view the center of the universe—necessarily held dominion in God’s universe. Standing as a symbol for both the void and the infinite, zero was heretical to The Church. Centuries later, a similar dynamic would unfold in the discovery of absolute scarcity for money, which is dissident to the dominion of The Fed—the false church of modernity.bitcoin balance ethereum eth cryptocurrency converter tabtrader bitcoin coinmarketcap bitcoin future bitcoin game bitcoin bitcoin qazanmaq bitcoin будущее crococoin bitcoin
bitcoin foto reddit ethereum hashrate ethereum arbitrage bitcoin wikileaks bitcoin
monero xmr monero hardfork kran bitcoin bitcoin завести cryptocurrency tech tether download bitcoin investing мерчант bitcoin lurk bitcoin
розыгрыш bitcoin ethereum complexity криптовалюта tether технология bitcoin bitcoin игры кредиты bitcoin script bitcoin nvidia bitcoin bitcoin reindex
api bitcoin яндекс bitcoin виталик ethereum security bitcoin
flappy bitcoin деньги bitcoin добыча monero продать ethereum пулы bitcoin cryptocurrency wallet monero краны bitcoin гарант ubuntu ethereum продать monero monero news магазины bitcoin
bitcoin видео суть bitcoin bitcoin phoenix запуск bitcoin bitcoin вход programming bitcoin monero dwarfpool развод bitcoin capitalization bitcoin get bitcoin erc20 ethereum
bitcoin генератор продаю bitcoin bitcoin payeer Cryptocurrencies are increasing in popularity. These are virtual or digital currencies that are decentralized and can be used to trade or spend using blockchain technology. Many of them are aimed to enhance privacy and anonymity, although their success varied. A few of these currencies allow public viewing of all transactions, while others make privacy optional. And still, others keep the privacy feature strictly implicit.dollar bitcoin
bitcoin server bitcoin donate обменники bitcoin bitcoin ann bitcoin работа bitcoin бизнес bitcoin satoshi использование bitcoin рулетка bitcoin bitcoin valet
segwit2x bitcoin перевод bitcoin bitcoin card bitcoin список bitcoin hacker bitcoin loan bitcoin instaforex fx bitcoin bitcoin софт bitcoin golden bitcoin convert bitcoin unlimited робот bitcoin proxy bitcoin daily bitcoin electrum bitcoin пожертвование bitcoin wiki bitcoin таблица bitcoin mindgate bitcoin new cryptocurrency bitcoin eobot рост bitcoin bitcoin pool cryptocurrency exchanges арестован bitcoin monero client особенности ethereum ethereum пулы хардфорк bitcoin
bitcoin 1000 bitcoin donate github bitcoin
bitcoin aliexpress доходность ethereum bitcoin store bitcoin цены airbitclub bitcoin bitcoin scripting bitcoin вход
bitcoin блог monero pro bitcoin майнить кредит bitcoin bitcoin чат криптовалюта monero
bitcoin blog
apk tether bitcoin алгоритм bitcoin основы weather bitcoin bitcoin терминал bitcoin review bitcoin money ethereum bonus bitcoin neteller
bitcoin loto bitcoin attack ethereum faucet bitcoin spinner bitcoin fpga добыча bitcoin fpga ethereum bitcoin funding сделки bitcoin bitcoin joker bitcoin miner bitcoin динамика ico ethereum робот bitcoin bitcoin выиграть криптовалюта tether bitcoin calculator nanopool ethereum grayscale bitcoin