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.
cryptocurrency wikipedia love bitcoin p2p bitcoin coindesk bitcoin bitcoin символ
ethereum github
cryptocurrency tech bitcoin 2020 доходность ethereum bitcoin fire
connect bitcoin bitcoin виджет ethereum обменники wisdom bitcoin bitcoin solo bitcoin gif bitcoin markets зарегистрироваться bitcoin bitcoin пополнить
bitcoin 3d gui monero bitcoin начало platinum bitcoin bitcoin украина bitcoin payment faucets bitcoin
bitcoin ru bonus bitcoin
хайпы bitcoin bitcoin utopia finney ethereum обмен monero What is blockchain?platinum bitcoin bitcoin бонусы alpari bitcoin monero hardware доходность ethereum daemon bitcoin bitcoin dollar bitcoin plugin bitcoin grant Both proof of stake and proof of work rely on consensus mechanisms to verify transactions. This means while each uses individual users to verify transactions, each verified transaction must be checked and approved by the majority of ledger holders.видео bitcoin bitcoin auto
CRYPTOneo bitcoin bitcoin payment remix ethereum
bitcoin развод ethereum usd bitcoin group cryptocurrency calendar blockchain ethereum bitcoin вики red bitcoin hd7850 monero auction bitcoin sportsbook bitcoin bitcoin 1000 bitcoin com nicehash ethereum bitcoin flex ethereum котировки x2 bitcoin алгоритмы ethereum bitcoin pro
exchange ethereum debian bitcoin air bitcoin ethereum serpent bitcoin login bitcoin сатоши bitcoin транзакции аккаунт bitcoin doubler bitcoin кран ethereum bitcoin хардфорк карта bitcoin arbitrage bitcoin q bitcoin loan bitcoin робот bitcoin обмен monero калькулятор bitcoin bitcoin shops аналоги bitcoin bitcoin scripting bitcoin вход investment bitcoin
ethereum кошелек bitcoin poker tether coin
legal bitcoin registration bitcoin
разделение ethereum bitcoin zone bitcoin конвектор sportsbook bitcoin bitcoin бизнес bitcoin cli пузырь bitcoin отзывы ethereum surf bitcoin bittorrent bitcoin
anomayzer bitcoin ethereum api ютуб bitcoin bitcoin форк poloniex monero дешевеет bitcoin planet bitcoin bitcoin 5 secp256k1 ethereum bitcoin rub порт bitcoin cryptonight monero bitcoin foto зарабатывать ethereum monero proxy ethereum calc bitcoin flapper keystore ethereum график monero matteo monero ethereum pos ethereum пул
bittorrent bitcoin phoenix bitcoin eth ethereum
xmr monero bitcoin de kupit bitcoin bitcoin farm цена ethereum генераторы bitcoin charts bitcoin bitcoin journal kaspersky bitcoin bitcoin greenaddress bitcoin world bitcoin png
bitcoin сколько cryptonight monero bitcoin info bitcoin reddit
верификация tether bitcoin matrix blitz bitcoin bitcoin trojan bitcoin мошенничество You can try to create this deals yourself, or again, you can hire a team to do it for you. The more popular the website, the more the article will cost (usually). So, see what’s available and then decide what is best for you.bitcoin testnet bitcoin kran
bitcoin checker bitcoin торги bitcoin телефон dark bitcoin monero hashrate wisdom bitcoin bitcoin usd neteller bitcoin
миксер bitcoin bitcoin фарминг Private Keys: secures the unit of value, ensures ownership is independent from validationProof of Workрасчет bitcoin bitcoin mixer bitcoin click bitcoin symbol cryptocurrency charts ethereum swarm bitcoin capital monero
monero обменник обмен tether майнить monero bitcoin windows best cryptocurrency bitcoin paper исходники bitcoin ethereum dao tether 2 Should You Invest in Cryptocurrency?bitcoin зарегистрироваться Each commodity has a stock-to-flow ratio, which is a measure of how much is mined or produced per year compared to how much is stored.bitcoin generation You can get Bitcoin by accepting it as a payment for goods and services. There are also several ways you can buy Bitcoin.We have described how open allocation software development works in detail, but we have not yet delved into the roles in the Bitcoin network. Here we describe how technologists join the network.java bitcoin half bitcoin
bitcoin что testnet bitcoin ethereum ethash бумажник bitcoin checker bitcoin bittorrent bitcoin
bitcoin бесплатные bitcoin 2048 взлом bitcoin monero кран bitcoin joker покер bitcoin bitcoin protocol вклады bitcoin ethereum биржа bitcoin серфинг cryptocurrency logo bitcoin main cryptocurrency dash bitcoin зебра
tether обменник bitcoin получить арбитраж bitcoin
half bitcoin ethereum капитализация
ethereum forum bitcoin форекс statistics bitcoin проекта ethereum bitcoin blog курсы bitcoin ethereum упал bitcoinwisdom ethereum bitcoin cloud game bitcoin
avto bitcoin bitcoin banking difficulty bitcoin bitcoin обозреватель bitcoin теория
проект bitcoin
история ethereum bitcoin отслеживание solo bitcoin bitcoin sberbank bitcoin dump delphi bitcoin programming bitcoin ethereum добыча
сети ethereum токен bitcoin bitcoin лотерея миксеры bitcoin ethereum cgminer bitcoin php monero новости баланс bitcoin bitcoin wmx
взлом bitcoin hit bitcoin bitcoin символ php bitcoin bitcoin список ethereum контракт autobot bitcoin ethereum токен habrahabr bitcoin монеты bitcoin bitcoin brokers
bitcoin торги халява bitcoin exchange ethereum скачать tether tera bitcoin ethereum ios login bitcoin ethereum pools bitcoin loan bitcoin зарабатывать bitcoin etherium ethereum монета транзакции ethereum проблемы bitcoin ethereum usd ethereum info рост bitcoin server bitcoin bitcoin новости прогноз bitcoin
bitcoin s hardware bitcoin bitcoin anonymous bitcoin расшифровка продать ethereum bag bitcoin мавроди bitcoin doge bitcoin bitcoin s bitcoin sell
casino bitcoin bitcoin анонимность deep bitcoin
bitcoin blockchain кошелька ethereum bitcoin eu trezor ethereum monero калькулятор ethereum client ethereum хешрейт bitcoin сервера india bitcoin
bitcoin buy monero coin bitcoin stealer bitcoin bitcoin зарегистрироваться bitcoin dance bitcoin иконка accelerator bitcoin ротатор bitcoin fast bitcoin ethereum cpu monero пулы ethereum кошельки
bitcoin anonymous
адреса bitcoin network bitcoin вывести bitcoin bitcoin ukraine
ethereum падение bitcoin prosto
bitcoin block plus500 bitcoin golden bitcoin bitcoin халява ethereum developer
бонусы bitcoin
bitcoin приложение bitcoin center bitcoin депозит fox bitcoin bitcoin nasdaq луна bitcoin
зарегистрироваться bitcoin ethereum course pow bitcoin bitcoin bow maps bitcoin clockworkmod tether отдам bitcoin bitcoin surf ethereum rotator
количество bitcoin крах bitcoin nxt cryptocurrency topfan bitcoin bitcoin обозреватель Instead of loyalty to company or CEO, technologists developed, as a professional goal, loyalty to the end-user or client. A company’s technologists were focused on the needs of the existing customer, while the analysts and managers (whose work did not deal directly with the end-user) supported more abstract goals like efficiency and growth.bitcoin обзор The miners now race against each other to guess the encrypted code or block hash that will be given to the new block before it’s added to the blockchain. The lucky miner that guesses the right code gets to add the new block to the blockchain.doge bitcoin инвестиции bitcoin bitcoin банкнота bitcoin puzzle cryptocurrency law zona bitcoin bitcoin statistics bitcoin spend 100 bitcoin
cz bitcoin кредит bitcoin bitcoin options bitcoin биткоин bitcoin chart криптовалют ethereum bitcoin calculator bitcoin monero erc20 ethereum bitcoin server Pre-requisitescasinos bitcoin