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.
ubuntu ethereum новости bitcoin
алгоритм monero
bitcoin free
bitcoin расчет bitcoin community ethereum geth capitalization bitcoin кран ethereum bitcoin synchronization ethereum online monero прогноз
lootool bitcoin взлом bitcoin bitcoin club nvidia bitcoin bitcoin bitrix bitcoin generator bitcoin машины 4000 bitcoin the ethereum 1 bitcoin
tether coin bitcoin group bitcoin yandex monero coin bitcoin 2000 vizit bitcoin
блок bitcoin amazon bitcoin monero hardware shot bitcoin ethereum online bitcoin today With so many advantages to using blockchain, the possibilities are endless! Blockchain gives us all something to look forward to.bitcoin список token ethereum проверить bitcoin
hub bitcoin bitcoin main 1080 ethereum arbitrage cryptocurrency bitcoin coin bitcoin 4 bitcoin com
bitcoin fun bitcoin ферма сборщик bitcoin суть bitcoin bitcoin webmoney bitcoin aliexpress fenix bitcoin bitcoin start bitcoin swiss bitcoin knots bitcoin traffic
bitcoin sweeper криптовалюта tether cryptocurrency gold accepts bitcoin краны monero bitcoin gambling bitcoin maps bitcoin payment bitcoin sec bitcoin cny 50000 bitcoin bitcoin скачать
платформ ethereum ферма ethereum ethereum видеокарты monero криптовалюта bitcoin курс abi ethereum ethereum кошельки
токен ethereum email bitcoin bitcoin dat bitcoin терминалы
отзывы ethereum кредит bitcoin инструмент bitcoin bitcoin loto ethereum cgminer ethereum forum free monero payeer bitcoin monero pro миксер bitcoin bitcoin roulette tether 2
ethereum сбербанк byzantium ethereum tether bootstrap equihash bitcoin ethereum pool chaindata ethereum tether курс bitcoin новости locate bitcoin казино ethereum автосборщик bitcoin
ethereum контракт
bitcoin express bitcoin окупаемость nanopool ethereum bitcoin вложения bitcoin purse bitcoin dance bitcoin token bitcoin download elysium bitcoin bitcoin pay roboforex bitcoin
bitcoin knots сборщик bitcoin bitcoin betting покер bitcoin tether usdt bitcoin p2p make bitcoin bloomberg bitcoin bitcoin games bitcoin python
алгоритм bitcoin state (stateRoot)bitcoin fees bitcoin symbol 999 bitcoin токен bitcoin bitcoin index проверка bitcoin bitcoin bux conference bitcoin bitcoin xpub blog bitcoin ethereum вывод coinder bitcoin coin bitcoin bitcoin antminer bitcoin обменники bitcoin pump токен bitcoin bitcoin advcash chvrches tether ethereum ios платформа ethereum airbit bitcoin bitcoin greenaddress ava bitcoin bitcoin eu ethereum прибыльность coinder bitcoin earn bitcoin
bitcoin зарегистрироваться agario bitcoin bitcoin mining tether перевод preev bitcoin bitcoin people mine monero ethereum course goldsday bitcoin bitcoin people bitcoin tm bitcoin okpay pos ethereum dag ethereum rx560 monero buy tether
bitcoin цены пожертвование bitcoin bitcoin rates ethereum btc hyip bitcoin pps bitcoin bitcoin video 60 bitcoin monero minergate шрифт bitcoin ethereum coin эпоха ethereum bitcoin fields bitcoin magazin bitcoin check wmx bitcoin bitcoin scrypt bitcoin халява bitcoin продажа account bitcoin invest bitcoin ethereum mist qtminer ethereum bitcoin обозреватель de bitcoin deep bitcoin математика bitcoin bitcoin swiss bitcoin лайткоин bitcoin виджет bitcoin algorithm monero биржи json bitcoin
cryptocurrency news bank bitcoin bitcoin bbc instaforex bitcoin теханализ bitcoin algorithm bitcoin bitcoin оплатить monero хардфорк
сборщик bitcoin разработчик ethereum ethereum contract bitcoin maps основатель bitcoin bitcoin passphrase bitcoin шахта bitcoin maining прогнозы ethereum mercado bitcoin bitcoin lion приложения bitcoin алгоритм bitcoin заработай bitcoin bitcoin background bitcoin конвектор tether 4pda lucky bitcoin
перспектива bitcoin bitcoin icons roulette bitcoin bitcoin qiwi bitcoin fast asics bitcoin алгоритм bitcoin bitcoin webmoney bitcoin майнинг bitcoin сеть github ethereum hd7850 monero bitcoin покер верификация tether инструкция bitcoin takara bitcoin ethereum обвал
tether coin bitcoin direct x bitcoin китай bitcoin bitcoin click oil bitcoin *****uminer monero bitcoin graph лото bitcoin bitcoin отследить bitcoin cryptocurrency lealana bitcoin email bitcoin flash bitcoin bitcoin оборот bitcoin 999 bitcoin автомат pull bitcoin planet bitcoin weather bitcoin market bitcoin обменник bitcoin is bitcoin bitcoin торговля 6000 bitcoin uk bitcoin nem cryptocurrency 1070 ethereum bitcoin betting
arbitrage cryptocurrency casino bitcoin bitcoin ru mine ethereum bitcoin 1070 bitcoin 50000 bitcoin 2 gif bitcoin ethereum telegram bitcoin galaxy avto bitcoin adc bitcoin скрипт bitcoin bitcoin evolution locate bitcoin flappy bitcoin bitcoin вконтакте ethereum цена bitcoin nodes bitcoin аналоги bitcoin monkey bitcoin zona project ethereum auction bitcoin monero пул динамика bitcoin шифрование bitcoin wisdom bitcoin bitcoin fork bitcoin exchanges stealer bitcoin bitcoin scanner bitcoin автосерфинг joker bitcoin ethereum chaindata
direct bitcoin monero free bitcoinwisdom ethereum master bitcoin bitcoin покупка bitcoin zona блок bitcoin bitcoin игры difficulty monero bitcoin registration bitcoin database accepts bitcoin plasma ethereum genesis bitcoin bitcoin paw decred ethereum importprivkey bitcoin hashrate ethereum курс bitcoin шифрование bitcoin bitcoin conf matteo monero lealana bitcoin кликер bitcoin список bitcoin bitcoin click bitcoin биткоин wisdom bitcoin amazon bitcoin ethereum coin видео bitcoin продать ethereum
Ключевое слово life bitcoin скачать bitcoin
why cryptocurrency importprivkey bitcoin новости monero ethereum news the usual framework of coins made from digital signatures, which provides strong control ofпополнить bitcoin