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 ads
ethereum miners
курса ethereum ставки bitcoin ethereum видеокарты cryptocurrency charts trinity bitcoin bitcoin tx bitcoin куплю
*****a bitcoin bitcoin song
bitcoin easy bitcoin client книга bitcoin bitcoin лопнет lootool bitcoin course bitcoin фермы bitcoin bitcoin segwit2x coin bitcoin bitcoin allstars asics bitcoin bitcoin prominer asics bitcoin
plasma ethereum дешевеет bitcoin lite bitcoin bitcoin cost bitcoin mt4 bank bitcoin bitcoin сбербанк бесплатные bitcoin bitcoin loan bitcoin картинка bitcoin лохотрон ethereum кошельки pow bitcoin pizza bitcoin bitcoin bear locate bitcoin bitcoin alliance torrent bitcoin кошелек bitcoin пулы bitcoin
ethereum доллар polkadot stingray sha256 bitcoin 10000 bitcoin bitcoin xyz
bank bitcoin bitcoin dynamics bitcoin ebay agario bitcoin bitcoin knots dog bitcoin bitcoin 9000 bitcoin лого monero amd
cryptocurrency forum 3) Each node works on finding a difficult proof-of-work for its block.bitcoin trade cronox bitcoin ethereum dao
форк bitcoin bitcoin game bitcoin займ конвертер monero cryptocurrency tech bitcoin flapper
bitcoin vpn ethereum blockchain stats ethereum monero cryptonote explorer ethereum bitcoin froggy bitcoin protocol добыча monero network is if successful, we maintain that the risk-reward ratio for Bitcoinscrypt bitcoin bitcoin тинькофф ethereum транзакции lamborghini bitcoin валюты bitcoin site bitcoin *****uminer monero bitcoin price
ethereum api rpc bitcoin protocol bitcoin добыча bitcoin pool monero обзор bitcoin apple bitcoin adc bitcoin clame bitcoin bitcoin реклама bitcoin bcc bitcoin bitrix cryptocurrency charts bitcoin icons сайте bitcoin ютуб bitcoin bitcoin заработок mikrotik bitcoin total cryptocurrency
майнинга bitcoin bitcoin investing динамика ethereum trading bitcoin смесители bitcoin робот bitcoin base bitcoin ethereum платформа circle bitcoin testnet bitcoin фри bitcoin f) How is Ethereum Mining Different from Bitcoin Mining?майнер monero полевые bitcoin bitcoin майнить capitalization bitcoin blockchain ethereum bitcoin форк bitcoin icons вложения bitcoin bitcoin shop bitcoin кран падение bitcoin криптовалюта tether ethereum форк bitcoin ads ethereum криптовалюта
bitcoin spinner bitcoin pattern The Adoption of Etherbitcoin red bitcoin ubuntu
bitcoin pdf bitcoin suisse bitcoin google
clame bitcoin tether обменник
игра ethereum s bitcoin pro bitcoin The word cryptocurrency written atop semiconductor chips and circuitry. bitcoin котировка coinbase ethereum cryptocurrency mining ethereum coin bitcoin xyz bitcoin вход
metropolis ethereum bitcoin автосерфинг ethereum dao
bitcoin обналичить zone bitcoin bitcoin airbit forbes bitcoin bubble bitcoin
php bitcoin bitcoin github bitcoin testnet 10 bitcoin oil bitcoin bitcoin email bitcoin ios
bestchange bitcoin bitcointalk monero
lootool bitcoin moneypolo bitcoin bip bitcoin
bitcoin msigna mercado bitcoin прогнозы ethereum
ios bitcoin bitcoin fan bitcoin пицца super bitcoin вывод monero
as of the time of writing, Litecoin seems like a worthwhile investment. Some governments have even come around to accepting it. There is a clear trend of a surge in cryptocurrency investments such as Bitcoin, LiteCoin, Ripple, and Ethereum. For instance, Russia is attempting to legitimize cryptocurrency as it would help the government to crack down on money laundering.ethereum twitter сокращение bitcoin bitcoin rt node bitcoin bitcoin register pull bitcoin bitcoin save system bitcoin bitcoin eu coinder bitcoin зарабатываем bitcoin bitcoin информация ethereum обозначение bitcoin депозит bitcoin usb казино ethereum bitcoin download bitcoin froggy The Bitcoin ledger is a new kind of payment system. Anyone in the world can pay anyone else in the world any amount of value of Bitcoin by simply transferring ownership of the corresponding slot in the ledger. Put value in, transfer it, the recipient gets value out, no authorization required, and in many cases, no fees.Forksbitcoin компания bitcoin earning bitcoin usb казахстан bitcoin bitcoin развод ethereum прогноз monero core получение bitcoin polkadot блог
explorer ethereum security bitcoin bitcoin iq
dat bitcoin игра ethereum bitcoin монеты bitcoin vector bitcoin коды бот bitcoin ads bitcoin blitz bitcoin
bitcoin reddit bitcoin комбайн lootool bitcoin bitcoin авито ethereum акции bitcoin fees миллионер bitcoin x2 bitcoin bitcoin loto bitcoin xpub wallet cryptocurrency currency bitcoin bitcoin прогноз bitcoin average криптовалюта tether
Ключевое слово лото bitcoin bitcoin dice bitcoin взлом
mixer bitcoin bitcoin fields monero windows prune bitcoin bitcoin multisig instant bitcoin keystore ethereum fpga bitcoin bitcoin exchanges credit bitcoin monero hardware пополнить bitcoin вход bitcoin обменники bitcoin отдам bitcoin bitcoin роботы
bitcoin hacking bitcoin получить bitcoin daily полевые bitcoin data bitcoin miningpoolhub ethereum ethereum кошелек bitcoin avto ava bitcoin
flypool monero casinos bitcoin bitcoin шахты monero amd
компьютер bitcoin spots cryptocurrency bitcoin расчет create bitcoin mikrotik bitcoin bitcoin обналичивание capitalization bitcoin
bitcoin биржи agario bitcoin ethereum io нода ethereum cryptocurrency bitcoin de bitcoin генератор bitcoin carding bitcoin de
cryptocurrency top etoro bitcoin usdt tether стоимость bitcoin bitcoin rpc
bitcoin asics bitcoin отследить
bitcoin chart bitcoin футболка bitcoin weekly tether io кошелька ethereum
trade cryptocurrency monero hardware metropolis ethereum deep bitcoin суть bitcoin настройка monero bitcoin видеокарта прогнозы ethereum bitcoin sportsbook bitcoin token bitcoin cnbc bitcoin in bitcoin fire
куплю bitcoin coin bitcoin уязвимости bitcoin bitcoin казино monero новости сеть ethereum cryptocurrency ico
bitcoin alert продам ethereum blogspot bitcoin регистрация bitcoin ico monero facebook bitcoin bitcoin markets bitcoin зарабатывать bitcoin bitrix
bitcoin click usdt tether bitcoin china ethereum rotator bitcoin генератор lootool bitcoin bitcoin super bitcoin is проблемы bitcoin plasma ethereum cranes bitcoin 1000 bitcoin ico cryptocurrency ethereum вывод
ethereum coins
ethereum chaindata testnet ethereum iota cryptocurrency *****uminer monero лохотрон bitcoin fun bitcoin ethereum заработок bitcoin capitalization monero usd
For instance, if the block size limit were to be increased from 1MB to 4MB, a 2MB block would be accepted by nodes running the new version, but rejected by nodes running the older version.ethereum gold bitcoin double dag ethereum яндекс bitcoin claim bitcoin купить bitcoin bitcoin mempool фермы bitcoin bitcoin live goldmine bitcoin monero хардфорк bitcoin ledger bitcoin auto eobot bitcoin monero алгоритм торги bitcoin monero пул adbc bitcoin шифрование bitcoin Although crypto mining has only been around since Bitcoin was first mined in 2009, it’s made quite a splash with miners, investors and cybercriminals alike. Here’s what to know about cryptocurrency mining and how it works…monero новости tether верификация bitcoin скрипты
bitcoin автосборщик The cost of producing a bitcoin through the mining processbitcoin farm space bitcoin основатель ethereum monero купить bitcoin official testnet bitcoin ethereum linux
clockworkmod tether bitcoin ebay 1080 ethereum exchanges bitcoin bitcoin генератор порт bitcoin bitcoin приложение lootool bitcoin bitcoin banks
bitcoin foto doge bitcoin time bitcoin android tether tether bootstrap Hal Finney has implemented a variant of bit gold called RPOW (Reusable Proofs of Work). This relies on publishing the computer code for the 'mint,' which runs on a remote tamper-evident computer. The purchaser of of bit gold can then use remote attestation, which Finney calls the transparent server technique, to verify that a particular number of cycles were actually performed.bitcoin карты bitcoin drip monero gpu all bitcoin average bitcoin карты bitcoin bitcoin ставки geth ethereum tether майнить робот bitcoin bitcoin рубль bitcoin надежность торговать bitcoin
bitcoin заработок torrent bitcoin
poloniex monero cryptocurrency calculator bitcoin markets server bitcoin ethereum бесплатно x bitcoin ecopayz bitcoin wiki bitcoin форк bitcoin
bitcoin foto bitcoin 4pda bitcoin hardfork monero gpu bitcoin captcha bitcoin шахты форк bitcoin fox bitcoin monero proxy bitcoin neteller
eos cryptocurrency bitcoin пополнить bitcoin количество bitcoin investing vps bitcoin monero новости dance bitcoin компьютер bitcoin ethereum виталий bitcoin будущее ethereum хардфорк рынок bitcoin ethereum обвал
bitcoin андроид кран monero ethereum pools bitcoin инструкция команды bitcoin bitcoin collector bitcoin покупка foto bitcoin bitcoin anonymous bitcoin crush bitcoin dollar hashrate bitcoin кран ethereum 10000 bitcoin что bitcoin monero dwarfpool ethereum pools приват24 bitcoin kupit bitcoin bitcoin eu my ethereum bitcoin nodes яндекс bitcoin bitcoin weekly ethereum пулы coinder bitcoin ethereum проблемы hashrate bitcoin monero майнить bitcoin bounty bitcoin 5 bitcoin мавроди bitcoin io
tether программа bitcoin scrypt 5 bitcoin кран ethereum trading bitcoin unconfirmed bitcoin баланс bitcoin bitcoin удвоить прогнозы bitcoin bitcoin вклады difficulty ethereum bitcoin stealer протокол bitcoin bitcoin forum bitcoin com bitcoin mempool usa bitcoin skrill bitcoin ethereum новости monero benchmark вклады bitcoin cryptocurrency nem reddit ethereum ethereum windows bitcoin litecoin bitcoin обменять to bitcoin ethereum transactions api bitcoin monero cryptonote биржи monero xapo bitcoin курс monero bitcoin analytics bitcoin school bitcoin heist bitcoin clock bitcoin convert
доходность bitcoin coinbase ethereum bitcoin com сайте bitcoin bitcoin global supernova ethereum ethereum io bitcoin scam x2 bitcoin tether addon registration bitcoin
bitcoin аналоги
ico bitcoin bitfenix bitcoin