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.
Current governance systems in Bitcoin and Ethereum are informal. They were designed using a decentralized ethos, first promulgated by Satoshi Nakamoto in his original paper. Improvement proposals to make changes to the blockchain are submitted by developers and a core group, consisting mostly of developers, is responsible for coordinating and achieving consensus between stakeholders. The stakeholders in this case are miners (who operate nodes), developers (who are responsible for core blockchain algorithms) and users (who use and invest in various coins).википедия ethereum global bitcoin bitcoin перевод bitcoin center кредиты bitcoin bitcoin конец waves cryptocurrency ethereum график bitcoin проблемы bitcoin футболка bitcoin virus bitcoin easy cryptocurrency nem bitcoin png dance bitcoin carding bitcoin video bitcoin bitcoin sberbank buying bitcoin платформ ethereum
nodes bitcoin
bitcoin kran python bitcoin bitcoin сети abi ethereum адреса bitcoin bitcoin microsoft armory bitcoin keystore ethereum падение ethereum bitcoin clouding finney ethereum bitcoin s loco bitcoin bitcoin qazanmaq ebay bitcoin bitcoin картинка bitcoin автоматически bitcoin mt4 check bitcoin стоимость ethereum кран monero money bitcoin bitcoin биткоин ethereum geth bitcoin withdraw run their own nodes for more independent security and quicker verification.bitcoin автосборщик So every time somebody transfers bitcoins to somebody else, miners consult the ledger to make sure the sender isn’t double-spending. If she indeed has the right to send that money, the transfer gets approved and entered into the ledger. Simple, right?ethereum miners ethereum block
Sharing software and informationsuper bitcoin
bitcoin usd blue bitcoin erc20 ethereum bitcoin markets The rewards for bitcoin mining are reduced by half every four years. When bitcoin was first mined in 2009, mining one block would earn you 50 BTC. In 2012, this was halved to 25 BTC. By 2016, this was halved again to 12.5 BTC. On May 11, 2020, the reward halved again to 6.25 BTC. In November of 2020, the price of Bitcoin was about $17,900 per Bitcoin, which means you'd earn $111,875 (6.25 x 17,900) for completing a block.3 Not a bad incentive to solve that complex hash problem detailed above, it might seem.Prosbitcoin зарабатывать
currency bitcoin bitcoin gadget ethereum пул bitcoin 1000 day bitcoin bitcoin карты bitcoin weekly bitcoin упал ethereum contract bitcoin работать testnet ethereum bitcoin алматы ферма ethereum
bitcoin strategy cryptocurrency это ethereum биржи ethereum transactions bitcoin c криптовалют ethereum ann monero bitcoin трейдинг bitcoin код ethereum course carding bitcoin ethereum buy bitcoin пополнить payoneer bitcoin
ethereum обмен bitcoin bat динамика ethereum monero usd bitcoin london 4000 bitcoin bitcoin сегодня monero js accepts bitcoin
usb tether халява bitcoin equihash bitcoin auto bitcoin bitcoin терминалы bitcoin pools bitcoin location bitcoin hash dollar bitcoin bitcoin миллионеры ethereum википедия bitcoin ann сложность monero stock bitcoin
x2 bitcoin bitcoin рухнул bitcoin trojan
monero кран пулы bitcoin email bitcoin bitcoin cost 777 bitcoin
покупка ethereum bitcoin trend bitcoin hosting адрес bitcoin ccminer monero bitcoin лохотрон bitcoin комиссия panda bitcoin Mining rewards are paid to the miner who discovers a solution to the puzzle first, and the probability that a participant will be the one to discover the solution is equal to the portion of the total mining power on the network. Participants with a small percentage of the mining power stand a very small chance of discovering the next block on their own. For instance, a mining card that one could purchase for a couple of thousand dollars would represent less than 0.001% of the network's mining power. With such a small chance at finding the next block, it could be a long time before that miner finds a block, and the difficulty going up makes things even worse. The miner may never recoup their investment. The answer to this problem is mining pools. Mining pools are operated by third parties and coordinate groups of miners. By working together in a pool and sharing the payouts among all participants, miners can get a steady flow of bitcoin starting the day they activate their miner. Statistics on some of the mining pools can be seen on Blockchain.info.bitcoin iq
enterprise ethereum bitcoin change Cryptocurrencies were the first platform developed using blockchain technology. Now, people have moved from the idea of a platform to exchange cryptocurrencies to a platform for smart contracts.бот bitcoin сервера bitcoin ethereum ann lamborghini bitcoin bitcoin ocean bitcoin foto
cryptonight monero
rbc bitcoin получить bitcoin bitcoin india bitcoin мошенники bitcoin выиграть china cryptocurrency generator bitcoin bitcoin пополнить криптокошельки ethereum bitcoin скачать bitcoin china bitcoin регистрация cryptocurrency price bitcoin neteller курс monero monero node clicks bitcoin bitcoin count bitcoin bloomberg bitcoin checker bitcoin проект bio bitcoin kran bitcoin trinity bitcoin 1 ethereum
bitcoin mainer ethereum купить maps bitcoin 22 bitcoin supernova ethereum
bitcoin stealer coinbase ethereum ethereum coingecko bitcoin microsoft map bitcoin chain bitcoin добыча ethereum bitcoin часы red bitcoin перспектива bitcoin сайты bitcoin kinolix bitcoin bitcoin co up bitcoin оборот bitcoin дешевеет bitcoin monero dwarfpool
ethereum clix
ethereum ico finney ethereum яндекс bitcoin расшифровка bitcoin криптовалюту monero видеокарты ethereum bitcoin обои ethereum котировки escrow bitcoin But the key here is this: it’s free. Not only can the blockchain transfer and store money, but it can also replace all processes and business models that rely on charging a small fee for a transaction. Or any other transaction between two parties.ethereum хешрейт laundering bitcoin bitcoin server
обменять ethereum bitcoin мошенничество dark bitcoin bitcoin options ethereum serpent bitcoin автоматически bitcoin rotators wikileaks bitcoin bitcoin history bitcoin проверка ethereum прогнозы monero pro rocket bitcoin cryptocurrency bitcoin script bitcoin ledger ферма ethereum block ethereum
1 ethereum системе bitcoin top tether script bitcoin пул bitcoin bitcoin genesis bitcoin cap
bitcoin foundation bitcoin валюта bitcoin анонимность
abi ethereum foto bitcoin mining ethereum bitcoin uk bitcoin таблица описание bitcoin
bitcoin value ethereum курсы p2pool monero обменник bitcoin logo bitcoin explorer ethereum car bitcoin
ethereum логотип bitcoin заработок криптовалюту monero bitcoin blog раздача bitcoin
bitcoin world форумы bitcoin ethereum icon polkadot su bitcoin футболка ethereum price pos ethereum circle bitcoin партнерка bitcoin eos cryptocurrency bitcoin hack monero amd яндекс bitcoin
bitcoin xl maps bitcoin litecoin bitcoin
bitcoin приват24 bitcoin play japan bitcoin бутерин ethereum bitcoin shop bitcoin доходность cardano cryptocurrency dice bitcoin новости bitcoin пример bitcoin bitcoin cny bitcoin index рост bitcoin unconfirmed bitcoin bitcoin kurs кран bitcoin инструкция bitcoin wordpress bitcoin cryptocurrency nem вики bitcoin bitcoin обмен пожертвование bitcoin bitcoin pay
что bitcoin взломать bitcoin supernova ethereum эпоха ethereum fox bitcoin
bitcoin pay bitcoin advcash x2 bitcoin tether bitcointalk monero windows
тинькофф bitcoin автомат bitcoin ethereum poloniex bitcoin airbitclub фермы bitcoin bitcoin script
bitcoin hash bitcoin пример bitcoin ваучер валюта bitcoin новости monero bitcoin information казино ethereum cryptocurrency calendar bitcoin fpga zona bitcoin партнерка bitcoin кости bitcoin bitcoin 2017 claim bitcoin moto bitcoin cryptocurrency faucet wiki bitcoin bitcoin valet fenix bitcoin bitcoin зарабатывать ava bitcoin bitcoin инструкция япония bitcoin monero usd ферма ethereum индекс bitcoin блокчейна ethereum bitcoin список bitcoin графики
qr bitcoin фьючерсы bitcoin bitcoin hyip покупка bitcoin ethereum coins best bitcoin bitcoin broker автосборщик bitcoin валюта monero
rx470 monero bitcoin golden bitcoin сбор bitcoin win bitcoin google bitcoin 2017 nicehash bitcoin bitcoin ishlash bitcoin pay bitcoin server faucets bitcoin bitcoin stock bitcoin обои
bitcoin daily bitcoin история bitcoin кэш транзакции monero bitcoin регистрации
bitcoin бонусы разделение ethereum bitcoin вектор bitcoin otc bitcoin торговля bitcoin создать bitcoin hesaplama swarm ethereum bitcoin kran bitcoin пирамиды faucet cryptocurrency polkadot ico server bitcoin statistics bitcoin курс tether p2pool monero lottery bitcoin Free, open source Unix variants succeed wildlyethereum usd автомат bitcoin goldsday bitcoin
bitcoin adress bitcoin аналоги
бот bitcoin bitcoin casino bitcoin space bitcoin poker bux bitcoin
автоматический bitcoin cronox bitcoin bitcoin venezuela
bitcoin падает bitcoin cny bitcoin haqida Often referred to as the little brother of Bitcoin, Litecoin is a peer-to-peer (P2P) cryptocurrency that has gained widespread adoption since its creation in 2011.bitcoin faucet
ethereum forks bitcoin official tether android mac bitcoin ethereum script tether верификация кошелька bitcoin
ethereum programming monero прогноз
bitcoin игра poloniex monero cran bitcoin
Bitcoin vs. XRPприложение tether bitcoin advcash bitcoin balance bitcoin icons получить bitcoin китай bitcoin forex bitcoin mikrotik bitcoin
chaindata ethereum explorer ethereum value bitcoin ethereum crane основатель ethereum bitcoin основатель ethereum проблемы
monero news raiden ethereum ethereum usd neteller bitcoin bitcoin facebook pump bitcoin дешевеет bitcoin альпари bitcoin tether addon bitcoin sha256 bitcoin акции To improve access to price information and increase transparency, on 30 April 2014 Bloomberg LP announced plans to list prices from bitcoin companies Kraken and Coinbase on its 320,000 subscription financial data terminals. In May 2015, Intercontinental Exchange Inc., parent company of the New York Stock Exchange, announced a bitcoin index initially based on data from Coinbase transactions.vizit bitcoin bitrix bitcoin ethereum контракты bitcoin fast bitcoin easy bitcoin капитализация monero pool coinmarketcap bitcoin
monero cryptonote
bitcoin rate bitcoin waves bitcoin обмен ethereum chaindata bitcoin demo ethereum homestead 500000 bitcoin doge bitcoin bitcoin расшифровка 2016 bitcoin clame bitcoin
avto bitcoin bitcoin click ethereum wikipedia bitcoin магазин monero proxy bitcoin click
bitcoin suisse rates bitcoin ethereum проблемы обменять monero bitcoin blue шрифт bitcoin дешевеет bitcoin 20 bitcoin
moneypolo bitcoin bitcoin 2020 bitcoin cnbc sha256 bitcoin Tetherbitcoin monkey solidity ethereum In October 2013, the FBI seized roughly 26,000 BTC from website Silk Road during the arrest of alleged owner Ross William Ulbricht. Two companies, Robocoin and Bitcoiniacs launched the world's first bitcoin ATM on 29 October 2013 in Vancouver, BC, Canada, allowing clients to sell or purchase bitcoin currency at a downtown coffee shop. Chinese internet giant Baidu had allowed clients of website security services to pay with bitcoins.bitcoin plugin loan bitcoin antminer bitcoin bitcoin habr linux ethereum продам bitcoin cryptocurrency tech список bitcoin bitcoin get ethereum wallet
bitcoin сатоши bitcoin cnbc bitcoin testnet график ethereum