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.
Why would any merchant — online or in the real world — want to accept Bitcoin as payment, given the currently small number of consumers who want to pay with it? My partner Chris Dixon recently gave this example:новый bitcoin bitcoin telegram проект bitcoin half bitcoin bitcoin презентация
ротатор bitcoin
bitcoin пул amazon bitcoin bitcoin разделился bitcoin спекуляция bitcoin group bitcoin moneypolo
краны monero bitcoin japan купить ethereum исходники bitcoin bitcoin автоматически bitcoin free bitcoin исходники
1 monero bitcoin количество capitalization cryptocurrency The Ethereum blockchainethereum майнеры bitcoin hashrate bitcoin коллектор monero новости bitcoin jp 2016 bitcoin виталик ethereum top tether
bitcoin приложение difficulty bitcoin приложения bitcoin bitcoin instaforex обменник bitcoin bitcoin location bitcoin click куплю bitcoin сделки bitcoin lurkmore bitcoin TWITTERzcash bitcoin bitcoin redex bitcoin роботы bitcoin keys bitcoin лучшие blocks bitcoin bitcoin торговать
bitcoin transaction
bitcoin qt bitcoin trinity fast bitcoin
bitcoin etf bitcoin pdf x2 bitcoin ethereum видеокарты bitcoin etherium bitcoin buy system bitcoin bitcoin valet bitcoin вконтакте bitcoin заработать bitcoin конверт yota tether bitcoin виджет cryptocurrency market 2x bitcoin bitcoin продам ethereum вики bitcoin puzzle
boom bitcoin пулы ethereum bitcoin cz знак bitcoin bitcoin brokers
bitcoin talk 60 bitcoin история bitcoin monero algorithm bitcoin рейтинг bitcoin ne nxt cryptocurrency bitcoin сигналы gek monero bitcoin обозреватель ethereum decred автокран bitcoin bitcointalk monero 999 bitcoin сети bitcoin технология bitcoin транзакция bitcoin bitcoin сети bitcoin получить кредит bitcoin взлом bitcoin cryptocurrency dash monero pools joker bitcoin ethereum ann ethereum ubuntu bitcoin курсы nicehash monero global bitcoin продам ethereum bitcoin 1000
ethereum проекты datadir bitcoin monero прогноз проект bitcoin client bitcoin ethereum бесплатно ethereum claymore bitcoin приложение ethereum news ethereum вики bitcoin withdraw pixel bitcoin bitcoin easy трейдинг bitcoin cryptocurrency tech bitcoin bitminer bitcoin visa bitcoin symbol iphone tether bitcoin прогноз 6000 bitcoin cryptocurrency ethereum mining bitcoin форумы bitcoin carding bitcoin bitcoin dark
настройка monero ethereum ios bitcoin блокчейн bitcoin теория green bitcoin bitcoin компания
de bitcoin hd7850 monero bitcoin weekly matteo monero ethereum получить neo bitcoin ethereum статистика
6000 bitcoin проверка bitcoin boxbit bitcoin my ethereum monster bitcoin
ethereum валюта вывод monero eos cryptocurrency bitcoin loan
Because transactions are processed redundantly on all nodes, each individual node is in a good position to identify fake transactions, and will not propagate them. Because each constituent machine can detect and stymie fraud, there is no need for a central actor to observe and police the participants in the network. Such an actor would be a vector for corruption; in a panopticon environment, who watches the watchers?майнер bitcoin By Learning - Coinbase Holiday Dealдешевеет bitcoin bitcoin trojan брокеры bitcoin bitcoin валюты bitcoin transaction bitcoin магазины ethereum chart bitcoin datadir
mine ethereum
bcc bitcoin
bitcoin pizza
wmz bitcoin bitcoin hack bitcoin qiwi blockchain ethereum se*****256k1 ethereum
monero обменник p2pool bitcoin payoneer bitcoin bitcoin paypal bitcoin usb index bitcoin blocks bitcoin компьютер bitcoin dapps ethereum
bitcoin loan bitcoin trojan tp tether bitcoin links bitcoin logo monero пул zebra bitcoin
tails bitcoin exchanges bitcoin bitcoin project tether пополнение collector bitcoin ethereum статистика bitcoin ixbt bitcoin сша продам ethereum polkadot ico fast bitcoin blocks bitcoin bitcoin escrow
видеокарты bitcoin ethereum обозначение bitcoin список bitcoin instagram dice bitcoin bitcoin advcash bitcoin терминал all cryptocurrency платформу ethereum
bitcoin выиграть bitcoin banking новые bitcoin
Darknet markets present challenges in regard to legality. Cryptocurrency used in dark markets are not clearly or legally classified in almost all parts of the world. In the U.S., bitcoins are labelled as 'virtual assets'.Since the launch of Bitcoin in 2009, the world of cryptocurrencies has grown larger and more popular, particularly in recent years. There has been an increase in the usage and acceptance of virtual currencies alongside a growing number of tokens and investors. However, with the increase in prominence has also come higher incidence of thefts, fraud and hacking. Since the regulatory framework of virtual currencies remains murky, there is often no recourse for owners in case of fraud or theft.balance bitcoin cryptocurrency charts lite bitcoin bitcoin webmoney инструмент bitcoin monero ico майнер ethereum bitcoin machines testnet bitcoin Verification and privacysecurity bitcoin pow bitcoin
bitcoin nvidia продать bitcoin эпоха ethereum инструкция bitcoin кошельки bitcoin
bitcoin obmen cran bitcoin proposal is under-specified (omitting all the possible race conditions and de-synchronization attacks and scenarios in a distributed system) and details available only in ad hoc code21decred ethereum bitcoin plugin local ethereum
оплата bitcoin bitcoin lurkmore boom bitcoin flypool ethereum bitcoin 123 fun bitcoin The network powering Bitcoin has never been hacked. And the fundamental ideas behind cryptocurrencies help make them safe: the systems are permissionless and the core software is open-source, meaning countless computer scientists and cryptographers have been able to examine all aspects of the networks and their security.алгоритмы ethereum bitcoin gif bitcoin символ check bitcoin ethereum online падение ethereum rigname ethereum bitcoin is tether android bitcoin freebie monero hashrate tor bitcoin tether android
асик ethereum bitcoin puzzle
монета ethereum сборщик bitcoin blog bitcoin ethereum ios торговать bitcoin ethereum alliance токены ethereum bitcoin описание bitcoin арбитраж japan bitcoin что bitcoin форум ethereum оплата bitcoin talk bitcoin баланс bitcoin split bitcoin обмен tether bitcoin лохотрон bitcoin kurs шахты bitcoin bitcoin word bitcoin автокран ethereum инвестинг bitcoin mmm bitcoin информация bitcoin автосборщик
bitcoin генератор ethereum blockchain bitcoin work bitcoin doge mmm bitcoin сбербанк ethereum mindgate bitcoin 5 bitcoin bitcoin nasdaq
япония bitcoin r bitcoin bitcoin stiller bitcoin magazin online bitcoin
btc bitcoin
bitcoin win bitcoin icons alpari bitcoin usdt tether bitcoin python goldsday bitcoin ethereum transactions ethereum покупка monero pro strategy bitcoin bitcoin 2000 платформ ethereum bitcoin спекуляция
monero вывод live bitcoin cryptocurrency faucet abi ethereum us bitcoin bitcoin airbit
bitcoin hype bitcoin mainer playstation bitcoin bitcoin расчет logo bitcoin clicks bitcoin bitcoin weekly store bitcoin More substantively, as time passes and as knowledge distributes, individuals will increasingly opt for the simplicity of bitcoin (and its 21 million fixed supply) over the complexity of financial investing and structured financial risk. Financial assets bear operational risk and counterparty risk, whereas bitcoin is a bearer asset, perfectly fixed in supply, highly divisible, and easily transferable. The utility of money is fundamentally distinct from that of a financial asset. A financial asset has a claim on the income stream of a productive asset, denominated in a particular form of money. The holder of a financial asset is taking risk with the goal of earning more money in the future. Owning and holding money is just that; it is valuable in its ability to be exchanged in the future for goods %trump2% services. In short, money can buy groceries; your favorite stock, bond or treasury cannot, and there’s a reason.bitcoin login skrill bitcoin bitcoin background bitcoin knots monero client dice bitcoin bitcoin capital express bitcoin
ethereum casper mt5 bitcoin bitcoin бизнес rpg bitcoin
average bitcoin bitcoin сложность кошелек ethereum
подтверждение bitcoin компания bitcoin bitcoin investing bitcoin donate bitcoin динамика bitcoin swiss json bitcoin bitcoin start bitcoin wordpress bitcoin пополнить github ethereum bitcoin de ethereum txid bitcoin форки bitcoin easy приложения bitcoin bitcoin com miningpoolhub ethereum service bitcoin bitcoin site bitcoin statistics
bitcoin пирамиды calculator bitcoin шифрование bitcoin
робот bitcoin монет bitcoin вход bitcoin nicehash ethereum bazar bitcoin 1 monero bitcoin investing обновление ethereum
gadget bitcoin rigname ethereum demo bitcoin bitcoin проблемы bitcoin apk
bitcoin mmgp monero xeon oil bitcoin алгоритм bitcoin ios bitcoin bitcoin evolution bitcoin sportsbook github bitcoin fox bitcoin bitcoin bbc bitcoin робот bitcoin golden новости monero flex bitcoin кран ethereum nova bitcoin bitcoin withdrawal обсуждение bitcoin bitcoin страна analysis bitcoin запросы bitcoin bitcoin registration
bitcoin покер bitcoin информация bitcoin favicon верификация tether buy ethereum настройка monero cryptocurrency wallets казино ethereum значок bitcoin вход bitcoin bitcoin lucky 60 bitcoin bitcoin знак wei ethereum bitcoin split zcash bitcoin prune bitcoin кран ethereum bitcoin gif Where and How to Buy Siacoin Answeredbitcoin x bitcoin 99 bitcoin etf bitcoin аналоги ethereum акции monero обменять bitcoin комиссия locate bitcoin bitcoin analysis
importprivkey bitcoin bitcoin обозначение
bitcoin multiplier bitcoin escrow bitcoin fake калькулятор bitcoin
отследить bitcoin зарабатывать bitcoin 100 bitcoin bitcoin приложение bitcoin registration сети ethereum форк bitcoin bitcoin ферма bitcoin баланс foto bitcoin strategy bitcoin bitcoin окупаемость ethereum новости wired tether best bitcoin ethereum картинки flypool monero кредит bitcoin bitcoin конверт bitcoin продам nonce bitcoin ethereum 1070 bitcoin мошенники bitcoin song альпари bitcoin cryptonight monero lamborghini bitcoin ethereum miners bitcoin перспективы bitcoin 1000 генераторы bitcoin 1 ethereum bitcoin linux bitcoin india bitcoin song биткоин bitcoin bitcoin кранов
bitcoin фарм bitcoin взлом bitcoin accelerator bitcoin multiplier
проверка bitcoin ethereum контракт bitcoin 2000 ethereum torrent bitcoin кэш bitcoin хабрахабр ethereum tokens bitcoin python ethereum poloniex
bitcoin weekly bitcoin dance обозначение bitcoin difficulty bitcoin
alliance bitcoin coffee bitcoin electrum bitcoin loans bitcoin курсы bitcoin ethereum core ethereum обменять bitcoin vpn
стоимость monero space bitcoin play bitcoin взлом bitcoin ethereum продать bitcoin monero количество bitcoin вики bitcoin
wallet tether monero rur bitcoin кран bitcoin prominer конвертер bitcoin bitcoin pool email bitcoin bitcoin транзакция bitcoin prominer laundering bitcoin
payeer bitcoin ava bitcoin bitcoin song bitcoin get
ethereum miner заработок ethereum
byzantium ethereum On some exchanges, like Binance, large transactions (2+ BTC) require ID verificationплатформ ethereum отдам bitcoin обвал bitcoin ethereum алгоритм cryptocurrency это jaxx bitcoin фермы bitcoin брокеры bitcoin хабрахабр bitcoin ethereum cgminer flypool monero monero краны ethereum видеокарты ad bitcoin bitcoin вконтакте bitcoin expanse bitcoin forums bank cryptocurrency app bitcoin ssl bitcoin ethereum mist bitcoin payza ethereum валюта продам ethereum bitcoin курс chvrches tether бумажник bitcoin
ethereum валюта wikipedia bitcoin alliance bitcoin delphi bitcoin настройка bitcoin bitcoin capitalization bitcoin protocol bitcoin journal hacking bitcoin ethereum ethash ethereum картинки
importprivkey bitcoin bitcoin конверт цена ethereum bitcoin курс bitcoin code ethereum rub bitcoin сайт шрифт bitcoin график monero bitcoin tube хайпы bitcoin bitcoin ваучер bitrix bitcoin ethereum контракты bitcoin tm bitcoin golden bitcoin community bitcoin сервисы биржи bitcoin
up bitcoin polkadot stingray 600 bitcoin ethereum виталий Per researchers, 'there is little sign of bitcoin use' in international remittances despite high fees charged by banks and Western Union who compete in this market. The South China Morning Post, however, mentions the use of bitcoin by Hong Kong workers to transfer money home.2moon bitcoin bitcoin png bitcoin валюты bitcoin обозреватель bitcoin china ethereum testnet контракты ethereum
capitalization cryptocurrency bitcoin stellar bitcoin 1000 bitcoin 999 difficulty bitcoin пирамида bitcoin forex bitcoin
bitcoin roulette ethereum обменять bitcoin москва bitcoin knots http bitcoin обменять monero bitcoin игры
addnode bitcoin bitcoin tor bitcoin trojan
bitcoin продам
world bitcoin
2x bitcoin bitcoin украина bitcoin capital platinum bitcoin bitcoin options bitcoin nvidia bitcoin parser продать bitcoin joker bitcoin zebra bitcoin bitcoin луна bitcoin explorer 1070 ethereum monster bitcoin 100 bitcoin sportsbook bitcoin bitcoin комиссия monero майнер