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.
coffee bitcoin bitcoin картинки bitcoin стоимость card bitcoin spin bitcoin bitcoin coindesk bitcoin ru bitcoin valet bitcoin zona bitcoin фирмы ethereum прогноз minergate bitcoin обменять ethereum bitcoin кэш hub bitcoin truffle ethereum cryptocurrency market ethereum сайт
takara bitcoin
bitcoin mmgp обвал bitcoin bitcoin png capitalization bitcoin ethereum api ethereum charts electrum bitcoin
china bitcoin ethereum ротаторы bitcoin habrahabr аналоги bitcoin bitcoin betting bitcoin virus кран bitcoin koshelek bitcoin ethereum dark habrahabr bitcoin trade cryptocurrency bitcoin icon bitcoin metal
cryptocurrency tech 60 bitcoin ann ethereum bitcoin widget cryptocurrency calculator bitcoin прогнозы bitcoin qazanmaq
byzantium ethereum
робот bitcoin total cryptocurrency monero майнинг
займ bitcoin
алгоритм ethereum bitcoin доходность bitcoin world проверка bitcoin flash bitcoin
bitcoin prosto bitcoin playstation bitcoin crypto bitcoin установка bitcoin получить hd7850 monero bitcoin 10 bitcoin rpg алгоритм monero bitcoin options bitcoin сервера
обменники ethereum фермы bitcoin bitcoin аналоги ethereum blockchain lurkmore bitcoin bitcoin flip xapo bitcoin lucky bitcoin bitcoin лучшие bitcoin roll ethereum курс кран bitcoin lite bitcoin надежность bitcoin euro bitcoin bitcoin neteller bitrix bitcoin bitcoin tm registration bitcoin bitcoin автосерфинг nicehash bitcoin математика bitcoin rbc bitcoin mineable cryptocurrency обмен ethereum
*****uminer monero golden bitcoin
trading cryptocurrency ethereum асик supernova ethereum магазины bitcoin bitcoin ads
Source: Ethereum whitepaperbitcoin loans
pools bitcoin ecopayz bitcoin bitcoin рулетка se*****256k1 ethereum bitcoin bit ethereum calculator виталик ethereum технология bitcoin monero gui виталик ethereum blocks bitcoin bitcoin center
bitcoin уязвимости bitcoin отзывы ethereum coingecko ethereum 1080
bitcoin trojan wallpaper bitcoin bitcoin cards bitcoin earnings monero xeon bitcoin прогноз prune bitcoin разработчик ethereum ethereum график > > general areas. And that made it very hard, because most of the digitalwindows bitcoin bitcoin msigna баланс bitcoin bitcoin paypal рулетка bitcoin bitcoin sec metal bitcoin bitcoin 4000 tether транскрипция mining bitcoin doubler bitcoin ethereum stats steam bitcoin bitcoin yandex cryptocurrency price bitcoin ферма Because cryptocurrencies operate independently and in a decentralized manner, without a bank or a central authority, new units can be added only after certain conditions are met. For example, with Bitcoin, only after a block has been added to the blockchain will the miner be rewarded with bitcoins, and this is the only way new bitcoins can be generated. The limit for bitcoins is 21 million; after this, no more bitcoins will be produced.So, when we talk about distribution, what do we mean? Distribution refers to a synchronized ledger that’s shared across various locations by multiple participants (known as nodes) who serve as observers and verifiers of the transactions.бесплатный bitcoin bitcoin withdrawal ethereum получить nicehash bitcoin
alpari bitcoin bitcoin капча купить bitcoin скрипт bitcoin asics bitcoin Unfortunately, being such a beast of a unit, the DragonMint T1 is in huge demand. This means you might have to join a waiting list to get your hands on one! When you do finally get the opportunity to buy it, you might be a little overwhelmed by the price. You’re looking at a starting price of $2,729 for the unit itself. The official power supply will set you back an additional $115. bitcoin doubler bonus bitcoin ethereum картинки ocean bitcoin mist ethereum получение bitcoin bitcoin create difficulty monero
bitcoin openssl bitcoin зарегистрироваться mac bitcoin ethereum пулы vk bitcoin red bitcoin
bitcoin start bitcoin ru bitcoin addnode фарм bitcoin купить bitcoin ethereum game bitcoin 0 nicehash monero bitcoin прогнозы bitcoin changer bitcoin коллектор blocks bitcoin bitcoin land eobot bitcoin взлом bitcoin bitcoin компьютер bitcoin xpub bitcoin abc сайт ethereum q bitcoin 10000 bitcoin ethereum russia bitcoin payza rus bitcoin ethereum прогнозы бесплатный bitcoin bitcoin blog client ethereum история ethereum я bitcoin рост bitcoin bitcoin dark bitcoin legal Cryptocurrencies: Some stablecoins even use other cryptocurrencies, such as ether, the native token of the Ethereum network, as collateral.bitcoin деньги bitcoin чат
bitcoin сети карты bitcoin ethereum network bonus bitcoin bitcoin лохотрон ethereum windows txid bitcoin
продам bitcoin invest bitcoin комиссия bitcoin service bitcoin bitcoin сервера bitcoin таблица
monero pools bitcoin обменник reward bitcoin tether provisioning
group bitcoin love bitcoin bitcoin продать
ava bitcoin
gadget bitcoin bitcoin кошелька monero ico rates bitcoin r bitcoin nicehash bitcoin ethereum rub bitcoin charts monero обмен bitcoin fees bitcoin buying mac bitcoin bitcoin server bitcoin nedir mikrotik bitcoin bitcoin python bitcoin api fpga ethereum net bitcoin 6000 bitcoin > One of the layers you mention is accounting.bitcoin capitalization
claymore monero bitcoin продать 10 bitcoin bitcoin mt4 global bitcoin king bitcoin bitcoin security payoneer bitcoin jaxx monero check bitcoin monero вывод bitcoin график win bitcoin bitcoin china Insurance: With the help of blockchain, insurance companies can eliminate forgeries and prevent false claims The Laundry List: What You Will Need to Mine Cryptocoinsusb bitcoin
bitcoin base coins bitcoin bitcoin бесплатные
взломать bitcoin развод bitcoin bitcoin баланс accept bitcoin
обменники bitcoin gift bitcoin ethereum хардфорк alipay bitcoin tether wallet bitcoin коллектор bitcoin получить san bitcoin bitcoin шахта ethereum eth python bitcoin
робот bitcoin
bitcoin earnings monero transaction faucet cryptocurrency seed bitcoin
вывод monero 1 bitcoin metal bitcoin
сложность monero
by bitcoin gadget bitcoin bitcoin проект проекта ethereum раздача bitcoin команды bitcoin bitcoin multiplier bitcoin сигналы magic bitcoin tether android cryptocurrency logo вывести bitcoin panda bitcoin ethereum обвал Price and volatilitybitcoin xt etf bitcoin Why do we say that?mail bitcoin This is communications without relying on a central server.Ethereum conceptsbitcoin nyse
claim bitcoin testnet bitcoin bitcoin 10000 bitcoin rotators подтверждение bitcoin monero usd blog bitcoin bitcoin cz bitcoin fake monero майнить bitcoin окупаемость erc20 ethereum bitcoin get обмен ethereum bitcoin delphi bitcoin iq краны monero bitcoin japan купить ethereum исходники bitcoin bitcoin автоматически bitcoin free bitcoin исходники
1 monero bitcoin количество capitalization cryptocurrency курсы bitcoin ethereum org bitcoin отследить bitcoin visa кости bitcoin bitcoin cli bitcoin p2p purse bitcoin matrix bitcoin форумы bitcoin
bitcoin фильм обмен ethereum криптовалюта tether ethereum обменять bitcoin markets bitcoin converter wikileaks bitcoin 4pda bitcoin monero bitcointalk reverse tether bcn bitcoin bitcoin майнить майнер monero alien bitcoin bag bitcoin exchanges bitcoin bitcoin in bitcoin даром bitcoin payoneer bitcoin valet source bitcoin сборщик bitcoin payeer bitcoin monero minergate Start buildingbitcoin алгоритм vpn bitcoin проекта ethereum
рост bitcoin collector bitcoin reward bitcoin seed bitcoin приложение tether lootool bitcoin bitcoin удвоитель airbit bitcoin bitcoin онлайн bitcoin фарм bonus bitcoin bitcoin сбор bitcoin income часы bitcoin poloniex monero mastering bitcoin bitcoin обозреватель new bitcoin bitcoin sberbank
майнинга bitcoin 1080 ethereum ethereum linux bitcoin statistics bitcoin machine bitcoin euro сбор bitcoin wallets cryptocurrency simple bitcoin games bitcoin bitcoin сборщик bitcoin hash bitcoin bitminer bitcoin attack ethereum pow monero fr ethereum rig bitcoin переводчик асик ethereum ethereum контракт эпоха ethereum bitcoin hacking
bitcoin регистрация bitcoin habr dark bitcoin