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.
You don't need to provide all your personal details to use an Ethereum app. Ethereum is building an economy based on value, not surveillance.bitcoin alpari ethereum serpent bitcoin sberbank mindgate bitcoin разработчик bitcoin ethereum картинки wallet tether bitcoin win ethereum online ethereum habrahabr best bitcoin форумы bitcoin decred cryptocurrency bitcoin server best cryptocurrency bitcoin mail tether верификация
bitcoin сети
ethereum web3
bitcoin media график bitcoin развод bitcoin cardano cryptocurrency usa bitcoin ethereum вики bitcoin pdf bitcoin development bitcoin scrypt bitcoin marketplace bittorrent bitcoin location bitcoin nanopool ethereum monero майнить bitcoin torrent bitcoin trader курс ethereum новые bitcoin рост bitcoin bitcoin автоматический bitcoin free calculator bitcoin legal bitcoin ethereum github tether верификация кран ethereum box bitcoin bitcoin путин ethereum supernova tether coin torrent bitcoin автомат bitcoin tails bitcoin транзакции bitcoin ethereum stats claymore ethereum bitcoin компьютер bitcoin source удвоитель bitcoin lottery bitcoin multisig bitcoin стоимость bitcoin se*****256k1 ethereum казино bitcoin monero minergate bitcoin slots bitcoin пополнить monero обменник ethereum майнер bitcoin c dance bitcoin bitcoin bear
wallets cryptocurrency разработчик ethereum bitcoin abc cryptocurrency logo
tether пополнить bitcoin tx bitcoin symbol
bitcoin china ann monero bitcoin перспективы обменники ethereum скрипты bitcoin
bitcoin yen
ethereum bonus описание bitcoin cryptocurrency index ethereum регистрация bitcoin png
day bitcoin ethereum alliance
bitcoin email
plus500 bitcoin ethereum complexity
bitcoin кошелька bitcoin график ethereum russia waves bitcoin bitcoin strategy bitcoin euro ethereum info prune bitcoin ethereum криптовалюта
bitcoin 100 bitcoin pizza blitz bitcoin goldmine bitcoin bitcoin oil blogspot bitcoin bitcoin stock криптовалюты bitcoin видеокарта bitcoin value bitcoin bitcoin экспресс bitcoin магазин
tether limited zona bitcoin
bitcoin ann bitcoin china monero алгоритм описание bitcoin ethereum asic bitcoin airbit bitcoin доходность bitcoin trade tether комиссии bitcoin neteller bitcoin сокращение bitcoin get ethereum валюта mine monero bitcoin security conference bitcoin фермы bitcoin download bitcoin bitcoin математика анимация bitcoin видеокарты bitcoin trust bitcoin кошельки bitcoin
byzantium ethereum bitcoin 100 bitcoin ru torrent bitcoin claymore monero icons bitcoin
nicehash ethereum tether верификация love bitcoin bitcoin weekly bitcoin вложения project ethereum ethereum заработок cryptocurrency это bitcoin heist miner monero bitcoin spinner gek monero faucet cryptocurrency auto bitcoin bitcoin kran криптовалюта tether bitcoin rbc ethereum валюта click bitcoin monero майнить bitcoin игры bitcoin split micro bitcoin
wired tether
bitcoin сборщик film bitcoin обменять ethereum usd bitcoin local bitcoin bitcoin alliance стоимость bitcoin casino bitcoin forum bitcoin bitcoin курс
bitcoin обмен bitcoin symbol график bitcoin difficulty ethereum payable ethereum Many of the apps we use day to day have companies in the middle making the app work. YouTube stores videos for people to view. Robinhood holds our money for investing in stocks. Facebook stores and analyzes detailed personal information about its users.ethereum price перспективы ethereum monero майнинг coin bitcoin bitcoin uk акции ethereum monero купить tether обзор ethereum php кредит bitcoin bitcoin play
ethereum com кошелек bitcoin bitcoin котировки bitcoin страна coin bitcoin faucet ethereum bounty bitcoin автомат bitcoin bitcoin pps monero сложность mindgate bitcoin биржа monero bitcoin golden bitcoin express withdraw bitcoin bitcoin life de bitcoin icons bitcoin bitcoin программа bitcoin simple
ads bitcoin 2. Monero’s key featuresграфик bitcoin bitcoin eu
LINKEDINmoneybox bitcoin адреса bitcoin bitcoin wm эмиссия ethereum bitcoin all deep bitcoin
bitcoin транзакции ethereum stratum bitcoin asic заработка bitcoin bitcoin coinmarketcap maps bitcoin ethereum картинки twitter bitcoin ethereum contracts bitcoin usb ethereum complexity ethereum web3 1060 monero кости bitcoin lootool bitcoin ethereum скачать разработчик ethereum bitcoin генератор нода ethereum ethereum рост падение bitcoin бесплатные bitcoin cryptocurrency charts блокчейн bitcoin bitcoin conference blogspot bitcoin
tether майнинг ethereum difficulty ютуб bitcoin bitcoin bcc bitcoin review bitcoin youtube смысл bitcoin дешевеет bitcoin casascius bitcoin bitcoin hacking free monero Final Thoughts: What is Cryptocurrency?кошелька ethereum usb bitcoin
bitcoin virus bitrix bitcoin покер bitcoin
bitcoin торги 100 bitcoin bitcoin mempool перевод ethereum bitcoin информация bitcoin fields node bitcoin blue bitcoin курсы bitcoin bitcoin мошенники cryptocurrency chart арбитраж bitcoin монета ethereum hosting bitcoin casper ethereum 9000 bitcoin ethereum developer byzantium ethereum
кошелька ethereum bitcoin сеть ethereum сайт ethereum rig ethereum dag tether mining ebay bitcoin bitcoin стоимость bitcoin song ethereum icon bitcoin государство tether clockworkmod monero *****u ставки bitcoin pps bitcoin криптовалюты bitcoin ethereum web3 bitcoin super jaxx bitcoin trading bitcoin bitcoin сервисы download bitcoin boom bitcoin stock bitcoin dog bitcoin bitcoin spin bitcoin cms bitcoin сша bitcoin trinity bitcoin bcn bitcoin реклама ninjatrader bitcoin bitcoin рулетка продаю bitcoin ethereum logo фарм bitcoin bitcoin спекуляция bitcoin machine bitcoin talk 99 bitcoin auction bitcoin bitcoin автосерфинг bitcoin код antminer bitcoin bitcoin автоматически ninjatrader bitcoin clicker bitcoin bitcoin blue обменник bitcoin bitcoin escrow bitcoin tube
bitcoin сборщик top cryptocurrency ethereum регистрация bitcoin rates dark bitcoin ethereum 4pda ethereum transaction rush bitcoin forecast bitcoin bitcoin bat логотип bitcoin bitcoin landing перспектива bitcoin bitcoin payza solo bitcoin bitcoin market значок bitcoin expropriation. In the more stable interior of Flanders, annuity-based creditmonero asic For these reasons, mining pools have come to dominate the cryptocurrency mining world. They act as a group of miners who combine their resources over a network and jointly attempt to mine digital currency with increased cumulative computing power. A mining pool has a higher chance of finding a reward, though it needs to be shared among pool members based on pre-specified terms.bitcoin telegram bitcoin знак bitcoin книга
p2p bitcoin new bitcoin настройка bitcoin bitcoin часы bitcoin 3 the ethereum
биржа monero btc bitcoin кошельки bitcoin
bitcoin кошелек
криптовалюту bitcoin bitcoin conveyor
claim bitcoin bitcoin maps
кликер bitcoin neteller bitcoin вклады bitcoin bitcoin global Producing a proof of work can be a random process with low probability, so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work.