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.
foto bitcoin android tether bitcoin презентация purse bitcoin bitcoin png валюта tether bitcoin up bitcoin play добыча bitcoin simple bitcoin casinos bitcoin bitcoin information monaco cryptocurrency wikipedia ethereum asics bitcoin bitcoin png donate bitcoin bitcoin information ann monero game bitcoin bitcoin habrahabr monero ico rx560 monero bitcoin спекуляция bitcoin rub ethereum programming ethereum биржа bitcoin хешрейт bitcoin технология bitcoin список difficulty monero bitcoin green
bitcoin donate
bitcoin работа x bitcoin
зарабатываем bitcoin geth ethereum bitcoin poloniex
сложность ethereum
asics bitcoin secp256k1 ethereum обменять ethereum collector bitcoin bitcoin реклама claymore monero
nicehash monero bitcoin red cold bitcoin bitcoin green bitcoin arbitrage работа bitcoin online bitcoin lurkmore bitcoin bitcoin вконтакте генераторы bitcoin neo bitcoin bitcoin сборщик coinmarketcap bitcoin bitcoin gif 1080 ethereum bitcoin online invest bitcoin algorithm ethereum
ethereum видеокарты стоимость ethereum bye bitcoin avalon bitcoin куплю ethereum bitcoin asic bitcoin maker bitcoin математика bitcoin pdf bitcoin торги ethereum info bitcoin мошенники bitcoin trader rise cryptocurrency
bitcoin обналичить cryptocurrency charts
bitcoin иконка ethereum настройка rx560 monero game bitcoin покупка ethereum safe bitcoin торрент bitcoin bitcoin trade ethereum обменники bitcoin marketplace attack bitcoin bitcoin central ethereum график lurkmore bitcoin bitcoin exchanges
MEW is a free, open-source, client-side interface that allows you to create an Ethereum wallet. Unlike some other web wallets, MEW gives you control of your private key. It is quite secure and allows you to store other ERC-20 tokens in there too.minergate bitcoin calculator cryptocurrency обменники bitcoin cryptocurrency analytics bitcoin завести collector bitcoin bitcoin cache 999 bitcoin bitcoin login получение bitcoin bitcoin apple
1000 bitcoin
monero gpu kong bitcoin bitcoin зарегистрироваться bitcoin matrix
coingecko bitcoin bitcoin чат monero wallet cryptocurrency charts trading bitcoin bitcoin расшифровка bitcoin pizza
bitcoin форумы bitcoin sweeper bitcoin slots dash cryptocurrency cubits bitcoin bitcoin mail bitcoin widget bitcoin options
bitcoin obmen bitcoin rpg акции ethereum
bitcoin fund monero кошелек byzantium ethereum обсуждение bitcoin ethereum com monero биржи simple bitcoin bitcoin трейдинг bitcoin ixbt etf bitcoin форки bitcoin халява bitcoin homestead ethereum видеокарты ethereum bitcoin drip ethereum os bitcoin сети monero pro ethereum график l bitcoin xmr monero locals bitcoin black bitcoin теханализ bitcoin bitcoin monkey bitcoin nodes кошелек tether mikrotik bitcoin bitcoin shop coindesk bitcoin форк bitcoin bitcoin путин шрифт bitcoin monero coin excel bitcoin bitcoin explorer bitcoin biz bitcoin payoneer боты bitcoin bitcoin stellar bitcoin like символ bitcoin ethereum 1070 trade cryptocurrency значок bitcoin bitcoin 2020 cpp ethereum The transaction is known almost immediately by the whole network. But only after a specific amount of time it gets confirmed.bitcoin пирамида bitcoin 2017 importprivkey bitcoin
ebay bitcoin ethereum контракт bitcoin сервера bitcoin poker bitcoin работать bitcoin roll antminer ethereum bitcoin котировки boxbit bitcoin nya bitcoin вики bitcoin Ключевое слово bitcoin maps платформы ethereum котировка bitcoin bitcoin server rush bitcoin bitcoin instant bitcoin компьютер bitcoin картинки bitcoin ocean monero вывод взлом bitcoin
теханализ bitcoin
bitcoin jp cryptocurrency chart bitcoin scam
platinum bitcoin история ethereum connect bitcoin
bitcoin cny bitcoin skrill ethereum faucet добыча bitcoin форум bitcoin global bitcoin bitcoin инструкция blue bitcoin reward bitcoin email bitcoin
bitcoin c
продать bitcoin tx bitcoin short bitcoin сеть ethereum bitcoin аккаунт
bitcoin проверить мастернода bitcoin монета ethereum счет bitcoin bitcoin sportsbook bitcoin matrix monero вывод ethereum виталий collector bitcoin bitcoin фарм cryptocurrency wallet асик ethereum
bitcoin cache faucet cryptocurrency bitcoin scanner bitcoin debian bitcoin lucky торги bitcoin bitcoin это bitcointalk monero bitcoin gold steam bitcoin monster bitcoin ethereum gold bitcoin calculator mine ethereum ethereum habrahabr bitcoin payeer
fx bitcoin ethereum gas bitrix bitcoin amazon bitcoin bitcoin client tether wallet торговать bitcoin bitcoin майнер bitcoin мошенничество
котировки ethereum mine ethereum заработать monero обновление ethereum bitcoin миллионер bitcoin gif bitcoin котировка cryptocurrency logo
покер bitcoin mt5 bitcoin ethereum заработок lazy bitcoin adbc bitcoin bitcoin обменники cryptocurrency это arbitrage bitcoin
avatrade bitcoin sec bitcoin monero miner A hard fork is a rule change such that the software validating according to the old rules will see the blocks produced according to the new rules as invalid. In case of a hard fork, all nodes meant to work in accordance with the new rules need to upgrade their software.javascript bitcoin bitcoin bcc bitcoin курс trezor bitcoin bitcoin novosti bitcoin blockstream
ethereum видеокарты видеокарта bitcoin ethereum видеокарты
games bitcoin
обмена bitcoin ethereum заработать bitcoin 2018 100 bitcoin казахстан bitcoin пример bitcoin ethereum прибыльность bitcoin ne poloniex ethereum
hack bitcoin bitcoin escrow wiki bitcoin
bitcoin weekend monero benchmark server bitcoin ethereum википедия ninjatrader bitcoin
cryptocurrency charts кредиты bitcoin bitcoin txid love bitcoin взлом bitcoin
bitcoin брокеры statistics bitcoin асик ethereum bitcoin фирмы bitcoin pools the ethereum paypal bitcoin bitcoin bank bitcoin покупка bitcoin agario calc bitcoin фото bitcoin кости bitcoin See also: Legality of bitcoin by country or territoryBlockchain in weapon trackingpay bitcoin Bitcoin currently has notable transaction costs after being touted as ‘near free’ for the first few years of its existence.dat bitcoin genesis bitcoin bitcoin cap ethereum стоимость conference bitcoin cms bitcoin bitcoin block
coin bitcoin bitcoin forecast fpga bitcoin bitcoin tm bitcoin матрица analysis bitcoin bitcoin игры обменник monero bitcoin donate трейдинг bitcoin ethereum swarm bitcoin euro
Deep Cold Storagedaily bitcoin bitcoin миксеры ico monero keepkey bitcoin bitcoin 999 vpn bitcoin bcc bitcoin buying bitcoin
bitcoin транзакция ethereum cryptocurrency monero fr debian bitcoin перспектива bitcoin приват24 bitcoin bitcoin прогноз Transactions. A transaction is the thing that gets this party started — I mean, the cryptocurrency mining process rolling. To put it simply, a transaction is an exchange of cryptocurrencies between two parties. Each separate transaction gets bundled with others to form a list that gets added to an unconfirmed block. Each data block must then be verified by the miner nodes.bitcoin neteller bitcoin farm bitcoin сатоши заработать bitcoin описание bitcoin технология bitcoin birds bitcoin bitcoin main ethereum core майнинг ethereum invest bitcoin chart bitcoin truffle ethereum
рубли bitcoin finex bitcoin виталик ethereum приложения bitcoin bitcoin расшифровка fpga bitcoin forbot bitcoin перевести bitcoin вики bitcoin ethereum faucet excel bitcoin адрес bitcoin аккаунт bitcoin кошельки bitcoin nxt cryptocurrency moto bitcoin bitcoin co mastering bitcoin адреса bitcoin bitcoin fan poloniex monero ethereum логотип
x bitcoin One of the biggest problems with cryptocurrencies is its price volatility. With CBDCs, governments can use a private blockchain to control price volatility. While this will compromise on decentralization, it can help increase the widespread usage of blockchain technology.bitcoin easy bitcoin site alipay bitcoin bitcoin реклама store bitcoin bitcoin china bitcoin аналоги bitcoin q claim bitcoin rinkeby ethereum wmz bitcoin bitcoin yen bitcoin motherboard bitcoin future future bitcoin bitcoin casino
bitcoin betting flappy bitcoin играть bitcoin
автомат bitcoin
usdt tether фарминг bitcoin bitcoin сбербанк ethereum forks ubuntu bitcoin the ethereum bitcoin algorithm
индекс bitcoin сервисы bitcoin top tether bitcoin вход
bitcoin запрет
nicehash bitcoin таблица bitcoin hack bitcoin зарегистрироваться bitcoin
bitcoin segwit2x bitcoin wm bitcoin bazar 20 bitcoin captcha bitcoin red bitcoin trust bitcoin bitcoin hype bitcoin instaforex шифрование bitcoin биржи bitcoin bitcoin bazar ethereum algorithm
генераторы bitcoin rise cryptocurrency bitcoin cap
bitcoin автосерфинг your bitcoin bitcoin play monero minergate bitcoin cc cryptocurrency capitalisation ethereum пулы rise cryptocurrency The European Union is taking a cautious approach to cryptocurrency regulation, with several initiatives underway to involve sector participants in the drafting of supportive rules. The focus appears to be on learning before regulating, while boosting innovation and taking into account the needs of the ecosystem.depending on your own personal profile.Faster Operationsbitcoin sphere ethereum address
ico monero bitcoin apk bitcoin tradingview golang bitcoin bitcoin википедия cryptocurrency dash bitcoin mining clame bitcoin описание bitcoin
vizit bitcoin технология bitcoin
ютуб bitcoin bitcoin usb ethereum platform bitcoin testnet развод bitcoin bitcoin com
escrow bitcoin exchange ethereum happy bitcoin фарминг bitcoin bitcoin red bear bitcoin bitcoin euro boom bitcoin bitcoin blockchain
bitcoin rotator bitcoin accelerator bitcoin capital отзывы ethereum платформы ethereum
monero client bitcoin стратегия ютуб bitcoin cryptocurrency law bitcoin украина криптовалюты bitcoin
waves bitcoin 99 bitcoin hit bitcoin blender bitcoin конференция bitcoin акции ethereum battle bitcoin bitcoin check криптовалюту monero bitcoin видеокарта bitcoin minergate работа bitcoin майн bitcoin сигналы bitcoin bitcoin airbit pizza bitcoin service bitcoin
адрес ethereum bitcoin doge ava bitcoin bitcoin в bitcoin bounty транзакции ethereum client ethereum fee bitcoin bitcoin 10 stake bitcoin bitcoin торрент создать bitcoin bitcoin symbol market bitcoin decred ethereum