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 wm нода ethereum bitcoin dat hit bitcoin r bitcoin Users who run and store the full transaction history of the network on their computer will see it occupy about 200GB. Running a copy of the Bitcoin software and storing the whole blockchain is known as running a full node. As we’ll see, full node operators are very important to the Bitcoin network, even though they are not 'mining' blocks.coffee bitcoin криптовалюту bitcoin bitcoin заработок bitcoinwisdom ethereum bitcoin zona банкомат bitcoin
bot bitcoin
bitcoin zona torrent bitcoin обновление ethereum ethereum кошелек equihash bitcoin dag ethereum bitcoin gif cryptocurrency cubits bitcoin mine ethereum кошелька ethereum майнить bitcoin bitcoin pattern
краны monero ethereum mine coindesk bitcoin bitcoin spend bitcoin футболка bitcoin get credit bitcoin
daemon bitcoin
bitcoin account ethereum клиент testnet bitcoin bitcoin обналичить ethereum chaindata bitcoin advcash ethereum myetherwallet ethereum os bitcoin mixer usb bitcoin прогноз bitcoin майнер bitcoin nicehash monero wired tether forecast bitcoin bitcoin cryptocurrency
bitcoin fpga bitcoin 0 ethereum com bitcoin maps bitcoin баланс bitcointalk ethereum mixer bitcoin hack bitcoin bitcoin подтверждение bitcoin grant monero rur bitcoin usa bitcoin datadir Exodus: Best for Beginnersкотировки bitcoin
miningpoolhub monero captcha bitcoin bitcoin терминалы bitcoin javascript ethereum miners usa bitcoin bitcoin compromised crococoin bitcoin
криптовалюты bitcoin калькулятор monero
testnet bitcoin bitcoin calc bitcoin адреса bitcoin de bitcoin миксер bitcoin services
карты bitcoin download bitcoin bitcoin анализ ethereum com bitcoin форки
ethereum перспективы bitcoin conf bitcoin обменник bitcoin расчет txid ethereum rush bitcoin bitcoin nedir
ethereum хардфорк технология bitcoin bitcoin биткоин запросы bitcoin second bitcoin аналитика ethereum bitcoin доллар ad bitcoin торговать bitcoin
trust bitcoin linux ethereum bitcoin зарегистрироваться bitcoin fpga bitcoin сети ethereum habrahabr bitcoin сложность bitcoin daemon bitcoin kran яндекс bitcoin bitcoin заработок home bitcoin reverse tether bitcoin script прогнозы bitcoin bitcoin xl flappy bitcoin bitcoin people bitcoin форк сбербанк bitcoin bitcoin счет bitcoin dice
рынок bitcoin monero продать bitcoin calculator bitcoin стоимость ethereum получить
As it turns out, people love open allocation. In 2005, MIT Sloan and Boston Consulting Group did a study about the motivations of open source software engineers. The study reports:ico bitcoin bitcoin расшифровка bitcoin marketplace free ethereum bitcoin me make bitcoin майнить bitcoin bitcoin freebitcoin
яндекс bitcoin fast bitcoin bitcoin монеты bitcoin rt bitcoin телефон bitcoin classic bitcoin картинка capitalization cryptocurrency reklama bitcoin bitcoin check tokens ethereum gek monero 99 bitcoin пример bitcoin робот bitcoin Easy to use. It’s just like any other software or a wallet that you use for your day-to-day transactions.frontier ethereum monero ico обсуждение bitcoin equihash bitcoin habrahabr bitcoin x2 bitcoin mine monero bitcoin бонусы monero cpuminer
monero algorithm
ethereum курсы tether download bitcoin ecdsa boom bitcoin платформ ethereum bitcoin таблица ethereum пулы bitcoin карта bitcoin torrent monero blockchain bitmakler ethereum bitcoin 2048 ethereum wallet проекта ethereum
zebra bitcoin bitcoin weekly bitcoin hyip bitcoin dice
monero simplewallet криптовалют ethereum github ethereum 8 bitcoin bitcoin ads
обменники bitcoin tether download
рубли bitcoin bitcoin вебмани bitcoin selling circle bitcoin bitcoin краны Imagine that you contribute 5% to the total hardware power of the mining pool you are in… this means that you will also receive 5% of the total rewards earned by the Monero mining pool.Can be managed from mobile deviceethereum claymore сбербанк bitcoin puzzle bitcoin сбербанк bitcoin raiden ethereum bitcoin center bitcoin книга bitcoin generation торговать bitcoin
bitcoin online bitcoin qiwi
stock bitcoin monero rub cryptocurrency news tether пополнить usa bitcoin bitcoin knots
bitcoin knots bitcoin 1000 The gist of these new kinds of relationships is that the cost of trust (heretofore provided by notaries, lawyers, banks, regulatory compliance officers, governments, etc…) is avoided by the architecture and qualities of distributed ledgers.The current intent at Ethereum is to use a mining algorithm where miners are required to fetch random data from the state, compute some randomly selected transactions from the last N blocks in the blockchain, and return the hash of the result. This has two important benefits. First, Ethereum contracts can include any kind of computation, so an Ethereum ASIC would essentially be an ASIC for general computation - ie. a better CPU. Second, mining requires access to the entire blockchain, forcing miners to store the entire blockchain and at least be capable of verifying every transaction. This removes the need for centralized mining pools; although mining pools can still serve the legitimate role of evening out the randomness of reward distribution, this function can be served equally well by peer-to-peer pools with no central control.bitcoin обозначение cryptocurrency calculator collector bitcoin ethereum casino bitcoin ann брокеры bitcoin bitcoin проблемы cryptocurrency wallet bitcoin поиск cap bitcoin bitcoin doge proxy bitcoin qiwi bitcoin
play bitcoin bitcoin отзывы
рулетка bitcoin bitcoin future app bitcoin telegram bitcoin bitcoin explorer bitcoin china bitcoin 2048 программа tether bitcoin timer bitcoin cny bitcoin сколько cubits bitcoin bitcoin миллионеры курса ethereum monero faucet monero pools bitcoin calc
bitcoin sberbank bitcoin fan rocket bitcoin bitcoin asic bitcoin icon bitcoin boxbit ethereum котировки ethereum кран etoro bitcoin monero криптовалюта win bitcoin monero rur daemon monero bitcoin биткоин monero client
bitcoin котировка ethereum investing topfan bitcoin
bitcoin check antminer bitcoin ethereum dark bitcoin like
ethereum btc отследить bitcoin bitcoin free total cryptocurrency geth ethereum баланс bitcoin currency bitcoin group bitcoin bitcoin cards
auction bitcoin email bitcoin развод bitcoin nem cryptocurrency
super bitcoin криптовалюту bitcoin bitcoin кошелька bitcoin безопасность bitcoin получить fire bitcoin
ethereum упал bitcoin автомат bitcoin paw magic bitcoin bitcoin scanner roulette bitcoin bitcoin map ethereum wallet автокран bitcoin ютуб bitcoin fx bitcoin monero difficulty bitcoin multiplier bitcoin мошенники flash bitcoin bitcoin magazin mikrotik bitcoin ethereum метрополис course bitcoin bitcoin forex добыча bitcoin bitcoin zone сайт ethereum bitcoin yen bitcoin работать технология bitcoin bitcoin block wallets cryptocurrency
bitcoin сборщик bitcoin даром 99 bitcoin bitcoin приложение monero курс all cryptocurrency торрент bitcoin криптовалюты bitcoin аналоги bitcoin bitcoin проект bitcoin spinner заработка bitcoin платформ ethereum bitcoin strategy
bitcoin халява ethereum виталий masternode bitcoin balance bitcoin заработать ethereum ubuntu ethereum ethereum курсы cryptocurrency mining monero пулы weather bitcoin tx bitcoin bitcoin blocks r bitcoin bitcoin приложения
checker bitcoin bitcoin bitrix bitcoin покупка ico bitcoin ethereum метрополис bitcoin монета bitcoin create
bitcoin 10 go ethereum bitcoin trezor tor bitcoin bitcoin rt
bitcoin pools
игра ethereum foto bitcoin получение bitcoin bitcoin список bubble bitcoin 8 bitcoin добыча bitcoin перевести bitcoin bitcoin datadir mmm bitcoin майнеры bitcoin bitcoin банк вирус bitcoin
bitcoin protocol bitcoin forum
вложения bitcoin blitz bitcoin терминалы bitcoin asrock bitcoin monero logo flash bitcoin ethereum siacoin форк bitcoin hack bitcoin sgminer monero tether пополнение добыча bitcoin асик ethereum epay bitcoin сервисы bitcoin bitcoin mac ethereum stats bitcoin js new cryptocurrency bitcoin суть зарабатывать bitcoin json bitcoin ethereum info bitcoin блок bitcoin форекс bitcoin token game bitcoin bitfenix bitcoin bitcoin 20 avatrade bitcoin ethereum faucet bitcoin instagram free bitcoin bitcoin convert android tether
ethereum contracts ethereum mist
prune bitcoin ethereum сайт
скачать bitcoin bitcoin майнер app bitcoin dice bitcoin автомат bitcoin x2 bitcoin polkadot cadaver supernova ethereum The thinking goes like this: When compensated, full node operators can be trusted to act honestly, in order to collect the staking reward and increase the value of their coins; similarly, miners are incentivized to honestly produce blocks in order that their blocks are validated (not rejected) by stakers’ full nodes. In this way, networks with Proof-of-Work for base-layer machine consensus, and Proof-of-Stake for coinbase reward distribution and human consensus, can be said to be hybrid networks.simple bitcoin blender bitcoin site bitcoin