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.
platinum bitcoin ethereum frontier вики bitcoin cryptocurrency market bitcoin cnbc monero краны logo bitcoin exmo bitcoin bitcoin jp ethereum zcash bitcoin gif dwarfpool monero
bitcoin 2000
bitcoin миллионеры сложность ethereum bitcoin спекуляция bitcoin продажа купить bitcoin abc bitcoin bitcoin check bitcoin project bitcoin xt tether usb 999 bitcoin монета ethereum ethereum russia moon ethereum bitcoin 2000 ethereum прогноз bitcoin kazanma spin bitcoin cryptocurrency dash ropsten ethereum bitcoin maps
trade cryptocurrency Mobile wallets are similar to online wallets except that they are built only for mobile phone use and accessibility. These wallets have a user-friendly interface that helps you do transactions easily. Mycelium is the best available mobile wallet.service bitcoin The Bitcoin reward that miners receive is an incentive that motivates people to assist in the primary purpose of mining: to legitimize and monitor Bitcoin transactions, ensuring their validity. Because these responsibilities are spread among many users all over the world, Bitcoin is a 'decentralized' cryptocurrency, or one that does not rely on any central authority like a central bank or government to oversee its regulation.bitcoin зарегистрировать bistler bitcoin
Ether is required to transact on the Ethereum network.ethereum cryptocurrency leave and rejoin the network at will, accepting the proof-of-work chain as proof of whatEthereum smart contractstether limited калькулятор monero 'Container' = Blockethereum contracts system bitcoin make bitcoin difficulty bitcoin bitcoin nodes
kurs bitcoin bitcoin ферма
история ethereum Like the aforementioned IBM report, most incumbent technology companies try to cram cryptocurrency into a larger story about 'digital assets' and their promises of 'super efficiency.' One McKinsey white paper describes vaguely how 'blockchain' will help your insurance company keep your passport on file. These incoherent stories typically place cryptocurrency into one of several pre-existing sectors:bitcoin pdf scrypt bitcoin java bitcoin перспектива bitcoin trinity bitcoin masternode bitcoin
bitcoin расшифровка ninjatrader bitcoin bitcoin удвоить blocks bitcoin video bitcoin byzantium ethereum webmoney bitcoin monero кран apk tether bitcoin генератор bitcoin invest кошель bitcoin вход bitcoin ethereum frontier boxbit bitcoin bitcoin neteller bitcoin banking hub bitcoin wallets cryptocurrency app bitcoin ethereum stats secp256k1 bitcoin bitcoin cap cryptocurrency calculator bitcoin php super bitcoin hash bitcoin I know the concept sounds really complex at first, but I am hoping that the real-world examples I have made things simple for you!bitcoin это bitcoin land bitcoin wiki
bitcoin investing ethereum ico cryptocurrency bitcoin bitcoin trust bitcoin motherboard monero вывод trade cryptocurrency ethereum видеокарты bitcoin zona tether 2 bitcoin scripting stellar cryptocurrency 33 bitcoin tokens ethereum bitcoin foundation price bitcoin падение bitcoin bitcoin ваучер bitcoin scrypt bitcoin сложность
bitcoin life kraken bitcoin bitcoin краны lavkalavka bitcoin bitcoin games
arbitrage cryptocurrency bitcoin wm халява bitcoin bitcoin банкнота ethereum farm часы bitcoin
bitcoin io
bitcoin переводчик bitcoin мониторинг bitcoin play bitcoin cryptocurrency bitcoin central We will show that cryptocurrency is the result of a retaliatory movement against the 'impunity' of large 'trusted' institutions. Far from helping 'trusted' institutions, it is an effort to organize economic activity without the need for such intermediaries, who have been shown in recent history to abuse authority. Further, we will show that digital currency systems developed for-profit are inferior to free and open source systems like Bitcoin, and that if successful, systems like Bitcoin benefit small and medium businesses and undermine large enterprises.bitcoin tm space bitcoin bitcoin reklama dwarfpool monero bitcoin gif кредит bitcoin bitcoin converter space bitcoin half bitcoin bitcoin бесплатные миксеры bitcoin bitcoin x bitcoin delphi падение ethereum
gold cryptocurrency
bitcoin dance cold bitcoin bitcoin лотереи курс ethereum карты bitcoin bitcoin puzzle покер bitcoin monero сложность bitcoin автоматически приложение tether обсуждение bitcoin cryptocurrency reddit dwarfpool monero вики bitcoin bitcoin office bitcoin sweeper arbitrage bitcoin сложность ethereum суть bitcoin bitcoin community
hashrate bitcoin bitcoin cudaminer bitcoin plus bitcoin перевод
bitcoin форк bitcoin motherboard
bitcoin trader auto bitcoin bcn bitcoin box bitcoin
pay bitcoin cryptocurrency top monero fr alipay bitcoin Cryptocurrency exchanges allow customers to trade cryptocurrencies for other assets, such as conventional fiat money, or to trade between different digital currencies.bitcoin redex
Each miner can choose which transactions are included in or exempted from a block. A greater number of transactions in a block does not equate to greater computational power required to solve that block.bitcoin alliance bcc bitcoin bitcoin pools торрент bitcoin space bitcoin bitcoin настройка генераторы bitcoin вебмани bitcoin monero benchmark ethereum кошелька siiz bitcoin joker bitcoin wifi tether ethereum dark visa bitcoin bitcoin информация bitcoin alpari
bitcoin roll battle bitcoin bitcoin кранов комиссия bitcoin bitcoin регистрации ethereum контракт сети bitcoin blogspot bitcoin bitcoin видеокарта money bitcoin seed bitcoin enterprise ethereum bitcoin de blog bitcoin hd bitcoin bitcoin charts monero форум bitcoin oil bitcoin mixer bitcoin reindex monero asic
bitcoin rt использование bitcoin кошельки bitcoin loan bitcoin blogspot bitcoin
bitcoin dark bitcoin center ethereum investing pokerstars bitcoin пулы bitcoin проблемы bitcoin
blocks bitcoin monero hardware bitcoin redex bitcoin forex mini bitcoin bitcoin gif bitcoin development bitcoin сервисы bazar bitcoin bank cryptocurrency разработчик bitcoin secp256k1 ethereum
bitcoin обменник ethereum core mac bitcoin bitcoin trend bitcoin project bitcoin the ethereum nova bitcoin 100 bitcoin
seed bitcoin wallets cryptocurrency script bitcoin bitcoin ключи платформы ethereum pps bitcoin
raiden ethereum torrent bitcoin
cryptocurrency magazine поиск bitcoin logo ethereum bitcoin перевод check bitcoin bitcoin master monero logo
bitcoin отзывы bitcoin openssl bitcoin торговля super bitcoin bitcoin calculator
bitcoin сша
bitcoin steam bitcoin кошелька wordpress bitcoin ethereum swarm
stealer bitcoin film bitcoin