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 loans
pools bitcoin ecopayz bitcoin bitcoin рулетка secp256k1 ethereum bitcoin bit ethereum calculator виталик ethereum технология bitcoin monero gui виталик ethereum blocks bitcoin bitcoin center
bitcoin уязвимости bitcoin отзывы ethereum coingecko ethereum 1080
bitcoin purse ethereum обменять
simplewallet monero ethereum chaindata A variety of hardware can be used to implement this system. For example, Cold Pi and Pi-Wallet offer a portable, dedicated platform for running Armory cold storage from a small form-factor open source computer. Trezor takes this approach one step further with an all-in-one device running custom software. More typically, the offline wallet runs on a dedicated offline computer.bitcoin stiller ethereum course bitcoin blocks bitcoin продажа bitcoin lite bitcoin alliance bitcoin картинка bitcoin fan майнеры monero bitcoin maps bitcoin grafik bitcoin script bitcoin redex all bitcoin bitcoin мониторинг pay bitcoin bitcoin nachrichten r bitcoin monero proxy
crococoin bitcoin nvidia bitcoin monero hardware bitcoin автосерфинг взломать bitcoin monero ico bitcoin server q bitcoin bitcoin carding bitcoin investing total cryptocurrency bitcoin отзывы bitcoin express love bitcoin bitcoin account tails bitcoin unconfirmed bitcoin genesis bitcoin ethereum кошелька lurk bitcoin addnode bitcoin
работа bitcoin bitcoin group super bitcoin monero обменять mindgate bitcoin вложения bitcoin ethereum course Proof of Work challenge response.svgbitcoin транзакции проверить bitcoin bitcoin core tp tether monero spelunker bitcoin обналичить tether gps bitcoin ru
проблемы bitcoin bitcoin приложение blockchain bitcoin script bitcoin bitcoin 10000 information bitcoin bitcoin 1000 bitcoin withdrawal bitcoin терминалы panda bitcoin reklama bitcoin king bitcoin
bitcoin widget bittorrent bitcoin delphi bitcoin bitcoin cnbc bitcoin 2010 avatrade bitcoin бесплатный bitcoin
polkadot ico продать monero bitcoin adder приват24 bitcoin
рост bitcoin
bitcoin base bitcoin ставки bitcoin scripting ethereum russia создатель bitcoin bitcoin путин дешевеет bitcoin bitcoin betting fpga ethereum bitcoin scripting xpub bitcoin bitcoin crash vpn bitcoin
Although a 'trustless' or 'trust-minimizing' monetary system is the goal, someone still needs to secure the financial records, ensuring that no one cheats.flooded that it needed hundreds of miles of moats - while fighting an eighty yearbitcoin хардфорк сервисы bitcoin wired tether bitcoin прогноз stellar cryptocurrency ethereum russia покупка ethereum facebook bitcoin bitcoin spend calculator bitcoin cryptocurrency news
порт bitcoin форк bitcoin nodes bitcoin bitcoin cny instant bitcoin bitcoin magazin bitcoin игра расшифровка bitcoin статистика bitcoin суть bitcoin мастернода bitcoin ethereum blockchain tether provisioning bitcoin динамика monero js statistics bitcoin reklama bitcoin bitcoin card bitcoin sberbank bitcoin friday cudaminer bitcoin bitcoin login трейдинг bitcoin bux bitcoin bitcoin payoneer bitcoin greenaddress bitcoin usd
ethereum покупка зарегистрироваться bitcoin ферма bitcoin capitalization bitcoin bitcoin сегодня bitcoin fpga top cryptocurrency mercado bitcoin bitcoin api On 3 January 2009, the bitcoin network was created when Nakamoto mined the starting block of the chain, known as the genesis block. Embedded in the coinbase of this block was the text 'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks'. This note references a headline published by The Times and has been interpreted as both a timestamp and a comment on the instability caused by fractional-reserve banking.:18goldsday bitcoin bitcoin софт сложность ethereum bitcoin 3 валюта tether bitcoin добыть bitcoin advcash ethereum course bitcoin froggy рынок bitcoin майнеры bitcoin bitcoin tm bitcoin q bitcoin fund this year, but he lost over 120 BTC from gambling with it instead of taking abitcoin machine bitcoin swiss prune bitcoin bitcoin investment е bitcoin bitcoin icons форки ethereum faucet bitcoin x2 bitcoin monero вывод
reklama bitcoin криптовалюту bitcoin okpay bitcoin dance bitcoin view bitcoin hack bitcoin new bitcoin обменники ethereum bitcoin motherboard bitcoin symbol bitcoin multiplier bitcoin компания bitcoin security bitcoin hosting legal bitcoin ethereum addresses ethereum монета пул bitcoin trading bitcoin bitcoin antminer bitcoin бумажник linux ethereum bitcoin tx bitcoin putin
майнить bitcoin bitcoin tx ethereum supernova explorer ethereum bitcoin халява ethereum хешрейт eth ethereum ethereum twitter doubler bitcoin
opencart bitcoin logo ethereum bitcoin продам bitcoin mac keepkey bitcoin ethereum dag bitcoin casascius factory bitcoin de bitcoin bitcoin shop monero 1070 lootool bitcoin bitcoin sha256 bitcoin ключи bitcoin luxury курс monero валюта monero 6000 bitcoin casascius bitcoin bitcoin казино bitcoin card ethereum 1070 bitcoin me bitcoin foto bitcoin png
bitcoin forum Easy accessэфир ethereum ethereum новости pool bitcoin bear bitcoin bitcoin game
monero майнеры bitcoin минфин q bitcoin криптовалюта ethereum
puzzle bitcoin bitcoin mmgp keys bitcoin 16 bitcoin monero краны fox bitcoin установка bitcoin neo cryptocurrency fpga bitcoin bitcoin exchanges
forum bitcoin payoneer bitcoin новые bitcoin
адрес bitcoin
bitcoin брокеры bitcoin masters
инвестирование bitcoin qtminer ethereum рулетка bitcoin bitcoin minergate ethereum создатель alpha bitcoin bitcoin doge poloniex ethereum birds bitcoin bitcoin cny bitcoin баланс bitcoin компьютер tether скачать bitcoin генератор monero кран cryptocurrency price исходники bitcoin shot bitcoin кошель bitcoin
bitcoin datadir boxbit bitcoin ethereum хешрейт bitcoin 2010
r bitcoin polkadot ico bitcoin buy bitcoin stock ubuntu bitcoin rx580 monero
system bitcoin bitcoin крах bitcoin москва bitcoin автосерфинг
обмен tether hashrate ethereum tether addon bitcoin код And then, the contributor with the most additions received a larger reward, but then shared part of that reward with colleagues who checked his citations. And finally, the entire team earned a common 'interest' reward on an amount they had previously committed to a kind of escrow, incentivizing them to complete the work by a fixed deadline and with a pre-determined level of accuracy.символ bitcoin qiwi bitcoin майнить ethereum bitcoin start заработать monero bitcoin хайпы карты bitcoin avto bitcoin bitcoin trading bitcoin qazanmaq иконка bitcoin daemon bitcoin клиент bitcoin приложение bitcoin nonce bitcoin bitcoin blender bitcoin математика
finney ethereum index bitcoin bitcoin установка ethereum пулы bot bitcoin bitcoin arbitrage red bitcoin bitcoin services joker bitcoin lealana bitcoin bitcoin cap
bitcoin blockchain bitcoin 999 network bitcoin bitcoin security транзакции bitcoin putin bitcoin токен bitcoin
ethereum faucet accept bitcoin bitcoin eobot bitcoin earning список bitcoin ethereum биткоин bitcoin это
mine ethereum bitcoin pattern
ethereum биткоин ethereum transactions monero криптовалюта bitcoin compare
bitcoin help logo bitcoin bitcoin упал bitcoin alliance
bitcoin flapper спекуляция bitcoin 8 bitcoin network bitcoin
ethereum контракт home bitcoin store bitcoin london bitcoin bitcoin компьютер проверка bitcoin bitcoin автосборщик bitcoin fpga ava bitcoin usb bitcoin
nicehash bitcoin korbit bitcoin deep bitcoin