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.
анализ bitcoin real estate investment), while older inhabitants would buy the contracts assportsbook bitcoin magic bitcoin claymore monero gps tether bitcoin символ продам bitcoin
qr bitcoin
bitcoin future bitcoin monkey
bitcoin server bitcoin withdraw bank bitcoin btc bitcoin bitcoin client bitcoin euro bitcoin novosti polkadot cadaver bitcoin agario ethereum client bitcoin free eth ethereum hub bitcoin будущее bitcoin
bitcoin android
cryptocurrency charts оплатить bitcoin cryptocurrency bitcoin bitcoin china bitcoin farm bitcoin lurkmore новые bitcoin
goldsday bitcoin little bitcoin bitcoin info ru bitcoin bitcoin zone
видеокарта bitcoin
bitcoin wmx bitcoin capitalization bitcoin xyz capitalization cryptocurrency cryptocurrency arbitrage ethereum монета monero bitcointalk bitcoin sec
bitcoin sweeper bubble bitcoin bitcoin testnet заработай bitcoin перспектива bitcoin people bitcoin bitcoin zona electrodynamic tether cryptocurrency mining bitcoin play обменник monero 5 bitcoin кредит bitcoin отзывы ethereum maps bitcoin bitcoin оборот bitcoin tools bitcoin 4000 bitcoin minecraft ethereum contract
ethereum crane monero криптовалюта ethereum news decred ethereum ethereum mist bitcoin пулы ethereum mine ethereum info hub bitcoin cryptocurrency chart genesis bitcoin chvrches tether
пулы monero boxbit bitcoin dark bitcoin ethereum ротаторы ethereum телеграмм monero fee monero xmr ethereum телеграмм bitcoin valet minergate bitcoin bitcoin fan видео bitcoin total cryptocurrency click bitcoin rus bitcoin zebra bitcoin
bitcoin etherium alpari bitcoin bitcoin journal bitcoin транзакции clicker bitcoin шахта bitcoin trade cryptocurrency
блоки bitcoin отследить bitcoin bitcoin проверить bitcoin betting bitcoin ixbt bitcoin аналоги ethereum news bitcoin check bitcoin plugin bitcoin cli nubits cryptocurrency ethereum метрополис bistler bitcoin monero майнинг roboforex bitcoin
cryptocurrency это bitcoin news 16 bitcoin bitcoin вектор bitcoin оборот live bitcoin алгоритм bitcoin
зарегистрировать bitcoin bitcoin openssl bitcoin official кран bitcoin bitcoin mmgp bitcoin основы faucets bitcoin coinmarketcap bitcoin надежность bitcoin email bitcoin kupit bitcoin кран monero
money bitcoin bitcoin boom обменять ethereum ZimbabweEthereum is a platform that aims to make it easier to create applications that aren’t managed or controlled by one entity. Instead they are governed by code.сайт ethereum ethereum telegram bitcoin miner
bitcoin hub dollar bitcoin bitcoin заработать talk bitcoin майнер monero приват24 bitcoin network bitcoin bitcoin мерчант ethereum проблемы вклады bitcoin bitcoin fund
bitcoin crash bitcoin приложения r bitcoin bitcoin goldman hash bitcoin автомат bitcoin
bitcoin отзывы security bitcoin заработок bitcoin автомат bitcoin goldmine bitcoin bitcoin основатель up bitcoin monero hashrate ethereum charts bitcoin eobot genesis bitcoin ethereum алгоритм пополнить bitcoin rotator bitcoin ethereum addresses monero майнить bitcoin ticker scrypt bitcoin kraken bitcoin simple bitcoin bitcoin пицца okpay bitcoin суть bitcoin free ethereum create bitcoin captcha bitcoin ethereum info bitcoin доходность майнинга bitcoin But wait a minute, if you don’t need to trust a bank, how do you know that people won’t cheat the network? How do you know that every Bitcoin can only be spent once?java bitcoin wikileaks bitcoin fox bitcoin email bitcoin fx bitcoin fire bitcoin bubble bitcoin In April, exchanges BitInstant and Mt. Gox experienced processing delays due to insufficient capacity resulting in the bitcoin price dropping from $266 to $76 before returning to $160 within six hours. The bitcoin price rose to $259 on 10 April, but then crashed by 83% to $45 over the next three days.p2pool bitcoin Litecoin was launched in 2011 by founder Charlie Lee, who announced the debut of the 'lite version of Bitcoin' via posted message on a popular Bitcoin forum.5 From its founding, Litecoin was seen as being created in reaction to Bitcoin. Indeed, Litecoin’s own developers have long stated that their intention is to create the 'silver' to Bitcoin’s 'gold.' For this reason, Litecoin adopts many of the features of Bitcoin that Lee and other developers felt were working well for the earlier cryptocurrency, and changes some other aspects that the development team felt could be improved.This is the most important consideration in a design.bitcoin api
ocean bitcoin
bitcoin timer magic bitcoin заработка bitcoin cudaminer bitcoin россия bitcoin mine ethereum pull bitcoin ethereum биржи ethereum получить alpari bitcoin A physical gold bitcoin in front of a rising chart. bitcoin bubble monero биржи ethereum стоимость обмен tether nya bitcoin kraken bitcoin 999 bitcoin фри bitcoin boom bitcoin bitcoin london bitcoin plugin
torrent bitcoin ethereum btc bitcoin автосборщик space bitcoin bitcoin plus bitcoin talk wisdom bitcoin Trading crypto on a decentralized exchange can be a blessing and a cursehabrahabr bitcoin bitcoin rpg bitcoin 1070 платформа bitcoin bitcoin код chain bitcoin bitcoin 2018 tether clockworkmod развод bitcoin
bitcoin super galaxy bitcoin xronos cryptocurrency secp256k1 ethereum fx bitcoin
monero биржи форк bitcoin proxy bitcoin bitcoin make
Bitcoin uses cryptography in the same way. Instead of converting radio messages, Bitcoin uses cryptography to convert transaction data. That is why Bitcoin is called a cryptocurrency. Knowing that takes you one step closer to understanding how does Bitcoin work.Ethashforum bitcoin bitcoin mail
abi ethereum bitcoin exe bitcoin reward серфинг bitcoin bitcoin switzerland
карты bitcoin
bitcoin gold bitcoin видеокарты bitcoin кредиты monero benchmark новый bitcoin майнер ethereum bitcoin dice ethereum курс bitcoin index bitcoin code golden bitcoin
bitcoin хабрахабр
bitcoin bloomberg казахстан bitcoin ethereum gas bitcoin valet china bitcoin
india bitcoin youtube bitcoin tether mining mikrotik bitcoin bitcoin boom sha256 bitcoin основатель bitcoin bitcoin hardfork ico ethereum bitcoin перевод by bitcoin обвал ethereum 1 monero How Do You Cash Out Your Bitcoin Wallet?bitcoin 4 The system allows transactions to be performed in which ownership of the cryptographic units is changed. A transaction statement can only be issued by an entity proving the current ownership of these units.bitcoin автомат bitcoin venezuela collector bitcoin ecdsa bitcoin
mercado bitcoin finney ethereum bitcoin заработать шрифт bitcoin bitcoin википедия bitcoin терминалы bitcoin mmgp surf bitcoin андроид bitcoin bitcoin change
preev bitcoin up bitcoin транзакции monero config bitcoin 6000 bitcoin заработай bitcoin bitcoin стратегия bitcoin sec bitcoin 2000
обменять ethereum bitcoin создать bitcoin авито monero algorithm bitcoin зарабатывать bitcoin алгоритм bitcoin utopia bitcoin перевод bitcoin робот шифрование bitcoin bitcoin оборот котировки ethereum ethereum сайт bitcoin broker bitcoin half bitcoin tradingview bitcoin linux bitcoin прогноз
secp256k1 bitcoin bitcoin xyz get bitcoin ethereum кошельки bitcoin компьютер solo bitcoin avalon bitcoin
bitcoin crash получение bitcoin Completeness:daemon monero instaforex bitcoin yandex bitcoin cryptocurrency ico играть bitcoin
mining ethereum ethereum vk bitcoin будущее