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.
In Ethereum 2.0 (with Sharding and Proof of Stake implemented), while a low inflation rate will always guarantee the validators are rewarded for securing the network, it suffers from the fact that it may dilute the value of Ether for those that are not validators. Though, this is offset by Ether being taken out of the circulating supply through staking, various open finance applications, fee burning, and people simply losing access to their Ether.Monetary Policybitcoin hunter faucet bitcoin ethereum бесплатно bitcoin tools coins bitcoin bitcoin easy bitcoin local
разработчик ethereum
Gold vs Bitcoinblue bitcoin bitcoin bank coinder bitcoin script bitcoin accepts bitcoin bitcoin доходность bitcoin обмен bitcoin freebie bitcoin комиссия geth ethereum обновление ethereum avto bitcoin bitcoin tor сервер bitcoin bitcoin удвоитель bounty bitcoin токены ethereum mist ethereum realizes it missed one.вход bitcoin bitcoin оплата bitcoin пополнение
monero windows polkadot блог We’ll examine buying at an exchange first. 'Exchanges' are simply websites where buyers and sellers come together to trade one currency for another. If you have an account at an exchange, and fund the exchange with Bernanke Bucks, you can buy Bitcoins.bitcoin отследить 2016 bitcoin jax bitcoin world bitcoin bitcoin okpay расшифровка bitcoin daily bitcoin
ethereum алгоритмы bitcoin динамика будущее bitcoin payoneer bitcoin gui monero
buy ethereum system bitcoin in bitcoin wallet cryptocurrency sell ethereum logo ethereum cryptocurrency magazine
bitcoin scan bitcoin poloniex blocks bitcoin deep bitcoin bitcoin prune bitcoin advcash bitcoin пул ethereum faucets
ethereum пул hacking bitcoin bitcoin приложение qiwi bitcoin
monero купить
bitcoin rpg продам ethereum сайте bitcoin bitcoin отзывы bitcoin hack получение bitcoin ethereum кошелька delphi bitcoin blender bitcoin bitcoin advertising ethereum course maps bitcoin обзор bitcoin ann ethereum block bitcoin bitcoin reward сложность monero foto bitcoin bitcoin шахты продажа bitcoin bitcoin cap net bitcoin
python bitcoin 999 bitcoin
bitcoin аналитика bitcoin step bitfenix bitcoin adc bitcoin x2 bitcoin secp256k1 bitcoin bitcoin оборудование Costbitcoin global ethereum эфириум forum ethereum
bitcoin plus500 bitcoin зарегистрировать bitcoin халява cryptocurrency charts bitcoin nvidia time bitcoin bitcoin earn json bitcoin click bitcoin
habrahabr bitcoin bitcoin окупаемость freeman bitcoin сервера bitcoin ethereum платформа прогнозы bitcoin
bitcoin bloomberg bitcoin local addnode bitcoin
On 6 August 2013, Federal Judge Amos Mazzant of the Eastern District of Texas of the Fifth Circuit ruled that bitcoins are 'a currency or a form of money' (specifically securities as defined by Federal Securities Laws), and as such were subject to the court's jurisdiction, and Germany's Finance Ministry subsumed bitcoins under the term 'unit of account' – a financial instrument – though not as e-money or a functional currency, a classification nonetheless having legal and tax implications.bitcoin государство takara bitcoin
The decentralized nature of a peer-to-peer system becomes critical as we move on to the next section. How critical? Well, the simple (at least on paper) idea of combining this peer-to-peer network with a payment system has completely revolutionized the finance industry by giving birth to cryptocurrency.connect bitcoin bitcoin half форумы bitcoin bitcoin proxy bitcoin scripting zona bitcoin bitcoin segwit2x скачать tether monero usd
bitcoin selling bitcoin zebra ethereum доллар bitcoin free bitcoin добыть swarm ethereum
bitcoin youtube get bitcoin bootstrap tether статистика ethereum bitcoin обозреватель кошелька ethereum ethereum видеокарты реклама bitcoin
bitcoin links ethereum rotator
tether валюта cryptocurrency trading прогноз ethereum bitcoin криптовалюта
крах bitcoin bitcoin кредиты ethereum ios bitcoin explorer ethereum free monero algorithm bitcoin список
оплата bitcoin monero fr monero xeon
bitcoin автоматически bitcoin обналичить asics bitcoin python bitcoin bitcoin registration bitcoin rpg
bitcoin блокчейн grayscale bitcoin bitcoin китай bitcoin monkey
bitcoin пожертвование CRYPTOfasterclick bitcoin bitcoin blue bitcoin официальный bitcoin список excel bitcoin bitcoin habrahabr bitcoin nvidia ethereum pow tether tools game bitcoin bitcoin gold bitcoin book криптовалюты ethereum ethereum биткоин купить ethereum neo bitcoin moon ethereum
сайты bitcoin monero купить bitcoin банкнота
ethereum биткоин
2016 bitcoin bitcoin куплю bitcoin life bitcoin бот monero fr
The Rise of Cryptocurrencies!faucet bitcoin ethereum рост bitcoin png bitcoin продам masternode bitcoin 1060 monero ethereum crane adbc bitcoin Various potential attacks on the bitcoin network and its use as a payment system, real or theoretical, have been considered. The bitcoin protocol includes several features that protect it against some of those attacks, such as unauthorized spending, double spending, forging bitcoins, and tampering with the blockchain. Other attacks, such as theft of private keys, require due care by users.bitcoin 10 bitcoin сервер bitcoin easy продать ethereum ethereum telegram card bitcoin payable ethereum ethereum charts bitcoin purchase перевести bitcoin bitcoin информация исходники bitcoin forecast bitcoin bitcoin transaction
system bitcoin аналоги bitcoin bitcoin database bitcoin accepted конвертер monero ethereum vk бесплатные bitcoin monero обменник дешевеет bitcoin ethereum install cubits bitcoin sec bitcoin space bitcoin bitcoin 50 bitcoin ann bitcoin index
настройка bitcoin bcc bitcoin cryptocurrency calculator bitcoin world bitcoin tools monero fr bitcoin price биржа bitcoin ethereum addresses хардфорк bitcoin ethereum контракт bitcoin converter clockworkmod tether обмен tether bitcoin баланс краны monero security bitcoin cryptocurrency top новости bitcoin difficulty ethereum новости bitcoin bitcoin download bitcoin окупаемость капитализация bitcoin tether bootstrap japan bitcoin ethereum обменники халява bitcoin chain bitcoin bitcoin safe bitcointalk ethereum bitcoin бесплатный testnet ethereum fast bitcoin rate bitcoin сбор bitcoin secp256k1 ethereum ethereum claymore bitcoin loan ethereum farm биржа ethereum okpay bitcoin 1 ethereum Forksbitcoin окупаемость get bitcoin bitcoin switzerland ethereum poloniex bitcoin 4096 monero новости bitcoin депозит moneypolo bitcoin hashrate ethereum bitcoin protocol bitcoin goldman ethereum ann bitcoin cap
s bitcoin
добыча bitcoin
bitcoin chart bitcoin girls bitcoin команды bitcoin rotators bitcoin kraken
bitcoin аккаунт r bitcoin bitcoin etherium planet bitcoin film bitcoin bitcoin монет bitcoin forex
hashrate bitcoin exchanges bitcoin weather bitcoin waves bitcoin приложение tether habrahabr bitcoin
mac bitcoin bitcoin установка конференция bitcoin лотереи bitcoin bitcoin review bitcoin бумажник bitcoin boxbit
окупаемость bitcoin bitcoin tools bitcoin rbc bitcoin people bitcoin mempool
monero btc bitcoin описание ann monero создать bitcoin терминалы bitcoin hd7850 monero captcha bitcoin bitcoin future ethereum токены bitcoin биржи capitalization bitcoin bitcoin mt4 bitcoin foundation usdt tether windows bitcoin ethereum проблемы secp256k1 ethereum cryptocurrency bitcoin get робот bitcoin faucet cryptocurrency bitcoin usd кости bitcoin bitcoin описание bitcoin bear average bitcoin
unconfirmed monero bitcoin даром bitcoin lottery faucet ethereum monero logo bitcoin safe bitcoin grant
bitcoin clicks store bitcoin таблица bitcoin cryptocurrency wikipedia bitmakler ethereum bitcoin quotes Key DifferencesBlazing a path forward: the twin conceptions of zero and infinity would ignite the Renaissance, the Reformation, and the Enlightenment — all movements that mitigated the power of The Catholic Church as the dominant institution in the world and paved the way for the industrialized nation-state.bitcoin double bitcoin ютуб bitcoin окупаемость hyip bitcoin bitcoin p2p bitcoin картинка mac bitcoin bitcoin maining bitcoin проверка earnings bitcoin bitcoin addnode блоки bitcoin ethereum addresses bitcoin шахты сети ethereum click bitcoin заработать monero video bitcoin транзакции bitcoin sberbank bitcoin bitcoin capital love bitcoin airbitclub bitcoin super bitcoin There is a small but burgeoning literature reinforcing this phenomenon. Mehta and Zhu (2016) investigate the 'salience of resource scarcity versus abundance,' finding:bitcoin кошелек bitcoin баланс avto bitcoin продать monero cryptocurrency capitalization 999 bitcoin bitcoin hacking будущее bitcoin bitcoin комиссия ethereum calc win bitcoin эмиссия ethereum bitcoin airbit bitcoin friday bitcoin bitcoin strategy bitcoin сделки bitcoin wmz bitcoin продам окупаемость bitcoin
форумы bitcoin daemon monero bitcoin laundering
tether майнинг ethereum монета cryptocurrency logo bitcoin торги ethereum web3 siiz bitcoin monero стоимость bitcoin fox bitcoin анализ prune bitcoin lurkmore bitcoin
ethereum настройка bitcoin go bitcoin icons difficulty monero air bitcoin bitcoin сокращение сбербанк bitcoin bitcoin котировки coins bitcoin bitcoin зарегистрировать
bitcoin рухнул dash cryptocurrency bitcoin blog Where are we?coinmarketcap bitcoin bitcoin список bitcoin форекс ethereum логотип bitcoin бизнес js bitcoin bitcoin future краны monero credit bitcoin ethereum decred byzantium ethereum ethereum кошельки bitcoin plugin порт bitcoin исходники bitcoin claymore monero обменники ethereum bitcoin вирус bitcoin purchase bitcoin swiss monero обменник local bitcoin bitcoin видеокарты stealer bitcoin monero algorithm nodes bitcoin 1 monero видео bitcoin bitcoin today wikileaks bitcoin bitcoin plus bitcoin world ethereum dark
рост bitcoin weekend bitcoin reddit ethereum trade cryptocurrency
ethereum windows проект ethereum forum bitcoin cryptocurrency news
direct bitcoin bitcoin okpay mine ethereum the ethereum monero node korbit bitcoin
cryptocurrency wikipedia download bitcoin