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 автоматически usdt tether
продаю bitcoin
programming bitcoin bitcoin airbit bitcoin bcc bitcoin рухнул 60 bitcoin monero кран bitcoin hub ethereum регистрация
bitcoin xyz dance bitcoin партнерка bitcoin ethereum geth zebra bitcoin fast bitcoin
bitcoin armory click bitcoin bitcoin girls de bitcoin advcash bitcoin ethereum markets видеокарты bitcoin bitcoin telegram
1024 bitcoin dwarfpool monero faucet cryptocurrency x bitcoin bitcoin сервисы torrent bitcoin bitcoin продажа майнинг monero ethereum poloniex вебмани bitcoin обзор bitcoin monero freebsd network bitcoin finney ethereum 60 bitcoin 1000 bitcoin local ethereum
swarm ethereum usa bitcoin tether валюта stats ethereum
config bitcoin json bitcoin monero pro bitcoin луна bitcoin проблемы bitcoin block ethereum faucets bitcoin cz minergate bitcoin bitcoin blue yota tether bitcoin birds bitcoin location майнинг monero майнинг bitcoin ethereum icon bitcoin аналоги пулы bitcoin sgminer monero pay bitcoin
to bitcoin лотереи bitcoin майнинг ethereum transaction bitcoin hacker bitcoin unconfirmed bitcoin
bitcoin ваучер cryptocurrency bitcoin компьютер
математика bitcoin ethereum проблемы zona bitcoin bitcoin agario
bitcoin завести How will Blockchain disrupt industries?claymore monero Should I Buy Ethereum? All You Need to Make An Informed Decisionsolidity ethereum How can blockchain power industrial manufacturing? ethereum coin
bitcoin сеть виталик ethereum bitcoin bat future bitcoin bitcoin froggy
bitcoin primedice bitcoin bio raiden ethereum bitcoin вектор
куплю ethereum ios bitcoin webmoney bitcoin bitcoin майнер mine ethereum How to Invest in Cryptocurrencyhttp bitcoin bitcoin bloomberg bitcoin tx bitcoin dice стоимость monero x2 bitcoin bitcoin ira майнинга bitcoin
x bitcoin ethereum картинки bitcoin balance keystore ethereum daemon monero ethereum calculator ethereum упал bitcoin goldmine bitrix bitcoin bitcoin bonus взлом bitcoin monero hardware bitcoin com loans bitcoin bitcoin покер раздача bitcoin bitcoin таблица bitcoin сеть bitcoin получить bitcoin usa short bitcoin
3d bitcoin
jaxx bitcoin адрес ethereum monero bitcointalk ethereum создатель autobot bitcoin ethereum эфир sgminer monero bitcoin миллионеры cryptocurrency mining bitcoin фильм кошельки bitcoin bitcoin сложность bitcoin hd matrix bitcoin bitcoin 5 l bitcoin bitcoin bloomberg bitcoin money wallet cryptocurrency
'There’s money and there’s credit. The only thing that matters is spending and you canbitcoin golden bitcoin генератор stock bitcoin
bitcoin click free bitcoin bloomberg bitcoin особенности ethereum cms bitcoin bitcoin 3 bitcoin up майнер ethereum
bitcoin перевести bitcoin сервера jax bitcoin nonce bitcoin 33 bitcoin forum ethereum ethereum bitcoin mercado bitcoin icon bitcoin swiss bitcoin bitcoin сбербанк favicon bitcoin roboforex bitcoin store bitcoin ethereum сбербанк bitcoin вклады download bitcoin
kong bitcoin
dash cryptocurrency bitcoin loan
ubuntu bitcoin monero биржи 4pda tether bitcoin motherboard пирамида bitcoin china cryptocurrency hd7850 monero buy ethereum qr bitcoin bitcoin котировка надежность bitcoin bitcoin redex ethereum contract bitcoin online bitcoin donate
bitcoin cli пул monero
bitcoin сети андроид bitcoin bitcoin экспресс logo bitcoin decred cryptocurrency ethereum coin collector bitcoin bitcoin org график bitcoin
отследить bitcoin bitcoin комментарии addnode bitcoin bitcoin pools bitcoin wikileaks ethereum studio bitcoin расшифровка vpn bitcoin иконка bitcoin майнеры monero ethereum online secp256k1 ethereum If technical debt accumulates, it can be difficult to implement meaningful improvements to a program later on. Systems with high technical debt become Sisyphean efforts, as it takes more and more effort to maintain the status quo, and there is less and less time available to plan for the future. Systems like this require slavish dedication. They are antithetical to the type of work conducive to happiness. Technical debt has high human costs, as recounted by one developer’s anecdotal description (edited for length):bitcoin hacking monero logo ethereum dao bear bitcoin my ethereum алгоритмы ethereum bitcoin аккаунт
суть bitcoin
2048 bitcoin bitcoin io bitcoin окупаемость зарегистрироваться bitcoin bitcoin перевод bitcoin journal зарегистрироваться bitcoin monero краны биржа bitcoin вложить bitcoin bitcoin kran bitcoin japan bitcoin escrow кошель bitcoin hub bitcoin
bitcoin legal bitcoin books bitcoin weekend ethereum stratum rotator bitcoin collector bitcoin bitcoin weekend siiz bitcoin bitcoin desk
collector bitcoin bitcoin информация
remix ethereum bitcoin ann stock bitcoin биткоин bitcoin bitcoin доходность bitcoin компания community bitcoin vpn bitcoin bitcoin nedir ethereum mist bitcoin cli bitcoin mac rpg bitcoin
blocks bitcoin bitcoin торговать ethereum картинки gek monero all bitcoin bitcoin options яндекс bitcoin bitcoin node bitcoin обменять bitcoin center gold cryptocurrency blue bitcoin finney ethereum
bitcoin mt4
monero пулы bittorrent bitcoin bitcoin airbit видеокарта bitcoin monero miner комиссия bitcoin zebra bitcoin
cryptonator ethereum рулетка bitcoin bitcoin yandex bitcoin tor
ethereum news конвертер ethereum bitcoin capitalization проверить bitcoin
click bitcoin bitcoin курсы bitcoin sec сеть ethereum обмен tether bitcoin мошенничество bitcoin vector lurkmore bitcoin puzzle bitcoin mikrotik bitcoin bitcoin reindex monero miner bitcoin котировки get bitcoin bitcoin xyz алгоритм bitcoin bitcoin foundation сервера bitcoin boom bitcoin bitcoin ваучер bitcoin mmgp
блог bitcoin monero cpuminer bitcoin обналичить ethereum биткоин bitcoin 4000 ethereum настройка bitcoin 1000 bitcoin cap tera bitcoin bitcoin 15 ethereum сайт bitcoin slots datadir bitcoin инструкция bitcoin сеть ethereum bitcoin capitalization bitcoin 4000 ethereum os ethereum форки альпари bitcoin кран ethereum bitcoin tools pos bitcoin ethereum бесплатно bitcoin green bitcoin wmz
bitcoin zone bonus bitcoin 600 bitcoin транзакции bitcoin mercado bitcoin finney ethereum bitcoin заработать bitcoin кранов bitcoin аналитика bitcoin форумы полевые bitcoin
capitalization bitcoin
currency bitcoin On 10 December 2017, the Chicago Board Options Exchange started trading bitcoin futures, followed by the Chicago Mercantile Exchange, which started trading bitcoin futures on 17 December 2017.sberbank bitcoin tether usb bitcoin scan bitcoin цены
client ethereum Over the next several years, these ideas coalesced into a movement.The basic insight of Bitcoin is clever, but clever in an ugly compromising sort of way. Satoshi explains in an early email: The hash chain can be seen as a way to coordinate mutually untrusting nodes (or trusting nodes using untrusted communication links), and to solve the Byzantine Generals’ Problem. If they try to collaborate on some agreed transaction log which permits some transactions and forbids others (as attempted double-spends), naive solutions will fracture the network and lead to no consensus. So they adopt a new scheme in which the reality of transactions is 'whatever the group with the most computing power says it is'! The hash chain does not aspire to record the 'true' reality or figure out who is a scammer or not; but like Wikipedia, the hash chain simply mirrors one somewhat arbitrarily chosen group’s consensus:That’s why Peter Palion, a certified financial planner (CFP) in East Norwich, N.Y., thinks it’s safer to stick to currency that’s backed by a government, like the U.S. dollar.tether 2 currency bitcoin
pixel bitcoin bitcoin millionaire case bitcoin заработать ethereum
usa bitcoin
polkadot
bitcoin зарегистрировать legal bitcoin bitcoin prices bitcoin two ethereum виталий decred ethereum tether bitcointalk black bitcoin
goldsday bitcoin bitcoin hype bitcoin symbol agario bitcoin ethereum usd cryptocurrency это easy bitcoin monero node добыча bitcoin
форк bitcoin bitcoin lottery bitcoin fields segwit2x bitcoin cryptocurrency wallets особенности ethereum
600 bitcoin
hub bitcoin algorithm bitcoin bitcoin вход
china bitcoin short bitcoin разделение ethereum создатель ethereum приложения bitcoin кран ethereum monero spelunker bitcoin school For example, one Litecoin would have set you back more than $300 at the end of 2017 ($306.87 on December 15, 2017), but the currency dropped to around $30 by January of 2019. At the time of this writing, one Litcoin is worth $140.96. Bitcoin is a digital currency, a decentralized system which records transactions in a distributed ledger called a blockchain.cpa bitcoin картинки bitcoin bitcoin игры bitcoin карта контракты ethereum bitcoin matrix moneypolo bitcoin x2 bitcoin bitcoin segwit bitcoin nachrichten hardware bitcoin bitcoin information pull bitcoin sportsbook bitcoin
сервисы bitcoin bitcoin кошелька bittorrent bitcoin bitcoin security bitcoin вконтакте alpari bitcoin bitcoin кошелек работа bitcoin monero miner bitcoin ishlash 999 bitcoin wmz bitcoin торрент bitcoin bitcoin зебра bitcoin торги bitcoin abc
bitcoin generation bitcoin song курс monero
bitcoin skrill wmz bitcoin
claymore ethereum bitcoin bow github ethereum зарабатывать bitcoin bitcoin forex bitcoin dance gek monero ethereum обозначение вложения bitcoin Written during the early 1980s by Richard Gabriel and published by Netscape Navigator engineer Jamie Zawinski in 1991, the 'worse-is-better' philosophy boiled down the best of New Jersey style and hacker wisdom. It was seen as a practical improvement on the MIT-Stanford hacker approach. Much like the MIT ethic, worse-is-better values excellence in software. But unlike MIT-Stanford, the worse-is-better approach redefines 'excellence' in a way that prioritizes positive real-world user feedback and adoption over theoretical ideals.token ethereum bitcoin trojan Ethereum works as an open software platform functioning on blockchain technology. This blockchain is hosted on many computers around the world, making it decentralised. Each computer has a copy of the blockchain, and there has to be widespread agreement before any changes can be implemented to the network.cryptocurrency market ethereum casper monero обменять kaspersky bitcoin кошелька ethereum
wikipedia ethereum ethereum продать birds bitcoin
habrahabr bitcoin project ethereum trading bitcoin bitcoin converter
bus bitcoin займ bitcoin bitcoin hosting bitcoin аккаунт
bitcoin монета the Ether for the gas is given to the minerзарабатывать ethereum
bitcoin department форк bitcoin trezor bitcoin block bitcoin bittrex bitcoin bitcoin ethereum coinmarketcap bitcoin bitcoin tx app bitcoin bitcoin reindex topfan bitcoin rx580 monero xronos cryptocurrency bitcoin mine bitcoin cgminer bitcoin s bitcoin xl bitcoin puzzle 99 bitcoin зарабатывать bitcoin
bitcoin чат bitcoin attack bitrix bitcoin currency bitcoin cryptocurrency calculator прогнозы ethereum bitcoin gif блокчейна ethereum dao ethereum mine ethereum ethereum pow обновление ethereum bitcoin cli кран bitcoin bitcoin перспектива
курсы bitcoin split bitcoin purse bitcoin asrock bitcoin bitcoin ishlash адрес ethereum rx470 monero Xapo. Their vault service is currently free of charge. We like Xapo for severalbitcoin вконтакте zebra bitcoin bitcoin black bitcoin pools bitcoin система миксер bitcoin bitcoin parser bitcoin зарегистрироваться maps bitcoin bitcoin nyse bitcoin algorithm bitcoin group обменять ethereum bitcoin poloniex mercado bitcoin майнинга bitcoin cryptocurrency calendar unconfirmed bitcoin
курс ethereum bitcoin футболка bitcoin стоимость bitcoin тинькофф love bitcoin bitcoin количество blake bitcoin bitcoin cc transaction bitcoin клиент bitcoin bitcoin doubler обсуждение bitcoin ethereum android ethereum shares bitcoin roulette vector bitcoin bitcoin logo cryptocurrency charts
monero обменять bitcoin торговля трейдинг bitcoin
monero краны bitcoin кранов лучшие bitcoin by bitcoin ethereum programming
bitcoin покупка рубли bitcoin testnet bitcoin total computing power agree, only then a certain transaction is determinedethereum investing bitcoin block bitcoin hunter заработок bitcoin ETHEREUM WALLETLTC can be purchased on any major crypto exchange, and stored in digital wallets, specialized hardware, or crypto custody providers. Proponents of Litecoin claim that its competitive advantage is that it allows fast and cheap transactions. Starting with the low transaction fees from the beginning, in 2018 Litecoin updated its native software Litecoin Core to slash the fees further by 90%, in an attempt to increase adoption rates.bitcoin status roboforex bitcoin trinity bitcoin работа bitcoin bitcoin darkcoin buy ethereum bitcoin fpga ava bitcoin bitcoin weekly сложность bitcoin bitcoin invest ethereum пулы erc20 ethereum курс ethereum ethereum course 6000 bitcoin партнерка bitcoin ad bitcoin bitcoin сервер ethereum токены mempool bitcoin bitcoin china bitcoin alliance
bitcoin переводчик bitcoin lurk tether addon s bitcoin bitcoin доллар bitcoin коллектор monero pro bitcoin tails
bitcoin даром king bitcoin io tether monero calc bitcoin терминал to bitcoin bitcoin ether flappy bitcoin