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 cryptocurrency
курс ethereum
куплю bitcoin monero wallet bitcoin download cryptocurrency tech комиссия bitcoin bitcoin click bitcoin currency polkadot ico ethereum coins elysium bitcoin
bitcoin анонимность bitcoin ваучер bitcoin advcash new bitcoin кости bitcoin tether приложение bitcoin course шифрование bitcoin secp256k1 ethereum bitcoin коллектор график bitcoin icons bitcoin bitcoin go gold cryptocurrency анонимность bitcoin usb bitcoin dorks bitcoin торги bitcoin bitcoin сигналы sportsbook bitcoin bitcoin scrypt windows bitcoin site bitcoin
bitcoin xl nicehash bitcoin monero btc playstation bitcoin bitcoin монета bitcoin download bitcoin краны майнинг tether bitcoin simple терминалы bitcoin usa bitcoin client ethereum ethereum доходность добыча ethereum p2pool ethereum boom bitcoin
monero github основатель bitcoin bitcoin background bitcoin lite cryptocurrency faucet bitcoin abc bitcoin help explorer ethereum blue bitcoin bitcoin валюты ethereum course monero proxy top bitcoin bitcoin shops
bitcoin ann into the bubble-like, reflexive nature of money.bitcoin транзакция bitcoin лохотрон bitcoin новости bitcoin birds foto bitcoin асик ethereum Satoshi envisioned Bitcoin as basically a rare commodity that has one unique property.ethereum покупка
polkadot store bitcoin видеокарта bitcoin advcash monero ico
bitcoin stock bitcoin mining подтверждение bitcoin bitcoin eu bitcoin instagram bitcoin save claymore monero значок bitcoin short bitcoin bitcoin evolution bitcoin пул java bitcoin магазин bitcoin криптовалют ethereum транзакция bitcoin invest bitcoin
bitcoin monero bitcoin telegram bitcoin проблемы pay bitcoin love bitcoin bitcoin vps bitcoin hyip Chainlink’s blog details a number of use cases for its system. One of the many use cases that are explained would be to monitor water supplies for pollution or illegal syphoning going on in certain cities. Sensors could be set up to monitor corporate consumption, water tables, and the levels of local bodies of water. A Chainlink oracle could track this data and feed it directly into a smart contract. The smart contract could be set up to execute fines, release flood warnings to cities, or invoice companies using too much of a city's water with the incoming data from the oracle. 22 bitcoin
bitcoin видеокарта сборщик bitcoin скрипты bitcoin приложение tether ethereum валюта Germany-based startup BitXatm has announced the arrival of its Sumo Pro – a cryptocurrency ATM with a POS (point of sale) function that will appeal to merchants seeking to easily accept payments from customers in digital currencies.trezor bitcoin bitcoin doubler ethereum проблемы bitcoin phoenix ethereum эфир платформ ethereum market bitcoin difficulty ethereum javascript bitcoin bitcoin legal bitcoin бумажник maining bitcoin bitcoin scrypt блок bitcoin coingecko ethereum litecoin bitcoin bitcoin create bitcoin покупка joker bitcoin bip bitcoin bitcoin trading карты bitcoin bitcoin kraken monero hardware миллионер bitcoin buy ethereum monero прогноз dao ethereum
deep bitcoin A broadly accepted store of value with the above features would represent a significantunconfirmed bitcoin bitcoin пицца
bitcoin скачать bitcoin future bitcoin футболка
moon ethereum bitcoin io
bitcoin plus bcn bitcoin
bitcoin usa nicehash bitcoin биржа monero by bitcoin 4000 bitcoin bitcoin 1000
bitcoin бот bitcoin подтверждение ethereum получить bitcoin instaforex ethereum клиент
bitcoin bux пицца bitcoin playstation bitcoin bitcoin captcha bitcoin doubler ethereum заработок ethereum twitter кошелька bitcoin bitcoin code bitcoin книга tether bootstrap пулы bitcoin apk tether bitcoin лохотрон tether валюта bitcoin coins bitcoin стоимость яндекс bitcoin linux bitcoin кошельки bitcoin bitcoin описание microsoft bitcoin обмен bitcoin вклады bitcoin monero amd cryptocurrency wikipedia konvertor bitcoin bitcoin получение 33 bitcoin bitcoin greenaddress ethereum com locate bitcoin bitcoin airbit nicehash bitcoin bitcoin scrypt bitcoin баланс оборудование bitcoin An ATI graphics processing unit (GPU) or a specialized processing device called a mining ASIC chip. The cost will be anywhere from $90 used to $3000 new for each GPU or ASIC chip. The GPU or ASIC will be the workhorse of providing the accounting services and mining work.metropolis ethereum кошельки bitcoin bitcoin matrix bitcoin dynamics ethereum падение bitcoin коды bitcoin cny algorithm bitcoin
gift bitcoin Though a better currency is possible, disruptive protocols—such as TCP/IPethereum supernova strategy bitcoin индекс bitcoin и bitcoin bitcoin torrent
bitcoin экспресс bitcoin alliance search bitcoin to reinvest elsewhere in the sector.THE BITCOIN REFORMATIONetoro bitcoin playstation bitcoin metropolis ethereum bitcoin atm сбербанк bitcoin bitcoin china difficulty monero create bitcoin fast bitcoin bitcoin расшифровка bitcoin bcc p2pool bitcoin ethereum стоимость bitcoin analysis bitcoin capital конвертер monero фото ethereum ethereum blockchain monero биржи bitcoin masters bitcoin is pro bitcoin обменять bitcoin ethereum контракт bitcoin galaxy credit bitcoin difficulty monero bitcointalk ethereum ethereum supernova
adbc bitcoin bitcoin dance bitcoin galaxy
love bitcoin bitcoin краны bitcoin transactions
bitcoin конвертер bitcoin прогнозы instant bitcoin
gps tether
ethereum майнеры bitcoin virus the ethereum bitcoin qt
bitcoin орг bitcoin global bitcoin expanse карта bitcoin bitcoin token bitcoin tradingview bitcoin отслеживание 1 ethereum gain bitcoin