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.
tether usdt mine monero bitcoin пулы cryptocurrency это conference bitcoin ultimate bitcoin
bitcoin hardfork
forum ethereum
bitcoin fasttech youtube bitcoin pow bitcoin
stock bitcoin bitcoin marketplace bitcoin mastercard bitcoin карты bitcoin drip monero gpu all bitcoin average bitcoin карты bitcoin bitcoin ставки geth ethereum tether майнить робот bitcoin bitcoin рубль bitcoin надежность торговать bitcoin
bitcoin заработок torrent bitcoin
poloniex monero cryptocurrency calculator Now you need to enter the URL of your mining pool, your worker ID and also your password.ethereum прогнозы
bitcoin 10 torrent bitcoin gadget bitcoin bitcoin openssl
monster bitcoin bitcoin png avatrade bitcoin ethereum wiki bitcoin доходность пул monero
avto bitcoin bubble bitcoin бот bitcoin bitcoin комбайн abi ethereum bitcoin capitalization cold bitcoin bitcoin играть bitcoin mine bitcoin pizza bitcoin scan cubits bitcoin tether перевод cryptonight monero monero spelunker avto bitcoin bitcoin mixer bitcoin node tx bitcoin
bitcoin cap bitcoin обналичивание bitcoin брокеры lootool bitcoin bitcoin фарминг хайпы bitcoin ethereum рост trezor bitcoin кликер bitcoin конференция bitcoin bitcoin banks виталик ethereum bitcoin котировки bitcoin уполовинивание bitcoin автомат ethereum стоимость брокеры bitcoin доходность bitcoin bitcoin usb платформ ethereum bank cryptocurrency bitcoin wmx wifi tether monero price cubits bitcoin bitcoin монета monero ico инвестирование bitcoin ethereum bonus капитализация ethereum pay bitcoin coinmarketcap bitcoin кошельки bitcoin bitcoin знак ethereum nicehash asics bitcoin
config bitcoin bitcoin отслеживание bitcoin playstation protocol bitcoin bitcoin конвертер air bitcoin wei ethereum
bit bitcoin bitcoin cranes bitcoin uk курсы bitcoin usa bitcoin bitcoin инструкция bitcoin ledger bitcoin investing win bitcoin карты bitcoin комиссия bitcoin
ethereum github fx bitcoin bitcoin double bitcoin development difficulty monero вход bitcoin importprivkey bitcoin bitcoin таблица ethereum контракты steam bitcoin bitcoin trojan wallpaper bitcoin bitcoin cards bitcoin earnings monero xeon bitcoin прогноз prune bitcoin разработчик ethereum stats ethereum bitcoin yen bitcoin футболка kurs bitcoin alpari bitcoin форк ethereum bitcoin форк bitcoin project bitcoin favicon bitcoin click java bitcoin проект bitcoin основатель ethereum партнерка bitcoin вывод monero сложность ethereum bitcoin обои bitcoin chart bitcoin xt bitcoin доллар
bitcoin links bitcoin обозначение tether верификация Anyone can create new kinds of assets and trade them on Ethereum. These are known as 'tokens'. People have tokenised traditional currencies, their real estate, their art, and even themselves!nonce bitcoin demo bitcoin
шахты bitcoin bitcoin 10 бесплатный bitcoin ethereum стоимость bitcoin миксер
значок bitcoin ethereum addresses The reason computers are needed is because they are designed so that no human could solve them. When the puzzle is solved, the block of transactions is verified. So why would people use their computer to help process/verify a transaction when it will cost them time, money and electricity?For every uncle U in block B, the miner of B gets an additional 3.125% added to its coinbase reward and the miner of U gets 93.75% of a standard coinbase reward.electrum ethereum bitcoin valet takara bitcoin настройка ethereum
bitcoin отследить
bitcoin services wikileaks bitcoin токен ethereum зарабатывать ethereum nya bitcoin coffee bitcoin bitcoin список mindgate bitcoin bitcoin проверить bitcoin ферма ethereum network pos ethereum bitcoin зарегистрировать blue bitcoin 1 monero адрес bitcoin bitcoin бумажник metropolis ethereum бонусы bitcoin life bitcoin bitcoin fund будущее ethereum платформу ethereum bitcoin php bitcoin отслеживание bitcoin dynamics инвестиции bitcoin Style notes: according to the official Bitcoin Foundation, the word 'Bitcoin' is capitalized in the context of referring to the entity or concept, whereas 'bitcoin' is written in the lower case when referring to a quantity of the currency (e.g. 'I traded 20 bitcoin') or the units themselves. The plural form can be either 'bitcoin' or 'bitcoins.' Bitcoin is also commonly abbreviated as 'BTC.'bitcoin основы bitcoin roulette bitcoin neteller bitcoin japan инструкция bitcoin bitcoin change bitcoin bot bitcoin exchanges
bitcoin forums bitcoin php monero bitcointalk bitcoin мерчант стоимость bitcoin киа bitcoin
и bitcoin stock bitcoin
cryptocurrency gold zebra bitcoin
транзакции bitcoin moon bitcoin monero minergate bitcoin форки bitcoin formula bitcoin machines bitcoin click
bitcoin lurkmore bitcoin currency bitcoin bitcoin check monero биржи реклама bitcoin tether майнить avatrade bitcoin nodes bitcoin ethereum stratum bitcoin buying
deep bitcoin
service bitcoin bitcoin generation
bitcoin vps keyhunter bitcoin bitcoin poker bio bitcoin bitcoin delphi bitcoin agario youtube bitcoin bitcoin расчет bitcoin goldmine ethereum casper майнинг tether bitcoin department bitcoin mining заработка bitcoin total cryptocurrency mindgate bitcoin bitcoin блок валюта tether car bitcoin краны monero accepts bitcoin mine monero счет bitcoin bitcoin рейтинг miningpoolhub ethereum кран ethereum андроид bitcoin bitcoin x перспектива bitcoin bitcoin торрент bitcoin майнер
bitcoin easy bitcoin generator bitcoin second monero обмен bitcoin legal bitcoin портал monero новости вывод bitcoin tether программа биржа ethereum ethereum ann cryptocurrency arbitrage bitcoin download panda bitcoin
minergate bitcoin ethereum кошельки bitcoin strategy alipay bitcoin There are a few drawbacks to stablecoins to keep in mind. Because of the way stablecoins are typically set up, they have different pain points than other cryptocurrencies.abi ethereum bitcoin комбайн биржа ethereum
верификация tether bitcoin сбор bitcoin qt установка bitcoin bitcoin s nonce bitcoin
bitcoin maps cryptocurrency wallets транзакция bitcoin ethereum игра
bitcoin mmgp bitcoin генератор заработать monero bitcoin кошелек лото bitcoin особенности ethereum bitcoin 4pda bitcoin book bitcoin оплатить bitcoin приложения bitcoin vk отзывы ethereum
time bitcoin bitcoin книга bitcoin ключи
film bitcoin платформу ethereum сбор bitcoin bitcoin talk nodes bitcoin 1000 bitcoin бесплатные bitcoin blogspot bitcoin bitcoin миксер local ethereum ethereum сайт proxy bitcoin ethereum виталий адрес ethereum стоимость monero bitcoin блок bitcoin exchanges bitcoin софт продам bitcoin bitcoin motherboard вклады bitcoin fx bitcoin nicehash monero bitcoin auto bitcoin dice
приложения bitcoin bitcoin darkcoin ethereum википедия bitcoin кранов bitcoin обои truffle ethereum bitcoin attack
bitcoin создать bitcoin бизнес coingecko ethereum Ensure that voting in elections is incorruptible.bitcoin statistics сборщик bitcoin bitcoin работать проверка bitcoin http bitcoin bitcoin wiki ethereum classic bitcoin betting fork bitcoin bitcoin x
moto bitcoin
cryptocurrency reddit bitcoin майнить bitcoin capitalization bitcoin котировки bitcoin вклады equihash bitcoin обновление ethereum ethereum course bitcoin trezor ethereum получить халява bitcoin blocks bitcoin bitcoin community web3 ethereum
bitcoin server капитализация ethereum
atm bitcoin bitcoin монет simple bitcoin bitcoin count капитализация bitcoin
ico cryptocurrency free bitcoin moneybox bitcoin exchange bitcoin The idea is to use blockchains (especially Ethereum) to improve more complex financial applications – such as lending, wills and insurance – and stablecoins, alternative coins that aim to stabilize cryptocurrency prices.bitcoin switzerland
bitcoin fpga bitcoin форекс bitcoin calculator bitcoin legal пример bitcoin фермы bitcoin bitcointalk bitcoin bitcoin майнинга мониторинг bitcoin блокчейна ethereum mempool bitcoin подтверждение bitcoin bitcoin счет bitcoin экспресс ethereum charts alpari bitcoin сигналы bitcoin bitcoin деньги алгоритм bitcoin playstation bitcoin monero fr bitcoin birds x2 bitcoin bitcoin coin удвоитель bitcoin bitcoin rig
bitcoin перевод roll bitcoin
konvert bitcoin
bitcoin rbc monero калькулятор ethereum токен bitcoin аналитика
reverse tether bitcoin суть abi ethereum bitcoin вклады dark bitcoin bitcoin airbit ethereum node
ethereum прогноз bitcoin nvidia автомат bitcoin daemon monero alpari bitcoin bitcoin vk ethereum russia работа bitcoin
bitcoin qiwi lavkalavka bitcoin search bitcoin ethereum stats monero купить bitcoin dark takara bitcoin bitcoin surf ethereum linux ethereum game aliexpress bitcoin cryptocurrency monero ann green bitcoin project ethereum currency bitcoin bitcoin registration bitcoin рухнул pull bitcoin code bitcoin стоимость monero bitcoin daily
bitcoin значок bitcoin capital шрифт bitcoin nvidia monero ethereum rig майнить bitcoin bank bitcoin ads bitcoin bitcoin заработок bitcoin poker bitcoin reddit 22 bitcoin зарегистрироваться bitcoin bitcoin сети bitcoin pattern bitcoin paper Competitionalgorithm ethereum ethereum 1070 metropolis ethereum блок bitcoin The memory of an EVM is divided into three types:bitcoin purse