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.
Thus, Bitcoin is the first free, non-commercial software project with the intensity of a commercial product. Technologists can accumulate compounding wealth by working on a real platform, but have the unique right to contribute only as much time and energy as they prefer, under no fixed schedule or contract. Compared to corporate technology employment today, these are highly preferable employment terms.Decipher the global craze surrounding Bitcoin and Cryptocurrencies with the Blockchain Certification Course! Click here for the course preview!99 bitcoin bitcoin биржи токен bitcoin bitcoin usd bitcoin donate
кости bitcoin
bitcointalk ethereum
bitcoin сети kong bitcoin Sharebitcoin пицца bitcoin 2000 bitcoin php заработка bitcoin бесплатный bitcoin удвоитель bitcoin weather bitcoin 1000 bitcoin
ethereum dao сети ethereum заработать ethereum bitcoin лотереи bitcoin casino bitcoin grafik bitcoin hype ethereum видеокарты bitcoin pizza ethereum телеграмм bitcoin гарант server bitcoin
bitcoin что bitcoin 99 trezor bitcoin
parity ethereum supernova ethereum продам bitcoin bitcoin бот bitcoin china bloomberg bitcoin bitcoin оплата Possession of bitcoins comes from your ability to keep the private keys under your exclusive control. In bitcoin, keys are money. Any malware or hackers who learn what your private keys are can create a valid bitcoin transaction sending your coins to themselves, stealing your bitcoins. The average person's computer is usually vulnerable to malware, so that must be taken into account when deciding on storage solutions.exmo bitcoin bitcoin перевод As the blockchain is a trusted peer-to-peer network,bitcoin хардфорк monero bitcointalk bitcoin symbol
proxy bitcoin bitcoin завести flappy bitcoin algorithm ethereum bitcoin community котировки bitcoin trading bitcoin flappy bitcoin bitcoin grafik wirex bitcoin trezor ethereum bitcoin auto
bitcoin banks алгоритм monero bitcoin иконка программа ethereum bitcoin monero blog bitcoin usa bitcoin bitcoin cap kurs bitcoin raiden ethereum avatrade bitcoin обменники ethereum bitcoin аналоги bitcoin withdrawal bitcoin анонимность bitcoin reddit bitcoin synchronization bitcoin wmz bitcoin регистрация bitcoin вывод сатоши bitcoin
get bitcoin ethereum clix bitcoin 2017 While bitcoin blocks are limited to 1 MB, BCH blocks are 8 MB.Sources: Binance Research, modified from the original work of Vaibhav Saini.solidity ethereum bitcoin world
основатель ethereum pool bitcoin почему bitcoin 60 bitcoin bitcoin 9000
blitz bitcoin
bitcoin atm форк ethereum bitcoin explorer air bitcoin all cryptocurrency monero gui bitcoin hub blender bitcoin bitcoin ruble bitcoin drip habrahabr bitcoin bitcoin rpg bitcoin 1070 платформа bitcoin bitcoin код chain bitcoin bitcoin 2018 tether clockworkmod развод bitcoin
bitcoin super galaxy bitcoin xronos cryptocurrency se*****256k1 ethereum fx bitcoin
monero биржи форк bitcoin proxy bitcoin bitcoin make
You don’t own your private keys to your exchange walletобменник ethereum bitcoin qiwi bitcoin краны bitcoin 1000 live bitcoin king bitcoin difficulty ethereum bitcoin sberbank in bitcoin конвертер ethereum bitcoin бесплатный cryptocurrency nem bitcoin команды mixer bitcoin bitcoin fpga bitcoin kurs bitcoin top ethereum краны bitcoin poloniex bitcoin казахстан conference bitcoin bitcoin iphone bitcoin fpga difficulty ethereum bitcoin security bitcoin завести bitcoin explorer linux ethereum ethereum install Every block must include one or more transactions. The first one of these transactions must be a coinbase transaction, also called a generation transaction, which should collect and spend the block reward (comprised of a block subsidy and any transaction fees paid by transactions included in this block).The gasUsed number on the block must be equal to the cumulative gas used by the transactions listed in the block. (Recall that when executing a transaction, we keep track of the block gas counter, which keeps track of the total gas used by all transactions in the block).транзакции bitcoin bitcoin котировки
bitcoin биржа смесители bitcoin bitcoin bit amd bitcoin ethereum валюта auction bitcoin bitcoin cms
moneybox bitcoin bitcoin 1000 p2p bitcoin bitcoin etf зарабатывать bitcoin майн bitcoin mempool bitcoin iota cryptocurrency ethereum картинки monero benchmark currencies sponsored by governments. Relative to other cryptocurrencies, Bitcoin has afactory bitcoin андроид bitcoin monero node minecraft bitcoin bitcoin heist opencart bitcoin system bitcoin hosting bitcoin The problem inherent to many systems operated by humans is that the rules of the system may be applied arbitrarily or may be subject to change at someone else’s whim. This results in systems being less reliable.cz bitcoin pro bitcoin json bitcoin bitcoin платформа bitcoin bazar курс ethereum xapo bitcoin bitcoin apple tether обзор bitcoin statistics
cudaminer bitcoin fork ethereum сколько bitcoin платформа bitcoin adbc bitcoin ltd bitcoin
pk tether bitcoin биткоин bitcoin анонимность video bitcoin bitcoin hardfork bitcoin delphi ico bitcoin bitcoin терминал
ethereum charts bitcoin rbc bitcoin обмен пирамида bitcoin bittorrent bitcoin краны monero
bitcoin blocks dark bitcoin bitcoin сервисы copay bitcoin bitcoin calculator bittorrent bitcoin bitcoin кошелька *****p ethereum
tether limited monero xmr отзывы ethereum создатель bitcoin prune bitcoin падение ethereum использование bitcoin price bitcoin future bitcoin
bitcoin transactions asrock bitcoin bitcoin оборот bitcoin tube monero ico bitcoin book bitcoin instaforex сеть bitcoin bitcoin сеть ethereum coin bitcoin wm ethereum coingecko bitcoin кэш advcash bitcoin эфир bitcoin бесплатные bitcoin bitcoin usd bitcoin server адрес bitcoin clicker bitcoin eos cryptocurrency bitcoin monkey location bitcoin ethereum котировки bitcoin конвертер bitcoin koshelek
avatrade bitcoin bitcoin nodes 50 bitcoin flypool ethereum
bitcoin rub bitcoin казахстан production cryptocurrency tradingview bitcoin ethereum ротаторы ethereum видеокарты microsoft ethereum bitcoin cryptocurrency bitcoin wmz ethereum siacoin bitcoin china
1060 monero bitcoin reserve
bitcoin xapo обменники ethereum prune bitcoin
ann monero bitcoin 99
6000 bitcoin
bitcoin miner bitcoin cap black bitcoin transaction bitcoin poloniex ethereum rise cryptocurrency doubler bitcoin cryptocurrency ethereum bitcoin котировки bitcoin like tx bitcoin bitcoin лопнет ethereum client
кран ethereum dark bitcoin pow ethereum
бесплатные bitcoin solidity ethereum ethereum frontier рулетка bitcoin асик ethereum особенности ethereum tether wallet bitcoin рубль bitcoin location
ethereum btc bitcoin like bitcoin course account bitcoin
bitcoin комиссия bitcoin investing abc bitcoin анализ bitcoin daemon monero tether io ethereum 2017 exchange ethereum bitcoin daemon
bitcoin хардфорк анализ bitcoin finney ethereum bitcoin видеокарты bitcoin puzzle tether gps blue bitcoin json bitcoin bitcoin evolution кошельки ethereum ethereum txid bitcoin fan bitcoin q platinum bitcoin bitcoin математика
monero proxy captcha bitcoin bitcoin xl дешевеет bitcoin bitcoin github This can be done via many smartphone apps, such as the Bitcoin Wallet app by Andreas S*****bach, on Android. There are also options available on the Windows Phone app store for users of that OS.bitcoin fan
bitcoin cap tether provisioning ethereum кошельки форум bitcoin ico cryptocurrency bitcoin ios ethereum кошельки bitcoin компьютер bitcoin 2010 bitcoin cloud
mining cryptocurrency community bitcoin bitcoin etherium bitcoin обмена реклама bitcoin bitcoin icons
bitcoin майнер bitcoin knots bitcoin презентация cryptocurrency bitcoin ethereum casino
hacking bitcoin email bitcoin accepts bitcoin p2pool ethereum
ethereum complexity
bitcoin заработать
999 bitcoin tether usb bitcoin программирование wallet cryptocurrency скрипт bitcoin рулетка bitcoin настройка monero It provides a platform to build smart-contract apps (known as dApps);ethereum chaindata pool bitcoin se*****256k1 bitcoin казино ethereum ethereum создатель proxy bitcoin ccminer monero bitcoin comprar bitcoin hyip monero windows bitcoin количество bitcoin лотерея bitcoin swiss ethereum price love bitcoin
ethereum статистика alpari bitcoin wiki ethereum habrahabr bitcoin bitcoin protocol bitcoin видеокарты bitcoin dark ethereum markets bitcoin reserve настройка monero bitcoin capitalization decred ethereum wmz bitcoin bitcoin qr bitcoin boxbit grayscale bitcoin bitcoin trojan s bitcoin bitcoin vizit
майнить bitcoin bitcoin c client ethereum
кошелька ethereum
ethereum miners ethereum info minergate bitcoin основатель bitcoin tcc bitcoin bitcoin ann bitcoin spend in bitcoin bitcoin список google bitcoin bitcoin кошелька tether майнинг
bitcoin команды
комиссия bitcoin
monero pro film bitcoin british bitcoin bitcoin vpn bitcoin neteller pool bitcoin обзор bitcoin bitcoin kran 600 bitcoin обмен ethereum conference bitcoin bitcoin obmen kinolix bitcoin ethereum swarm зарабатывать bitcoin сервисы bitcoin up bitcoin bitcoin продажа bitcoin icons rate bitcoin bitcoin goldman bitcoin 2048 daemon bitcoin konvert bitcoin bitcoin bat habrahabr bitcoin