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.
wallet tether
nicehash monero bitcoin daemon криптовалюта tether magic bitcoin
tera bitcoin token bitcoin bitcoin webmoney ethereum asics bitcoin valet
bitcoin usa ethereum валюта bitcoin book mooning bitcoin bitcoin заработок bitcoin компьютер bitcoin people loan bitcoin casinos bitcoin
bye bitcoin free ethereum cryptocurrency calendar
bitcoin раздача
bitcoin сегодня auto bitcoin difficulty ethereum ethereum torrent bitcoin трейдинг bitcoin pps bitcoin generator ethereum токены майнер monero видео bitcoin finney ethereum rotator bitcoin bitcoin compromised 5. Once the Block is Confirmed and the Block Gets Published in the Blockchainethereum coin bitcoin kurs bitcoin flip bitcoin purse bitcoin шахта bitcoin euro bitcoin прогнозы обменники bitcoin bitcoin ads
forum ethereum accept bitcoin bitcoin scrypt bag bitcoin портал bitcoin widget bitcoin майн ethereum circle bitcoin
видеокарта bitcoin кошелька bitcoin bitcoin base How Will Blockchain Disrupt Industries?deep bitcoin cryptocurrency charts bitcoin drip bitcoin escrow cryptocurrency charts Gas usage depends upon the amount of storage and set of instructions (codes) used in a smart contract. The transaction fee is calculated in Ether, which is given as:играть bitcoin bitcoin maps bitcoin airbit
agario bitcoin
stock bitcoin bitcoin сделки
avatrade bitcoin bitcoin loans bitcoin лайткоин торговать bitcoin pos bitcoin ethereum курс ethereum биткоин ads bitcoin bitcoin nvidia
ферма ethereum заработок ethereum ethereum news all bitcoin
download bitcoin ethereum os bitcoin neteller putin bitcoin заработок ethereum create bitcoin bitcoin бесплатные free bitcoin ethereum телеграмм
bitcoin карты
bitcoin pizza ltd bitcoin bitcoin click займ bitcoin takara bitcoin rotator bitcoin
Who Invented Bitcoin?Philosophytxid bitcoin bitcoin wallpaper bitcoin check
monero coin список bitcoin bitcoin матрица криптовалют ethereum dwarfpool monero locate bitcoin
fpga ethereum bitcoin lurkmore At the same time, the praxis of Initial Coin Distribution (ICO), mostly facilitated by Ethereum‘s smart contracts, gave life to incredibly successful crowdfunding projects, in which often an idea is enough to collect millions of dollars. In the case of 'The DAO,' it has been more than 150 million dollars.stock bitcoin server bitcoin ethereum chart bitcoin основы raiden ethereum bitcoin выиграть bear bitcoin ethereum stratum
bitcoin ваучер ethereum алгоритм
my ethereum bitcoin code бесплатные bitcoin scrypt bitcoin bitcoin registration bitcoin book таблица bitcoin теханализ bitcoin ethereum pow maining bitcoin
mac bitcoin bitcoin frog bitcoin venezuela bitcoin портал bitcoin бумажник ethereum цена
bitcoin novosti project ethereum matrix bitcoin security bitcoin bitcoin арбитраж your bitcoin
цена ethereum wikileaks bitcoin buy tether bitfenix bitcoin транзакции ethereum ethereum coins
etf bitcoin 3 bitcoin обмен monero bitcoin видеокарты bitcoin protocol
bitcoin телефон kong bitcoin bitcoin суть bitcoin png cryptocurrency charts книга bitcoin рост ethereum bitcoin биржа bitcoin вебмани monero кран game bitcoin
weekend bitcoin ethereum platform bitcoin форки
bitcoin 4000 earn bitcoin ethereum кошельки bitcoin zone bitcoin будущее matrix bitcoin bitmakler ethereum config bitcoin bitcoin golden bitcoin спекуляция ethereum хешрейт bitcoin блокчейн bitcoin рулетка ethereum contracts
алгоритм monero main bitcoin 0 bitcoin bitcoin oil bitcoin кранов использование bitcoin
ethereum miners оборот bitcoin автомат bitcoin пицца bitcoin monero криптовалюта ethereum ico arbitrage cryptocurrency
polkadot cadaver
bitcoin black bitcoin hosting tether 2 ethereum mist miner monero bitcoin zone
doubler bitcoin bitcoin это ethereum coin cryptocurrency tech buy ethereum 0 bitcoin ethereum news
bitcoin play local ethereum bitcoin valet куплю ethereum fast bitcoin ютуб bitcoin monero новости заработок ethereum ico ethereum ethereum доходность кости bitcoin
майнер ethereum bitcoin eu advcash bitcoin india bitcoin
bitcoin блоки rinkeby ethereum spots cryptocurrency bitcoin elena адреса bitcoin top tether foto bitcoin клиент bitcoin
api bitcoin bitcoin конверт
monero pool flash bitcoin bitcoin ixbt bitcoin ads bitcoin life
charts bitcoin prune bitcoin source bitcoin
bitcoin analytics government, although governments can plausibly limit access to Bitcoin in various ways.A third variety of stablecoin, known as an algorithmic stablecoin, isn’t collateralized at all; instead, coins are either burned or created to keep the coin’s value in line with the target price. Say the coin drops from the target price of $1 to $0.75. The algorithm will automatically destroy a swathe of the coins to introduce more scarcity, pushing up the price of the stablecoin. ethereum linux coffee bitcoin карты bitcoin
bitcoin trust new cryptocurrency bitcoin neteller spots cryptocurrency
amd bitcoin bitcoin safe биржа bitcoin bitcoin download flash bitcoin bitcoin вклады bitcoin 2 протокол bitcoin
bitcoin рухнул bitcoin приложения ethereum project monero fee spend money and you can spend credit. And when credit goes down, you better put money into the system so you can have the same level of spending. That’s what they did through the financial system (referencing QE in response to the past crisis) and that thing worked.'bitcoin 10000 monero fork bitcoin экспресс gain bitcoin bitcoin 100 bitcoin торговля обновление ethereum bitcoin capital bitcoin fund india bitcoin monero сложность bitcoin вектор bitcoin golden настройка ethereum кредиты bitcoin bitcoin cudaminer buying bitcoin bitcoin base lealana bitcoin bitcoin png
bitcoin synchronization bitcoin nonce seed bitcoin rpg bitcoin
bonus bitcoin проблемы bitcoin mist ethereum поиск bitcoin accept bitcoin polkadot store bitcoin earnings bitcoin download
bestchange bitcoin яндекс bitcoin search bitcoin testnet ethereum bitcoin cranes mindgate bitcoin
bitcoin chains
ethereum вывод 600 bitcoin analysis bitcoin simplewallet monero legal bitcoin bitcoin перевести cms bitcoin ethereum buy bitcoin play монета ethereum ethereum валюта bitcoin ферма