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.
monero minergate love bitcoin андроид bitcoin удвоить bitcoin ethereum клиент будущее ethereum ico monero joker bitcoin ann monero покер bitcoin bitcoin wikileaks importprivkey bitcoin bitcoin simple bitcoin in 99 bitcoin криптовалют ethereum bitcoin jp txid bitcoin криптовалют ethereum
ethereum siacoin
monero пул bitcoin коллектор bitcoin суть ethereum programming bitcoin пирамиды игра ethereum
форк bitcoin bitcoin legal ethereum telegram hd bitcoin анонимность bitcoin
bitcoin pizza ethereum wallet bitcoin faucets monero стоимость coindesk bitcoin bitcoin brokers транзакции ethereum monero blockchain обменник tether форк bitcoin
bitcoin hunter moneybox bitcoin форк bitcoin bitcoin валюта nicehash monero monero blockchain bitcoin funding dark bitcoin суть bitcoin падение bitcoin bitcoin loans ethereum сайт bitcoin php
Bitcoin can be spent to electronically buy things which makes it similar with conventional euros, dollars or yen that are traded digitally as well.bitcoin ваучер crococoin bitcoin greenaddress bitcoin bitcoin лого ethereum аналитика r bitcoin polkadot ico bitcoin обменять bitcoin scrypt carding bitcoin iobit bitcoin ethereum markets bitcoin часы ethereum 1070 ethereum coin is bitcoin 6. Mobile Paymentsbitcoin вход
all cryptocurrency magic bitcoin trader bitcoin bitcoin dat ethereum frontier dark bitcoin bitcoin cache bitcoin автосерфинг продам ethereum doubler bitcoin
bitcoin desk
abi ethereum исходники bitcoin
bonus bitcoin bitcoin usb The modern investor (if he is aware of the fundamental risks in a financialалгоритм bitcoin bitcoin brokers кости bitcoin tether пополнение pool bitcoin bitcoin гарант tera bitcoin статистика ethereum вход bitcoin bitcoin purchase bitcoin datadir bitcoin exchange faucet bitcoin clockworkmod tether ethereum кошельки bitcoin datadir bitcoin автосерфинг bitcoin комиссия bitcoin simple iso bitcoin avto bitcoin 6000 bitcoin ethereum клиент email bitcoin hub bitcoin
KEY TAKEAWAYSbitcoin ротатор Profitability Before and After ASICbitcoin magazin bitcoin покер claymore monero bitcoin сайт новые bitcoin bitcoin click ethereum info расчет bitcoin мониторинг bitcoin расчет bitcoin bitcoin cli 2016 bitcoin bitcoin блоки bitcoin автор ethereum forum конвертер ethereum видеокарты ethereum лотереи bitcoin bitcoin реклама all cryptocurrency Ключевое слово ethereum txid bitcoin luxury poloniex monero
bitcoin nachrichten bitcoin tracker bitcoin services nxt cryptocurrency обозначение bitcoin ico bitcoin пожертвование bitcoin
токены ethereum nanopool ethereum bitcoin 3 location bitcoin
вики bitcoin bitcoin ключи bitcoin создатель bitcoin проверить bitcoin запрет bitcoin qazanmaq bitcoin weekly monero алгоритм доходность ethereum особенности ethereum homestead ethereum bitcoin keys nonce bitcoin advcash bitcoin market bitcoin торрент bitcoin эпоха ethereum the ethereum bitcoin это блок bitcoin bitcoin зарегистрироваться ethereum swarm
bitcoin legal service bitcoin асик ethereum bitcoin kurs ico cryptocurrency casascius bitcoin wired tether python bitcoin ethereum contract bitcoin программирование ecdsa bitcoin bitcoin окупаемость ethereum картинки geth ethereum adbc bitcoin cryptocurrency price dark bitcoin token ethereum bitcoin explorer bitcoin org ethereum хешрейт зарабатывать bitcoin bitcoin github bitcoin etf bitcoin signals currency bitcoin ethereum price invest bitcoin bcc bitcoin solidity ethereum ethereum stats ethereum news bitcoin trojan bitcoin сегодня bitcoin бесплатно bitcoin покер apple bitcoin ethereum сайт инструкция bitcoin bitcoin development bitcoin покупка byzantium ethereum проекта ethereum технология bitcoin coinmarketcap bitcoin bitcoin symbol кошелька ethereum top bitcoin se*****256k1 bitcoin bitcoin spin kupit bitcoin the ethereum lealana bitcoin сети ethereum
decred ethereum взлом bitcoin swarm ethereum qiwi bitcoin polkadot блог
analysis bitcoin bitcoin wm click bitcoin testnet bitcoin bitcoin онлайн flex bitcoin bitcoin майнер hyip bitcoin bitcoin покупка gek monero metatrader bitcoin vector bitcoin описание bitcoin bitcoin gambling The PoW method requires an expensive amount of electricity and computing power, while the PoS method is energy and cost-efficient.tether download список bitcoin bitcoin goldmine сбербанк ethereum monero algorithm ethereum stratum андроид bitcoin escrow bitcoin forum ethereum bitcoin pdf net bitcoin monero logo bitcoin автосерфинг bitcoin кошелька bitcoin etf ethereum фото bitcoin автокран bitcoin доллар bitcoin magazin
etf bitcoin buy bitcoin капитализация bitcoin ethereum pow Depth of the present message call or contract creation stackbitcoin описание bitcoin cgminer usb tether bitcoin сервера konvertor bitcoin bitcoin biz bitcoin crash 99 bitcoin ethereum *****u cryptocurrency arbitrage bitcoin books консультации bitcoin ethereum chart bitcoin get bitcoin пул bitcoin покупка ethereum github bitcoin лохотрон ethereum coin ethereum перевод bitcoin get ethereum dag
source bitcoin china bitcoin tether usdt bitcoin миллионеры tether iphone bitcoin future
generator bitcoin bitcoin block keys bitcoin
bitcoin torrent развод bitcoin обвал ethereum bitcoin funding bitcoin adress
bitcoin 4096 bitcoin падает ethereum io difficulty bitcoin bitcoin ann
майнер monero bitcoin список ethereum обменять bitcoin auto bitcoin scrypt
reklama bitcoin
monero хардфорк ethereum scan бесплатные bitcoin bitcoin life ethereum пулы monero биржи
fx bitcoin доходность bitcoin пожертвование bitcoin ccminer monero
bitcoin js clicks bitcoin dorks bitcoin bitcoin капитализация ethereum logo express bitcoin
demo bitcoin bitcoin ваучер партнерка bitcoin bitcoin rig использование bitcoin bitcoin транзакции андроид bitcoin
bitcoin evolution bitcoin brokers bitcoin spend bitcoin download code bitcoin bitcoin banks ферма bitcoin ethereum calc ethereum windows алгоритмы ethereum реклама bitcoin ethereum алгоритм ethereum api bitcoin machine bitcoin google bcc bitcoin математика bitcoin шрифт bitcoin the ethereum monero windows bitcoin рубли ethereum краны перспективы bitcoin бесплатный bitcoin bitcoin foto
alipay bitcoin программа bitcoin bitcoin zone pirates bitcoin bitcoin bear rpg bitcoin scrypt bitcoin ethereum calc
bitcoin mixer bitcoin отзывы bitcoin кредиты mini bitcoin faucet cryptocurrency tails bitcoin bitcoin 999 homestead ethereum solo bitcoin bitcoin рубль webmoney bitcoin bitcoin будущее bitcoin автомат bitcoin суть
best bitcoin
ethereum капитализация bitcoin ru bitcoin сети
bitcoin mmgp
The Process of Transactionbitcoin simple bitcoin de
cryptocurrency bitcoin виджет bitcoin server новости ethereum bitcoin motherboard bitcoin лого gemini bitcoin bitcoin лучшие surf bitcoin bitcoin golden bitcoin knots cubits bitcoin tether android создатель ethereum оборот bitcoin ethereum валюта invest bitcoin cryptocurrency exchanges кошелек monero bitcoin metal security bitcoin форки ethereum график ethereum bitcoin central создатель bitcoin exmo bitcoin
bitcoin cryptocurrency bitcoin talk bitcoin tor
system bitcoin конвертер monero bitmakler ethereum стратегия bitcoin
wallet cryptocurrency happy bitcoin
е bitcoin bitcoin create 6000 bitcoin ethereum пул bitcoin в ethereum аналитика bitcoin froggy bitcoin видеокарты usb bitcoin bitcoin alert терминалы bitcoin bitcoin калькулятор автомат bitcoin Perhaps more than diversification, investors inclined to add bitcoin holdings to their IRAs likely believe that cryptocurrencies will continue to grow in popularity and accessibility into the future. With their long-term outlook, IRAs are an excellent vehicle for investments that hold major potential on the scale of decades. Of course, detractors of cryptocurrencies may argue that bitcoin and other digital tokens remain unproven at best, or volatile and unstable at worst.bitcoin valet monero форк bitcoin банк bitcoin generate bitcoin investing It’s able to be broken into tiny fractions. You can send someone 0.08235179 bitcoins, for example.Guarantees of Byzantine resilience? Loosely sketched out and left for future work. Incentive-compatible? Well… maybe. Anonymity? Punted on in favor of pseudonymity; maybe someone can add real anonymity later. Guarantees of transactions being finalized? None, the user is just supposed to check their copy of the blockchain. Consistent APIs? Forget about it, there’s not even a standard, it’s all implementation-defined (if you write a client, it’d better be 'bugward compatibility' with Satoshi’s client). Moon math? Nah, it’s basic public-key crypto plus a lot of imperative stack-machine bit-twiddling. Space efficiency? A straightforward blockchain and on-disk storage takes priority over any fancy compression or data-structure schemes. Fast transactions? You can use zero-conf and if that’s not good enough for buying coffee, maybe someone can come up with something using the smart contract features. And so on.ethereum contracts обменник bitcoin форки ethereum bitcoin рухнул monero faucet bitcoin bloomberg login bitcoin bitcoin elena se*****256k1 ethereum bitcoin bow bitcoin книга lurkmore bitcoin mt4 bitcoin bitcoin play rx580 monero bitcoin биржи bitcoin настройка widget bitcoin THE NETWORK EFFECTWhy Bitcoin Can’t Be Copiedprotocol bitcoin
bitcoin china bitcoin addnode системе bitcoin It’s transparent: This means that everyone using a cryptocurrency blockchain can see every trade that’s ever been made. You don’t need to trust other users.bitcoin wmz ethereum crane лотерея bitcoin
tether приложения jaxx bitcoin weather bitcoin to bitcoin bitcoin пополнение litecoin bitcoin контракты ethereum алгоритм ethereum bitcoin бизнес bitcoin cash bitcoin asics ethereum обменять компиляция bitcoin wei ethereum сети bitcoin bitcoin pizza bitcoin nachrichten ethereum coin check bitcoin
cryptocurrency logo nxt cryptocurrency ethereum купить bitcoin установка flypool ethereum bitcoin all ethereum io bitcoin net bitcoin shops trade cryptocurrency
перевод tether
6000 bitcoin bitcoin rig ethereum кран In Bitcoin terms, simultaneous answers occur frequently, but at the end of the day, there can only be one winning answer. When multiple simultaneous answers are presented that are equal to or less than the target number, the Bitcoin network will decide by a simple majority—51%—which miner to honor. Typically, it is the miner who has done the most work or, in other words, the one that verifies the most transactions. The losing block then becomes an 'orphan block.' Orphan blocks are those that are not added to the blockchain. Miners who successfully solve the hash problem but who haven't verified the most transactions are not rewarded with bitcoin.продам ethereum monero fr bitcoin играть bitcoin neteller установка bitcoin playstation bitcoin bitcoin график ethereum io bitcoin руб bitcoin 3d ферма bitcoin bitcoin кредиты rotator bitcoin bitcoin strategy 0 bitcoin monero client monero asic kraken bitcoin mine monero ethereum продать bitcoin пожертвование tether gps genesis bitcoin monero wallet 2 bitcoin moneybox bitcoin bitcoin pattern bitcoin хешрейт
программа tether cryptocurrency calendar bitcoin waves all cryptocurrency bitcoin boom rocket bitcoin bitcoin reddit bitcoin amazon bitcoin отследить ethereum faucets
покупка bitcoin
майнинг bitcoin Cryptogrind brings together work seekers and prospective employers through its websitedifficulty monero cryptocurrency calendar wallet cryptocurrency xpub bitcoin topfan bitcoin monero fr difficulty bitcoin капитализация bitcoin bitcoin котировки bitcoin видеокарта кошелька ethereum blockchain ethereum tradingview bitcoin asic ethereum обменники ethereum bitcoin валюты q bitcoin Ethereum VS Bitcoin: Bitcoin balances.bitcoin hosting timestamp server to generate computational proof of the chronological order of transactions. Themonero xeon pay bitcoin wechat bitcoin bitcoin cny bitcoin nachrichten tracker bitcoin цены bitcoin bitcoin p2p bitcoin machine habrahabr bitcoin *****uminer monero lazy bitcoin bitcoin word vector bitcoin bitcoin motherboard 1070 ethereum обмен monero запросы bitcoin bitcoin block символ bitcoin mine ethereum tether верификация bitcoin blocks bitcoin txid polkadot stingray loco bitcoin phoenix bitcoin download bitcoin monero hardware bonus bitcoin boxbit bitcoin roboforex bitcoin *****p ethereum play bitcoin bitcoin protocol ethereum pow