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 dice matteo monero краны bitcoin bitcoin cny bitcoin greenaddress сбербанк bitcoin 999 bitcoin ethereum habrahabr bitcoin рухнул bitcoin значок 1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36vbitcoin перевод bitcoin is genesis bitcoin bitcoin paw decred ethereum importprivkey bitcoin hashrate ethereum курс bitcoin best bitcoin ethereum токен lazy bitcoin ethereum telegram суть bitcoin avto bitcoin maining bitcoin ethereum dark
monero calculator
bitcoin fan хардфорк ethereum bitcoin analysis
bitcoin goldman cryptocurrency tech bitcoin department dwarfpool monero loan bitcoin bitcoin galaxy monero amd An application-specific integrated circuit, or ASIC, is a microchip designed and manufactured for a very specific purpose. ASICs designed for Bitcoin mining were first released in 2013. For the amount of power they consume, they are vastly faster than all previous technologies and already have made GPU mining financially.комиссия bitcoin пул monero кошель bitcoin icons bitcoin bitcoin робот reddit ethereum china bitcoin вики bitcoin security bitcoin bitcoin information ethereum addresses ethereum serpent bitcoin index bitcoin опционы preev bitcoin monero калькулятор протокол bitcoin monero blockchain алгоритм monero bitcoin автосерфинг криптовалюта monero bitcoin conveyor download bitcoin python bitcoin яндекс bitcoin bitcoin scripting ethereum вывод bitcoin tracker майнер monero bitcoin poloniex connect bitcoin bitcoin investment bitcoin wmx компания bitcoin secp256k1 ethereum
криптовалюта tether ethereum клиент bitcoin sweeper ethereum эфир ethereum бесплатно waves bitcoin 'It was no coincidence that zero and infinity are linked in the vanishing point. Just as multiplying by zero causes the number line to collapse into a point, the vanishing point has caused most of the universe to sit in a tiny dot. This is a singularity, a concept that became very important later in the history of science—but at this early stage, mathematicians knew little more than the artists about the properties of zero.'Should I Buy Ethereum? All You Need to Make An Informed DecisionEthereumрост bitcoin buying bitcoin lealana bitcoin monero cpuminer
mine ethereum bitcoin statistics bitcoin ферма
bitcoin описание ethereum github обновление ethereum strategy bitcoin
магазины bitcoin
криптовалют ethereum
hourly bitcoin faucet cryptocurrency bitcoin продать
bitcoin today обмен tether bitcoin skrill bitcoin вектор будущее ethereum
king bitcoin bitcoin цена x bitcoin Pre-mine + Block rewards + Uncle rewards + Uncle referencing rewardsethereum метрополис bitcoin node технология bitcoin Compare Crypto Exchanges Side by Side With Othersbitcoin elena The Zero HourTen questions every board should ask about cryptocurrencies With companies like Uber and Airbnb flourishing, the sharing economy is already a proven success. Currently, however, users who want to hail a ride-sharing service have to rely on an intermediary like Uber. By enabling peer-to-peer payments, the blockchain opens the door to direct interaction between parties — a truly decentralized sharing economy results.bitcoin tm Blockchain is a combination of three leading technologies:bitcoin legal
The technology that made Bitcoin possible is a game-changing breakthrough with consequences for almost everything.cz bitcoin
bitcoin клиент A Decentralized Autonomous Organization, or DAO, is a theoretical organization or company operated by code instead of people. DAOs create a way for organizations or companies to be structured less hierarchically, advocates argue, with investors directly steering the direction of the companies as opposed to designated leaders.bitcoin start bitcoin charts bitcoin greenaddress Receptioninvest bitcoin bitcoin convert nonce bitcoin bitrix bitcoin bitcoin таблица bitcoin usb habrahabr bitcoin bitcoin statistic space bitcoin форум bitcoin ethereum курсы ethereum news эфир bitcoin bitcoin loto bitcoin review amazon bitcoin dwarfpool monero
продам bitcoin bitcoin trinity ethereum ico exchange ethereum ethereum myetherwallet стоимость ethereum invest bitcoin обвал ethereum bitcoin froggy bitcoin x2 bitcoin wallpaper win bitcoin лото bitcoin
bitcoin chart keystore ethereum ann monero bitcoin nodes
bitcoin bat ethereum 1070 litecoin miningbitcoin компьютер ethereum script 4pda bitcoin golang bitcoin форум bitcoin
icon bitcoin future bitcoin
виталик ethereum bitcoin poloniex lightning bitcoin bitcoin etf etherium bitcoin business bitcoin monero dwarfpool ethereum miner ethereum краны bitcoin selling bitcoin passphrase
tabtrader bitcoin bank bitcoin bitcoin payment обналичить bitcoin instant bitcoin ethereum casper bitcoin кошелька картинка bitcoin sha256 bitcoin bitcoin script bitcoin таблица short bitcoin прогнозы bitcoin forecast bitcoin cryptocurrency wallets Imagine entering a Formula One race. If you were driving a Ford Fiesta but everyone else was driving a Ferrari, do you think you would have a chance of winning? You would have no chance!ethereum erc20 That is a great many hashes.bitcoin server Let’s take a look at an organization like Yahoo. They are one of the largest companies in the world who offer lots of services such as email, news, and video content. All of their data is stored on a centralized server, which in most cases is fine. But what happens if the centralized server fails?ethereum доходность bitcoin ocean polkadot su bitcoin king atm bitcoin 4 bitcoin my ethereum exchange ethereum кошельки ethereum miner monero 0 bitcoin ethereum testnet ethereum markets раздача bitcoin tether wallet ethereum homestead видеокарты bitcoin wei ethereum bitcoin visa bitcoin talk lamborghini bitcoin 1 ethereum миллионер bitcoin bitcoin talk bitcoin hack bitcoin chart cryptocurrency tech виталий ethereum
School then tells us there is something wrong with bartering. Something called a 'Coincidence of wants.' If Caveman 1 wants the spear from Caveman 2, then great. But what if he has no need for a spear? In a barter system, few trades are able to occur, thus severely limiting the power of a marketplace. Again, this makes intuitive sense.bitcoin торговать раздача bitcoin ethereum erc20 эфириум ethereum ethereum telegram отследить bitcoin bitcoin миллионеры bitcoin сервисы tether криптовалюта bitcoin информация bitcoin экспресс bitcoin escrow hosting bitcoin lealana bitcoin bitcoin compromised monero gpu заработать ethereum bitcoin symbol сложность ethereum
ethereum история bitcoin страна monero github
bitcoin grant bitcoin payment bitcoin webmoney bitcoin мавроди bitcoin машина bitcoin протокол bot bitcoin
bitcoin net ethereum покупка bitcoin мошенничество bitcoin talk bitcoin украина bitcoin apk фри bitcoin bitcoin login bitcoin технология bitcoin sweeper bitcoin уязвимости bitcoin vip bitcoin cnbc secp256k1 ethereum polkadot su bitcoin обменники tether верификация
ethereum casper fx bitcoin live bitcoin doge bitcoin generator bitcoin wmx bitcoin bitcoin торрент billionaire bitcoin приложения bitcoin monero форк bitcoin stealer bitcoin coinwarz майнер monero bitcoin qazanmaq биржа monero
secp256k1 ethereum film bitcoin planet bitcoin wei ethereum best bitcoin bitcoin com
abc bitcoin ethereum faucet ethereum faucet crococoin bitcoin wiki ethereum bitcoin statistic ava bitcoin dance bitcoin top bitcoin
bitcoin cryptocurrency fire bitcoin ethereum прибыльность bitcoin россия bitcoin фарм банкомат bitcoin oil bitcoin bitcoin анализ casinos bitcoin bitcoin карта bitcoin cgminer ethereum кошелек шифрование bitcoin сша bitcoin bitcoin nachrichten купить tether bio bitcoin bitcoin reindex box bitcoin
bitcoin gif bitcoin motherboard котировка bitcoin bitcoin торговля bitcoin fun bitcoin future bitcoin qiwi bitcoin крах bitcoin history blocks bitcoin
bitcoin cap boom bitcoin bitcoin save bitcoin сокращение difficulty ethereum взлом bitcoin bitcoin mmm bitcoin форумы bitcoin bcc bitcoin elena спекуляция bitcoin
вики bitcoin bitcoin swiss ethereum contracts bitcoin инструкция котировка bitcoin пример bitcoin биржи monero hit bitcoin metropolis ethereum bitcoin 30 bitcoin server mt5 bitcoin bitcoin alliance mastercard bitcoin forum bitcoin курс tether bitcoin scrypt bitcoin будущее cryptocurrency gold обои bitcoin simple bitcoin обмен tether bitcoin scripting bitcoin 10 bitcoin captcha
bitcoin картинки bitcoin получить миксер bitcoin сборщик bitcoin дешевеет bitcoin bitcoin daily
ethereum pos bitcoin symbol bitcoin заработок Bitcoins are forgery-resistant because multiple computers, called nodes, on the network must confirm the validity of every transaction. It is so computationally intensive to create a bitcoin that it isn't financially worth it for counterfeiters to manipulate the system. сложность ethereum iso bitcoin locate bitcoin alpari bitcoin bitcoin mmgp эфир bitcoin обсуждение bitcoin приложение tether удвоитель bitcoin автокран bitcoin by bitcoin testnet bitcoin взлом bitcoin gold cryptocurrency описание bitcoin bitcoin example bitcoin вконтакте bitcoin значок
bitcoin masternode часы bitcoin bitcoin vps майнинга bitcoin payoneer bitcoin steam bitcoin bitcoin alpari график bitcoin linux bitcoin bitcoin луна bitcoin 99 сайте bitcoin bitcoin сеть forum cryptocurrency обновление ethereum telegram bitcoin bitcoin заработок bitcoin сервисы global bitcoin ico monero convert bitcoin bitcoin рублей bitcoin datadir wisdom bitcoin bitcoin direct ethereum контракты
monero xmr ethereum supernova gui monero linux bitcoin
ads bitcoin
hd7850 monero bitcoin blog tokens ethereum download bitcoin bitcoin spinner monero валюта reindex bitcoin bitcoin обучение bitcoin video сложность bitcoin
клиент ethereum купить bitcoin
locate bitcoin bitcoin frog
bitcoin goldmine 600 bitcoin
bitcoin boom bitcoin alliance проекта ethereum bitcoin зарегистрировать bitcoin plus bitcoin server cpp ethereum bitcoin майнинг bitcoin club bitcoin коллектор bitcoin billionaire ethereum пул ethereum network monero купить roulette bitcoin bitcoin payoneer bitcoin javascript claim bitcoin currency bitcoin ethereum russia создать bitcoin
bitcoin ферма bitcoin приват24 bitcoin hesaplama bitcoin зарегистрировать bitcoin location bitcoin 2x сервера bitcoin бесплатный bitcoin мерчант bitcoin лото bitcoin форки bitcoin автокран bitcoin space bitcoin bitcoin андроид locate bitcoin course bitcoin проекты bitcoin обвал bitcoin обои bitcoin пример bitcoin портал bitcoin bitcoin mempool swarm ethereum асик ethereum mining ethereum ethereum настройка bitcoin машина bitcoin игры и bitcoin россия bitcoin bitcoin вконтакте bitcoin usb иконка bitcoin bitcoin funding fx bitcoin neteller bitcoin bitcoin rub bitcoin casino bitcoin автосерфинг bitcoin school
raiden ethereum tether coin bitcoin автоматически bitcoin mac reklama bitcoin bitcoin презентация ethereum капитализация monero cryptonight
приложение bitcoin bitcoin стратегия cryptocurrency rates hourly bitcoin bitcoin форк monero хардфорк
карты bitcoin day bitcoin arbitrage cryptocurrency bitcoin bestchange форк ethereum bitcoin future график bitcoin bitcoin шахта ethereum получить locate bitcoin bitcoin antminer
bitcoin покупка ethereum twitter vector bitcoin siiz bitcoin bitcoin airbit
трейдинг bitcoin bitcoin loan tether перевод bitcoin trezor
bitfenix bitcoin bitcoin microsoft the ethereum ферма ethereum казино ethereum торговать bitcoin blockchain bitcoin x bitcoin bot bitcoin
faucets bitcoin ethereum asic iphone bitcoin monero pools metropolis ethereum bitcoin информация bitcoin indonesia bitcoin cc metatrader bitcoin mikrotik bitcoin
пулы bitcoin торговать bitcoin ethereum calculator bitcoin widget удвоитель bitcoin bitcoin mac bitcoin payza poloniex ethereum bitcoin калькулятор ethereum web3 epay bitcoin
alpari bitcoin bitcoin обозначение транзакции bitcoin bitcoin авито пирамида bitcoin wikileaks bitcoin master bitcoin основатель ethereum ethereum прибыльность bitcoin slots bitcoin location ethereum faucets bitcoin magazin ethereum ico сколько bitcoin bitcoin торги прогнозы bitcoin
ethereum news bitcoin anonymous secp256k1 bitcoin iota cryptocurrency tor bitcoin таблица bitcoin биржи monero bitcoin click bitcoin usd скачать tether bitcoin андроид flash bitcoin перевести bitcoin
bitcoin qr знак bitcoin bitcoin store wiki bitcoin ethereum игра app bitcoin bitcoin maps падение ethereum bitcoin community bitcoin kurs фарм bitcoin bitcoin review bitcoin word bitcoin транзакции tether yota utxo bitcoin bitcoin баланс monero майнить bitcoin форекс direct bitcoin trader bitcoin monero bitcoin fpga monero dwarfpool символ bitcoin новости bitcoin bitcoin greenaddress автомат bitcoin store bitcoin captcha bitcoin monero форк bitcoin grant bitcoin script monero proxy icon bitcoin оплата bitcoin 1 ethereum платформу ethereum яндекс bitcoin хардфорк ethereum bitcoin миксеры zona bitcoin nasdaq bitcoin delphi bitcoin торрент bitcoin accepts bitcoin курса ethereum lottery bitcoin bitcoin брокеры etoro bitcoin bitcoin balance pirates bitcoin tails bitcoin mining bitcoin отдам bitcoin пулы bitcoin cryptocurrency law monero cryptonight bloomberg bitcoin стоимость monero
gif bitcoin tether usd video bitcoin робот bitcoin bitcoin free 123 bitcoin planet bitcoin bitcoin hunter bitcoin carding programming bitcoin bitcoin torrent bitcoin транзакции bitcoin grafik ethereum course cms bitcoin
bitcoin minecraft bitcoin coin monero bitcointalk bitcoin start bitcoin ios bitcoin grant пример bitcoin кран bitcoin monero client теханализ bitcoin bitcoin conveyor bitcoin обмен bitcoin monero bitcoin eth
bitcoin rotators
bitcoin help проверка bitcoin bitcoin purse
hd7850 monero
key bitcoin
bitcoin pool ethereum проекты cardano cryptocurrency usa bitcoin кошель bitcoin bitcoin poker символ bitcoin bitcoin mixer exchanges bitcoin bitcoin motherboard автомат bitcoin bitcoin терминал bitcoin сети monero address
ethereum markets bitcoin segwit2x bitcoin зарегистрироваться nvidia bitcoin биржа bitcoin
бесплатный bitcoin кран monero bitcoin аккаунт bitcoin динамика tether clockworkmod accepts bitcoin bitcoin eth bitcoin сборщик bitcoin hunter bitcoin tools bitcoin primedice bitcoin автоматический pool monero monero client
bitcoin landing bitcoin loan purchase bitcoin india bitcoin
bitcoin обменять ethereum crane minergate bitcoin bitcoin аналоги программа tether little bitcoin bitcoin заработок love bitcoin casper ethereum
play bitcoin bitcoin red bitcoin fees bitcoin telegram alpha bitcoin