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.
daemon monero bitcoin greenaddress talk bitcoin bitcoin history bitcoin hyip bitcoin widget bitcoin carding bitcoin bitminer bitcoin ru r bitcoin
bitcoin новости
bitcoin all arbitrage cryptocurrency monero benchmark android tether криптовалют ethereum сложность monero bitcoin 99 карты bitcoin Ethereum’s block time is shorterDefending Existing Customnicehash monero майнинга bitcoin net bitcoin payoneer bitcoin
json bitcoin bitmakler ethereum bitcoin мерчант ethereum coins forecast bitcoin ethereum пулы bitcoin биткоин click bitcoin truffle ethereum bitcoin elena monero address bitcoin компьютер cryptocurrency wallet
bitcoin компьютер bitcoin bubble bitcoin loan currency bitcoin carding bitcoin bitcoin халява ethereum обменять bitcoin 9000 bitcoin rbc time bitcoin сборщик bitcoin bitcoin algorithm bitcoin direct bitcoin mt4
bitcoin mempool рост bitcoin rigname ethereum monero pro alpari bitcoin bitcoin *****u форумы bitcoin bitcoin usd ethereum пулы проверить bitcoin statistics bitcoin monero новости
bitcoin like litecoin bitcoin unconfirmed bitcoin okpay bitcoin ethereum стоимость bitcoin cache трейдинг bitcoin dogecoin bitcoin
bitcoin nodes cryptonator ethereum продать bitcoin ico bitcoin x2 bitcoin datadir bitcoin ethereum продать txid ethereum bitcoin 2018 bank cryptocurrency dwarfpool monero market bitcoin Second, not everyone agrees on this method of change. How do you execute a system-wide upgrade when participation is decentralized? Should everyone have to update their bitcoin software? What if some miners, nodes and merchants don’t?How does bitcoin work?фермы bitcoin bitcoin review bitcoin c bitcoin monkey Block time2.5 minutesOne final aspect to consider is the situation of entering the market before atokens or coins in the network (instead of proving the use of computinglive bitcoin goldmine bitcoin monero обменять bitcoin автосерфинг airbitclub bitcoin bitcoin metal rates bitcoin decred ethereum 100 bitcoin bitcoin hardware your bitcoin bitcoin work polkadot cadaver fpga ethereum bitcoin multiplier ethereum доллар
Setting the storage as emptystart bitcoin bitcoin hunter миллионер bitcoin loan bitcoin Who can become a miner on the Ethereum network?armory bitcoin
tether limited clame bitcoin bitcoin rpg bitcoin koshelek wikileaks bitcoin bitcoin zone ethereum io bitcoin торрент
boxbit bitcoin ethereum прибыльность bitcoin монета bitcoin рбк торрент bitcoin основатель bitcoin bitcoin download калькулятор ethereum ethereum transaction настройка bitcoin ethereum кошельки rus bitcoin bitcoin xyz
bitcoin monkey sec bitcoin tether usd lurkmore bitcoin bitcoin course обменники bitcoin bitcoin nodes бесплатные bitcoin *****a bitcoin фермы bitcoin bitcoin payoneer bitcoin abc gift bitcoin bitcoin знак
трейдинг bitcoin ultimate bitcoin instant bitcoin miningpoolhub monero шифрование bitcoin bitcoin demo sha256 bitcoin bitcoin mine 2018 bitcoin казино ethereum cryptocurrency dash github ethereum cryptocurrency ico claim bitcoin price bitcoin bitcoin обменники bitcoin pools bitcoin сигналы polkadot cadaver
hd7850 monero bye bitcoin people bitcoin сколько bitcoin транзакции ethereum bitcoin rig форумы bitcoin icons bitcoin bcn bitcoin
monero cryptonote
rx560 monero claim bitcoin математика bitcoin ava bitcoin tether обменник bitcoin auto виталий ethereum double bitcoin bitcoin multisig redex bitcoin price bitcoin kupit bitcoin bitcoin бесплатные bitcoin цены купить monero bitcoin bazar bitcoin analytics ethereum майнить master bitcoin создать bitcoin get bitcoin криптовалюту monero cryptocurrency tech ethereum github bitcoin анимация bitcoin pro
panda bitcoin gemini bitcoin monero алгоритм bitcoin send ethereum биткоин bitcoin серфинг ethereum хардфорк bye bitcoin monero gui bitcoin neteller bitcoin dance
bitcoin автоматически ethereum testnet приложение tether bitcoin golden кошельки bitcoin проекта ethereum keystore ethereum tether wifi clicks bitcoin платформа bitcoin cryptocurrency gold добыча ethereum accepts bitcoin bitcoin кошелька testnet ethereum bitcoin майнеры Take Blockchain Developer Coursescudaminer bitcoin кран bitcoin bitcoin пицца 20 bitcoin
bitcoin пополнение
monero amd тинькофф bitcoin ethereum zcash free ethereum bitcoin plus habrahabr bitcoin Blockchain. The blockchain itself is a series of blocks that are listed in chronological order. Because previously published blocks can’t be modified or altered after they’ve been added to the blockchain, this provides a level of transparency. After all, everyone can see the transactions.bitcoin будущее bitcoin установка bitcoin bitcoin видеокарты cryptocurrency trading bitcoin bitrix hyip bitcoin bitcoin redex clame bitcoin
магазин bitcoin ethereum алгоритм bitcoin balance
bitcoin online bitcoin casinos bitcoin logo monero hardfork
bitcoin play брокеры bitcoin paidbooks bitcoin tinkoff bitcoin ethereum casino ethereum info пицца bitcoin bitcoin новости ethereum кран bitcoin exe
bitcoin кранов пример bitcoin iobit bitcoin виталик ethereum bitcoin weekend service bitcoin bitcoin курс hack bitcoin bitcoin транзакции bitcoin linux sgminer monero github ethereum bitcoin qr анимация bitcoin уязвимости bitcoin bitcoin бонусы se*****256k1 ethereum bitcoin talk заработать monero bitcoin token
love bitcoin алгоритмы ethereum ethereum info альпари bitcoin бот bitcoin tether apk bitcoin genesis пожертвование bitcoin Another way to get Litecoin wallets is by signing into litecoin.org, which allows them to download and save wallets, to store their Litecoin. Suppose a trader wishes to store more than $1000, there are a few hardware wallets that are available on the market.шрифт bitcoin In many descriptions, Ethereum smart contracts are called 'Turing complete'. This means that they are fully functional and can perform any computation that you can do in any other programming language.5Regulatory responsesThere are many potential dimensions of centralization and they can be difficult to quantify:ethereum chaindata cryptocurrency bitcoin статистика ethereum fox bitcoin bitcoin чат roboforex bitcoin bitcoin matrix курс bitcoin создатель bitcoin algorithm bitcoin bitcoin ключи bitcoin 4000 60 bitcoin bitcoin adress topfan bitcoin ethereum fork bitcoin ecdsa ethereum конвертер bitcoin вложить coinder bitcoin
карта bitcoin bitcoin accepted Smart Contract - EthereumPeople’s requirements have to coincide—if you have something to trade, someone else has to want it, and you have to want what the other person is offering.monero address avto bitcoin bitcoin торговля bitcoin адрес вход bitcoin 3d bitcoin bitcoin land rx470 monero collector bitcoin Smaller hedge funds have already been dabbling in Bitcoin, and Tudor Jones may be the largest investor to date to get into it. There are now firms that have services directed at getting institutional investors on board with Bitcoin, whether they be hedge funds, pensions, family offices, or RIA Firms, by providing them the enterprise-grade security and execution they need, in an asset class that has historically been focused mainly on retail adoption. Even an asset manager as large as Fidelity now has a group dedicated to providing institutional cryptocurrency solutions.earn bitcoin сайте bitcoin bitcoin wmx earn bitcoin payable ethereum ethereum crane bitcoin mail bitcoin торговать 0 bitcoin gemini bitcoin apk tether bitcoin зебра bitcoin spinner dice bitcoin bitcoin cache ютуб bitcoin Block 7,280,000 to now: 2 Ether (changed via EIP-1234)How decentralized is Ethereum mining?bitcoin cloud cryptocurrency calendar ethereum wiki форекс bitcoin monero майнинг
bitcoin стоимость time bitcoin bitcoin сложность bitcoin alliance bitcoin calculator capitalization bitcoin deep bitcoin ethereum виталий принимаем bitcoin
matteo monero 6000 bitcoin bitcoin оборот bitcoin книги bitcoin qt кредиты bitcoin billionaire bitcoin 0 bitcoin reverse tether
дешевеет bitcoin проекта ethereum bitcoin fasttech advcash bitcoin What is SegWit and How it Works ExplainedIt’s difficult to make sense of the differences between Bitcoin and Ethereum if you aren’t familiar with all the fancy, technical words that crypto geeks use.zebra bitcoin халява bitcoin hash bitcoin
python bitcoin bitcoin windows pump bitcoin bitcoin прогноз system bitcoin
ethereum pool bitcoin make крах bitcoin bitcoin зебра alpari bitcoin куплю ethereum
bitcoin banking masternode bitcoin goldmine bitcoin options bitcoin 999 bitcoin 99 bitcoin bitcoin bitrix bitcoin cudaminer продам ethereum your bitcoin blogspot bitcoin ethereum кошельки
alien bitcoin bitcoin кости
bitcoin kz bitcoin weekend blockchain bitcoin
сбор bitcoin tether пополнение bitcoin mail
bitcoin cloud tether верификация