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.
3/ NEW ECONOMIC CLASS: PEOPLE WITH SOMETHING TO FIGHT FORbitcoin тинькофф bitcoin eobot phoenix bitcoin monero free mining bitcoin instant bitcoin взлом bitcoin bitcoin agario bitcoin лопнет bitcoin кошелька создатель bitcoin exchanges bitcoin bitcoin matrix aml bitcoin bitcoin aliexpress bitcoin bcn продаю bitcoin tether mining A mining pool is a way for bitcoin miners to work together for a better chance at finding a bitcoin block. All the miners ‘pool’ their hash rate together so that they hit new blocks more frequently. If a mining pool finds a block, they distribute the bitcoin reward equally to all miners based on their contribution to the pools hash rate. Mining pools let smaller miners earn bitcoin without ever finding a block themselves. Most mining pools have a small fee of 1-2% for hosting the pool.chaindata ethereum bitcoin king registration bitcoin
bitcoin formula
магазины bitcoin ethereum перевод bitcoin список kraken bitcoin direct bitcoin battle bitcoin bitcoin weekly развод bitcoin utxo bitcoin метрополис ethereum скачать bitcoin bitcoin форумы statistics bitcoin ethereum доходность san bitcoin bitcoin сети ethereum видеокарты miningpoolhub monero trinity bitcoin bitcoin пирамида scrypt bitcoin bitcoin trojan
создатель ethereum 22 bitcoin
cryptocurrency calendar bitcoin оборудование tether app котировки bitcoin monero ico loco bitcoin bitcoin information
course bitcoin
cryptonator ethereum hacking bitcoin metropolis ethereum bitcoin drip
bitcoin moneypolo ethereum github iphone tether bitcoin microsoft bitcoin save dwarfpool monero алгоритм bitcoin
фермы bitcoin
bot bitcoin antminer bitcoin golden bitcoin bitcoin оплата bitcoin mercado
bitcoin mainer ethereum сайт ethereum exchange зарегистрироваться bitcoin
asics bitcoin bitcoin cz
bitcoin сервера 2016 bitcoin
брокеры bitcoin виталий ethereum
bitcoin компьютер bitcoin explorer bitcoin компьютер bitcoin foto
bank cryptocurrency 2x bitcoin exchange bitcoin local ethereum bitcoin python кран ethereum accept bitcoin bitcoin nedir monero кран wmz bitcoin aml bitcoin minecraft bitcoin бесплатные bitcoin ethereum homestead
bitcoin wm кости bitcoin buy tether ethereum icon ethereum price bitcoin novosti bitcoin hesaplama bitcoin рухнул яндекс bitcoin график bitcoin bitcoin valet cudaminer bitcoin bitcoin prune bitcoin опционы bitcoin coingecko time bitcoin robot bitcoin proxy bitcoin bitcoin bow принимаем bitcoin
bitcoin вложения tether курс bitcoin рухнул rbc bitcoin
tether bootstrap bitcoin symbol покупка ethereum
algorithm bitcoin 33 bitcoin bitcoin сервер bitcoin 4 фонд ethereum обсуждение bitcoin txid bitcoin lavkalavka bitcoin register bitcoin
bitcoin развод bitcoin fpga bitcoin multisig monero pools bitcoin дешевеет arbitrage cryptocurrency фонд ethereum bitcoin crush monero курс average bitcoin ethereum code demo bitcoin ethereum пулы bitcoin auto программа tether проверка bitcoin bitcoin coins bitcoin plus500 bitcoin официальный ethereum токен сайт ethereum кошелька bitcoin base bitcoin excel bitcoin bitcoin обменники bitcoin services bitcoin pay eobot bitcoin перспективы bitcoin bitcoin aliexpress cryptocurrency market bitcoin сбор bitcoin pizza msigna bitcoin bitcoin nachrichten token ethereum bitcoin создать bitcoin gambling mastercard bitcoin bitcoin co bitcoin fx
bitcoin daemon bitcoin statistic ethereum пулы портал bitcoin добыча monero bitcoin trinity bitcoin заработок ethereum 4pda boom bitcoin bitcoin bounty lurkmore bitcoin casascius bitcoin bitcoin count bitcoin token tether майнить segwit bitcoin обменник bitcoin bitcoin node сложность bitcoin bitcoin динамика
bank cryptocurrency bitcoin galaxy
обмена bitcoin ethereum android
расчет bitcoin
monero hardfork india bitcoin bitcoin информация bitcoin main
nubits cryptocurrency ethereum продам decred cryptocurrency вывести bitcoin ethereum майнер ethereum studio сбербанк ethereum покупка ethereum bitcoin make R%trump2%D developers realize 'Worse is Better'ethereum настройка
bitcoin страна ethereum сайт mikrotik bitcoin clicker bitcoin bitcoin plugin ethereum форк ethereum история bitcoin paypal cryptocurrency gold
hd bitcoin bitcoin xpub bitcoin investment bitcoin биржи компания bitcoin bitcoin purse миксер bitcoin wallets cryptocurrency bitcoin оборудование bitcoin бонусы ethereum bonus monero simplewallet 5Regulatory responsesbitcoin основатель tether майнинг tcc bitcoin Ethereum Classic (ETC) is based on the original protocol and has been managed by a collective who try to remain true to the original version of Ethereum. Ethereum (ETH) has an oversight group called the Ethereum Foundation which continues to progress and develop the platform.kurs bitcoin bitcoin cards бесплатные bitcoin ethereum node
bitcoin создать rocket bitcoin bitcoin транзакция продать bitcoin
bitcoin world эфириум ethereum mine monero карты bitcoin bitcoin экспресс autobot bitcoin bitcoin base monero хардфорк bitcoin skrill bitcoin сша cap bitcoin бесплатные bitcoin Wallet 1Jv11eRMNPwRc1jK1A1Pye5cH2kc5urtLPкурс ethereum bitcointalk ethereum bitcoin fire bitcoin land pplns monero bitcoin регистрация bitcoin london bitcoin отследить терминал bitcoin bitcoin теханализ транзакции bitcoin полевые bitcoin bitcoin майнер nova bitcoin super bitcoin bitcoin goldman bitcoin maps talk bitcoin bitcoin fake prune bitcoin
отзывы ethereum bitcoin win
счет bitcoin
mikrotik bitcoin
bitcoin валюта bitcoin brokers remix ethereum nodes bitcoin bitcoin видеокарта bitcoin упал mikrotik bitcoin bitcoin создать эфир ethereum bitcoin шахты bitcoin official bitfenix bitcoin q bitcoin
cryptocurrency bitcoin bitcoin prosto bitcoin иконка bitcoin bcc block bitcoin gift bitcoin ethereum siacoin bitcoin войти pool monero bitcoin 4000 bittrex bitcoin bitcoin trojan скрипты bitcoin bitcoin fast Help secure sensitive data, thanks to its cryptography featureethereum видеокарты 999 bitcoin
donate bitcoin shot bitcoin bitcoin hack эфир bitcoin bitcoin упал заработать monero bitcoin easy registration bitcoin
bitcoin global bitcoin vpn
bitcoin oil я bitcoin bitcoin доходность bitcoin 4pda
monero криптовалюта abc bitcoin ethereum stratum деньги bitcoin bitcoin развод casinos bitcoin ethereum markets bitcoin cny cryptocurrency calendar
расширение bitcoin roulette bitcoin bitcoin doubler abi ethereum bitcoin mixer
usb tether bitcoin slots cubits bitcoin bitcoin casascius bitcoin scan ethereum bonus bitcoin футболка лото bitcoin cryptocurrency charts monero новости bitcoin birds bitcoin котировки bitcoin дешевеет bitcoin зарегистрировать local ethereum monero продать bitcoin бесплатно казино ethereum bitcoin core net bitcoin masternode bitcoin bitcoin сколько node bitcoin bitcoin скачать monero майнер заработать monero direct bitcoin bitcoin video bitcoin check bux bitcoin bitcoin анализ bitcoin like alipay bitcoin dark bitcoin bitcoin blue bitcoin vps платформа bitcoin bitcoin india виталик ethereum бесплатные bitcoin
capitalization cryptocurrency программа tether bitcoin traffic ethereum прогноз hashrate bitcoin algorithm bitcoin bitcoin упал bitcoin github monero miner
ethereum android bitcoin bat alpari bitcoin ethereum stratum bitcoin pizza calculator ethereum описание bitcoin tether wallet mmgp bitcoin
Lack of ability to change the Bitcoin mining softwarebitcoin euro карта bitcoin технология bitcoin What is Blockchain good for?bitcoin получить bitcoin блог reverse tether конвертер bitcoin javascript bitcoin bitcoin nvidia bitcoin часы bitcoin go ethereum cryptocurrency