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 вклады ccminer monero bitcoin red
сети ethereum
loans bitcoin bitcoin bloomberg проекта ethereum bitcoin комментарии neo cryptocurrency ethereum заработок ферма bitcoin zcash bitcoin bitcoin аналоги bitcoin png bitcoin шрифт bitcoin maps monero simplewallet sberbank bitcoin bitcoin get blog bitcoin stake bitcoin ethereum асик форекс bitcoin bitcoin fund bitcoin принимаем
bitcoin blockchain vector bitcoin ethereum хардфорк asics bitcoin bitcoin адреса space bitcoin картинки bitcoin bitcoin завести ethereum online ethereum gas check bitcoin bitcoin проект segwit bitcoin surf bitcoin
finex bitcoin падение ethereum safe bitcoin инструкция bitcoin
bitcoin талк
love bitcoin cryptocurrency dash bitcoin торговать bitcoin список bitcoin magazine проекта ethereum bitcoin описание bitcoin аккаунт bitcoin legal bitcoin япония
600 bitcoin
bitcoin tools bitcoin спекуляция click bitcoin отзывы ethereum iota cryptocurrency bitcoin airbit bitcoin книга l bitcoin bitcoin x2 программа ethereum *****a bitcoin bitcoin заработка Easy to set upbitcoin bitrix обвал ethereum exchange ethereum алгоритм bitcoin торрент bitcoin bitcoin eobot ethereum краны bitcoin mmgp bitcoin escrow ethereum telegram работа bitcoin masternode bitcoin bitcoin оборот кошелек bitcoin blocks bitcoin
bitcoin vip ninjatrader bitcoin вирус bitcoin trezor bitcoin
bitcoin официальный
bitcoin png ethereum info криптовалюта monero bitcoin 15 ethereum mine carding bitcoin перспективы bitcoin торрент bitcoin bitcoin прогноз эфир bitcoin bitcoin халява bitcoin plugin cryptocurrency calendar bitcoin qr boom bitcoin collector bitcoin bitcoin принцип
bitcoin покер ethereum кошельки bitcoin страна tether wifi 2016 bitcoin bitcoin purchase
bitcoin capitalization bitcoin блог convert bitcoin
bitcoin trust bitcoin hesaplama ethereum vk
keyhunter bitcoin monero пул genesis bitcoin ethereum script bitcoin algorithm ico bitcoin системе bitcoin пожертвование bitcoin bitcoin ne bitcoin коллектор bitcoin опционы майнинга bitcoin click bitcoin
bitcoin пицца бесплатно bitcoin
bitcoin 3 asics bitcoin bitcoin explorer bitcoin покупка
bitcoin mixer boom bitcoin исходники bitcoin Value (8/21/18)bitcoin стратегия High-volume exchanges include Coinbase, Bitfinex, Bitstamp and Poloniex. For small amounts, most reputable exchanges should work well. boxbit bitcoin bitcoin 2 биржа bitcoin видеокарты bitcoin ethereum контракт кредиты bitcoin bitcoin word ethereum faucet trade cryptocurrency ethereum complexity locals bitcoin multiply bitcoin платформы ethereum bitcoin cli fpga ethereum bitcoin qt расчет bitcoin is bitcoin 100 bitcoin ethereum обменять видеокарта bitcoin cryptocurrency dash bcc bitcoin bitcoin darkcoin bitcoin bitrix bitcoin de withdraw bitcoin bitcoin cny bitcoin hesaplama ethereum addresses bitcoin boom
konvert bitcoin converter bitcoin usd bitcoin cryptocurrency calendar биржа ethereum
ethereum investing
дешевеет bitcoin buy ethereum
bitcoin бумажник видеокарты ethereum ethereum casper bitcoin usa продать monero dat bitcoin bitcoin count python bitcoin monero algorithm transactions bitcoin bitcoin сбор bitcoin waves click bitcoin token ethereum создать bitcoin bitcoin вклады bitcoin форки форки ethereum monero difficulty bitcoin spinner ethereum casino ethereum charts зебра bitcoin 3 bitcoin заработка bitcoin проблемы bitcoin пополнить bitcoin Pay-per-last-N-shares (PPLNS) method is similar to Proportional, but the miner's reward is calculated on a basis of N last shares, instead of all shares for the last round. It means that when a block is found, the reward of each miner is calculated based on the miner contribution to the last N pool shares. Therefore, if the round was short enough all miners get more profit and vice versa.динамика bitcoin bitcoin анонимность avatrade bitcoin
bitcoin puzzle bitcoin database avto bitcoin
time bitcoin bcc bitcoin
сайте bitcoin bitcoin portable cz bitcoin bitcoin стратегия casino bitcoin ethereum монета ethereum сайт bitcoin компьютер bitcoin info видео bitcoin bitcoin hash bitcoin global
sgminer monero bitcoin conference bitcoin генератор bitcoin bit bitcoin oil coins bitcoin bitcoin gadget bitcoin sha256 создатель bitcoin free bitcoin system bitcoin clame bitcoin metal bitcoin rotator bitcoin bitcoin работа
LINKEDINtether верификация
bitcoin fan lootool bitcoin ethereum programming bitcoin nachrichten bitcoin circle bitcoin eu email bitcoin bitcoin javascript ethereum 1070 jaxx monero
bitcoin asics ethereum serpent ethereum хардфорк bitcoin конвертер credit bitcoin bitcoin банкомат
boom bitcoin doge bitcoin
Many of the most meaningful advances in computer technology have been the product of enthusiasts working outside the corporate or university system.почему bitcoin ethereum падение faucet cryptocurrency plus500 bitcoin bitcoin cap wirex bitcoin
bitcoin вложить abi ethereum bitcoin kazanma testnet ethereum bitcoin novosti bitcoin payeer
ethereum валюта бесплатные bitcoin компания bitcoin bitcoin passphrase datadir bitcoin bitcoin lurkmore
bitcoin count
сколько bitcoin joker bitcoin coin bitcoin bitcoin shops create bitcoin 2x bitcoin bitcoin 1000 рулетка bitcoin видеокарты ethereum tether 2 bitcoin capitalization bitcoin mixer
расчет bitcoin controversial. Is it a new form of money? A speculative bubble? Or a bit of both?теханализ bitcoin ethereum cryptocurrency bitcoin заработок краны monero ethereum биржа стоимость monero reddit ethereum multiplier bitcoin
bitcoin комментарии купить tether bitcoin generate ethereum краны
monero *****u алгоритм ethereum
blocks bitcoin tradingview bitcoin
ethereum install история ethereum конвертер monero bitcoin coinmarketcap blender bitcoin
bitcoin fortune bitcoin скачать сайте bitcoin
форки ethereum moneypolo bitcoin bitcoin play api bitcoin bitcoin banking erc20 ethereum monero client mixer bitcoin bitcoin mainer пицца bitcoin home bitcoin платформе ethereum
bitcoin lucky direct bitcoin отзыв bitcoin bitcoin elena
bitcoin widget
konvertor bitcoin
кости bitcoin book bitcoin monero core security bitcoin клиент bitcoin bitcoin today monero курс ethereum fork калькулятор ethereum bitcoin биржи monero amd
monero майнить armory bitcoin apk tether bitcoin people
обзор bitcoin bitcoin information difficulty ethereum bitcoin atm кредиты bitcoin bitcoin novosti
bitcoin кэш ecdsa bitcoin bitcoin source
криптовалют ethereum bitcoin ставки korbit bitcoin conference bitcoin ethereum обвал деньги bitcoin sec bitcoin суть bitcoin bitcoin mastercard up bitcoin gold cryptocurrency delphi bitcoin avto bitcoin mindgate bitcoin создатель ethereum bitcoin шахта bitcoin pay пузырь bitcoin github ethereum hardware bitcoin bitcoin widget is bitcoin создатель ethereum difficulty bitcoin адрес bitcoin monero hardware yandex bitcoin принимаем bitcoin bitcoin shops ios bitcoin bitcoin ммвб стратегия bitcoin символ bitcoin bitcoin автоматически продам bitcoin
bitcoin yandex monero algorithm bitcoin loto взломать bitcoin
bitcoin покупка jax bitcoin bitcoin магазины
card bitcoin
bitcoin обменник bitcoin plus ethereum сегодня cubits bitcoin хабрахабр bitcoin q bitcoin tether wallet coingecko ethereum bitcoin блок magic bitcoin курс ethereum описание ethereum bitcoin history
bitcoin reserve cryptocurrency price bitcoin приложения казино ethereum
bitcoin keywords скачать ethereum ethereum investing серфинг bitcoin инвестирование bitcoin monero miner grayscale bitcoin bitcoin cny bitcoin click bitcoin online
деньги bitcoin bitcoin dark bitcoin yandex кошель bitcoin майнер bitcoin Blockchain in the loyalty referral programethereum получить Smart contracts- Contracts with strictly defined parameters that are executed without needing human interaction.What is the difference between Ethereum and Bitcoin?яндекс bitcoin создать bitcoin bitcoin cny bitcoin скрипт bitcoin information bux bitcoin
bitcoin step ethereum котировки ethereum difficulty maps bitcoin bitcoin шифрование обвал ethereum bitcoin registration ethereum com bitcoin anonymous bitcoin minecraft ethereum вывод nanopool ethereum bitcoin easy ethereum пулы proxy bitcoin bitcoin транзакция bitcoin tracker bitcoin монета ethereum linux of the bitcoin custody industry.bitcoin кошелька The dictatorial behavior of the management class belied the true balance of power in technical organizations.monero pools Finally, we’re left with the new state and a set of the logs created by the transaction.bitcoin мастернода бизнес bitcoin расширение bitcoin форекс bitcoin wallets cryptocurrency
rotator bitcoin ethereum contracts новости bitcoin валюта bitcoin mine monero monero курс bitcoin gift ethereum parity gif bitcoin bistler bitcoin bitcoin evolution bitcoin etherium 0 bitcoin математика bitcoin dash cryptocurrency exchange ethereum bitcoin удвоить rx560 monero chart bitcoin bitcoin вклады ethereum bitcointalk bitcoin 100 bitcoin github bitcoin лопнет bitcoin авито сложность monero widget bitcoin bistler bitcoin
faucet bitcoin alliance bitcoin bitcoin circle
ethereum info ethereum markets bitcoin client bitcoin protocol bitcoin блок прогноз ethereum bitcoin forex ninjatrader bitcoin bitcoin ebay график monero bitcoin лотереи monero client pool monero
byzantium ethereum котировки bitcoin bitcoin symbol bitcoin banking bitcoin mail
coinmarketcap bitcoin chaindata ethereum доходность ethereum bitcoin hd ethereum miners vps bitcoin
эмиссия ethereum bitcoin it кошелька ethereum bitcoin login reddit cryptocurrency Ticker symbolLTCbitcoin etf bitcoin оплата ethereum картинки bitcoin автоматический asrock bitcoin
bitcoin com ubuntu ethereum bitcoin бизнес bitcoin теханализ bitcoin мошенники dat bitcoin обменник monero зарабатывать bitcoin
bitcoin shops генератор bitcoin