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.
c bitcoin bitcoin шахта
bitcoin ротатор
polkadot stingray bitcoin пожертвование cryptocurrency calendar bitcoin xpub капитализация bitcoin bitcoin msigna
bitcoin hyip спекуляция bitcoin форки bitcoin bitcoin ethereum bitcoin роботы bitcoin ethereum ethereum проекты график bitcoin bitcoin blockstream bitcoin neteller cryptocurrency capitalization bitcoin mmm
ethereum обменять monero gui ethereum dark платформы ethereum сложность ethereum bitcoin land
криптовалют ethereum майнеры monero delphi bitcoin
создатель ethereum bitcoin calculator asic bitcoin bitcoin make wordpress bitcoin банкомат bitcoin bitcoin лопнет приват24 bitcoin блокчейн bitcoin blue bitcoin
Again, like with most Bitcoin mining rigs, the DragonMint T1 doesn’t come with a power supply. The company recommends using the DragonMint 1600W. Nakamoto's involvement with bitcoin does not appear to extend past mid-2010. In April 2011, Nakamoto communicated with a bitcoin contributor, saying that he had 'moved on to other things'.multiply bitcoin bitcoin income They are both virtual currencies that are actively used for services, contracts, and as a store of value. Their popularity has grabbed the attention of news publications and traders alike who are hoping to better understand how blockchain technology may change the monetary landscape overtime. This is where most of the similarities end.decred ethereum bitcoin accepted bitcoin c exchanges bitcoin bitcoin utopia buy tether miningpoolhub monero bitcoin buying bitcoin zebra ico cryptocurrency dwarfpool monero
цена bitcoin okpay bitcoin calculator ethereum bitcoin зарегистрироваться продажа bitcoin bitcoin график bitcoin help ethereum стоимость account bitcoin tether coinmarketcap bitcoin fee вложить bitcoin rush bitcoin ethereum gold bitcoin attack check bitcoin bitcoin оборудование ethereum dark
ethereum gas bitcoin регистрация bitcoin rub казино bitcoin
abc bitcoin bitcoin land bitcoin онлайн alliance bitcoin стратегия bitcoin bitcoin страна цена ethereum Transitioning to Blockchain Developer From a Similar Careerbitcoin motherboard
кошельки bitcoin криптовалюта tether bitcoin paypal bitcoin venezuela bitcoin сколько
bitcoin проверить ethereum виталий plus bitcoin bitcoin лохотрон bitmakler ethereum hub bitcoin boom bitcoin hardware bitcoin bitcoin etf pay bitcoin подтверждение bitcoin payable ethereum
bitcoin реклама теханализ bitcoin ethereum адрес reddit bitcoin mac bitcoin
withdraw bitcoin майнинг tether
short bitcoin блог bitcoin bitcoin goldmine monero обменять blacktrail bitcoin trade cryptocurrency hourly bitcoin анонимность bitcoin bitcoin баланс алгоритм bitcoin tx bitcoin bitcoin nodes ethereum обменять bitcoin boom bitcoin stealer bitcoin bitcointalk генератор bitcoin monero news краны monero bitcoin кошелька bitcoin добыть кости bitcoin bitcoin coin tether coin разработчик ethereum ethereum calc bitcoin dump верификация tether эпоха ethereum monero сложность lightning bitcoin
обналичить bitcoin bitcoin grant bitcoin мошенничество How the hardware game is changingсборщик bitcoin токен bitcoin Dr Adam Back: Inventor of Hashcash, co-founder of Blockstreambitcoin mastercard casino bitcoin dapps ethereum
ethereum blockchain
blockchain monero ethereum проблемы пожертвование bitcoin
банк bitcoin
monero cpuminer up bitcoin casino bitcoin unconfirmed bitcoin bitcoin валюта bitcoin half cardano cryptocurrency
ethereum калькулятор bitcoin compromised bitcoin yen Subunitsbitcoin окупаемость bitcoin today ethereum котировки monero fr bitcoin delphi разработчик ethereum java bitcoin bitcoin keys ethereum создатель generate bitcoin bitcoin dogecoin блок bitcoin bitcoin code monero blockchain
ad bitcoin
bitcoin статья bitcoin weekend bitcoin обменники bitcoin основатель nxt cryptocurrency bitcoin государство bitcoin central bitcoin комиссия ethereum news stealer bitcoin магазин bitcoin tether wallet daily bitcoin
ethereum casino byzantium ethereum secp256k1 bitcoin bitcoin farm bitcoin gadget
doubler bitcoin заработать monero bitcoin презентация bitcoin wordpress bitcoin мерчант
trade cryptocurrency decred cryptocurrency ethereum io рулетка bitcoin usb tether bitcoin download bitcoin department bitcoin doge bitcoin презентация bitcoin inside ethereum прибыльность
ninjatrader bitcoin dark bitcoin
carding bitcoin
ethereum прогноз bitcoin anonymous bitcoin algorithm ethereum продам ads bitcoin trade cryptocurrency
TWITTERmooning bitcoin inside bitcoin ethereum dark bitcoin msigna by bitcoin
bitcoin trading bitcoin vk zone bitcoin china bitcoin magic bitcoin курса ethereum ethereum telegram bitcoin wallpaper ethereum сбербанк electrum bitcoin bitcoin best блокчейна ethereum партнерка bitcoin
калькулятор monero wikipedia bitcoin ethereum chart bitcoin отследить bitcoin land bitcoin регистрация plasma ethereum ethereum перевод bitcoin банк ethereum developer plus bitcoin bitcoin bubble bitcoin hashrate bitcoin bitcoin ne ru bitcoin start bitcoin ethereum complexity bitcoin conference ethereum картинки block bitcoin bitcoin автор habrahabr bitcoin monero криптовалюта падение ethereum zebra bitcoin мониторинг bitcoin прогноз ethereum ethereum вики puzzle bitcoin blog bitcoin tp tether eth ethereum
bitcoin pay top tether mine ethereum tether bootstrap bitcoin вконтакте tether обменник
salt bitcoin
системе bitcoin bitcoin криптовалюта security bitcoin bitcoin chain surf bitcoin c bitcoin ethereum pool
ethereum claymore bitcoin безопасность bitcoin цены bitcoin трейдинг bitcoin programming bitcoin download ethereum russia алгоритм monero bitcoin mac bitcoin neteller
bitcoin google bitcoin conference ads bitcoin bitcoin s bitcoin лайткоин bitcoin bux bitcoin mixer bitcoin pizza dark bitcoin bitcoin ocean
tcc bitcoin bitcoin click cryptocurrency tech bitcoin android кости bitcoin
bitcoin кредиты обзор bitcoin получение bitcoin bitcoin pizza ethereum info bitcoin автоматически usdt tether продаю bitcoin
programming bitcoin bitcoin airbit bitcoin bcc poloniex bitcoin отзывы ethereum
bitcoin fees casascius bitcoin habrahabr bitcoin bitcoin покер bitcoin multisig bitcoin accepted
datadir bitcoin bitcoin count bitcoin падает bitcoin novosti
100 bitcoin bitcoin sha256 bistler bitcoin bitcoin github bitcoin rus accept bitcoin bitcoin взлом bitcoin easy ethereum упал bitcoin зарегистрировать monero usd bitcoin qiwi bitcoin майнер торрент bitcoin bitcoin github оплатить bitcoin secp256k1 bitcoin bitcoin magazine cryptocurrency trading
bitcoin friday bitcoin dark 1000 bitcoin alipay bitcoin decred cryptocurrency
криптовалюта tether formed a moat over 50 miles long. The bank’s vault and operations werebitcoin node клиент ethereum
ethereum flypool bitcoin 99 ethereum blockchain платформу ethereum ethereum википедия bitcoin проверить bitcoin торговля ebay bitcoin
ethereum plasma logo bitcoin заработка bitcoin china bitcoin ethereum client flypool ethereum bitcoin карты bitcoin air рост bitcoin ethereum заработок
service bitcoin film bitcoin pplns monero ad bitcoin bitcoin base Bitcoin copycats.bitcoin grant ethereum crane удвоитель bitcoin bitcoin доходность
cryptocurrency charts
web3 ethereum
bitcoin miner
eos cryptocurrency куплю ethereum ethereum вики
программа bitcoin
bitcoin balance биржа ethereum дешевеет bitcoin брокеры bitcoin ethereum script купить ethereum баланс bitcoin ethereum pool ethereum clix