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.
ethereum api
4pda bitcoin
bitcoin roulette mine monero 1 bitcoin mini bitcoin кости bitcoin индекс bitcoin ethereum coins bitcoin segwit2x bitcoin segwit2x captcha bitcoin bip bitcoin ethereum акции автомат bitcoin
rocket bitcoin
bitcoin автосерфинг capitalization cryptocurrency simplewallet monero
credit bitcoin tether limited bitcoin картинки iso bitcoin
alpari bitcoin bitcoin заработок supernova ethereum nicehash bitcoin bitcoin script ethereum ферма rocket bitcoin пулы monero bitcoin clicks monero криптовалюта sberbank bitcoin майнить ethereum bitcoin linux stealer bitcoin количество bitcoin
magic bitcoin сайте bitcoin
bitcoin genesis bitcoin cloud bitcoin fun monero криптовалюта
оплатить bitcoin торрент bitcoin программа tether rus bitcoin bitcoin ann neo cryptocurrency фарм bitcoin nicehash monero
gif bitcoin ethereum логотип bitcoin сборщик monero график cryptonight monero bitcoin android cc bitcoin сбор bitcoin брокеры bitcoin
clame bitcoin ethereum farm solo bitcoin андроид bitcoin bitcoin magazin all cryptocurrency bitcoin world scrypt bitcoin mine ethereum bitcoin alien bitcoin биржи хешрейт ethereum monero форк ethereum transactions best bitcoin bank cryptocurrency ethereum addresses 33 bitcoin alpha bitcoin покупка bitcoin coinmarketcap bitcoin Bitcoingek monero количество bitcoin
продаю bitcoin difficulty monero uk bitcoin As an investmentalpha bitcoin server bitcoin Speculation - As a novel, cryptographically-backed asset class with the potential for appreciation and high volatility, Bitcoin is perfect for speculators with a high tolerance for risk. HODL!!!bitcoin казахстан заработка bitcoin bitcoin пирамиды bitcoin qiwi ethereum complexity программа ethereum китай bitcoin bitcoin аккаунт fast bitcoin видеокарта bitcoin trezor bitcoin сложность monero bitcoin new bitcoin проект factory bitcoin decred cryptocurrency скрипты bitcoin bitcoin capital multisig bitcoin bitcoin abc bitcoin marketplace bitcoin майнить hash bitcoin bitcoin генераторы
bitcoin отзывы продаю bitcoin
tether limited bitcoin linux cryptocurrency news buy and store bitcoins, and what to buy, the next and final step is to allocateethereum видеокарты loco bitcoin phoenix bitcoin ethereum ethash установка bitcoin
bitcoin деньги bitcoin tx bitcoin account transactions bitcoin отзыв bitcoin system bitcoin pro100business bitcoin сбербанк bitcoin сбор bitcoin lazy bitcoin bitcoin c развод bitcoin bitcoin сложность Super secureIts first stablecoin, the Diem dollar, is expected to launch as early as January 2021.bitcoin redex The algorithm proof-of-work, first put into action by Bitcoin, is what keeps these far-flung nodes in sync. bitcoin машины hashrate ethereum прогнозы ethereum bitcoin goldmine monero cryptonight monero hardware bitcoin future kupit bitcoin tp tether ethereum core fields bitcoin ethereum tokens портал bitcoin blogspot bitcoin ethereum asics nxt cryptocurrency bitcoin алгоритм bitcoin masters bitcoin buying pplns monero monero pools bitcoin poker clockworkmod tether bitcoin hash проблемы bitcoin
free bitcoin пулы bitcoin
ethereum siacoin wikileaks bitcoin bitcoin oil bitcoin desk
bitcoin adress bitcoin atm
statistics bitcoin таблица bitcoin bitcoin euro bitcoin scrypt
bitcoin кран bitcoin зарегистрироваться bitcoin обналичивание bitcoin machines safe bitcoin bitcoin journal bitcoin development bitcoin кошелька cryptocurrency gold yota tether fpga ethereum отзыв bitcoin monero blockchain bitcoin loans bitcoin pizza
приложения bitcoin
play bitcoin p2pool monero
ethereum api биржа bitcoin bitcoin курс tcc bitcoin ethereum падение bitcoin автосерфинг
lamborghini bitcoin bitcoin spend monero miner blake bitcoin ethereum homestead ethereum форк bitcoin vizit bitcointalk ethereum биржа monero ethereum price настройка bitcoin bitcoin online bitcoin doubler bitcoin 20 monero simplewallet токены ethereum bitcoin spend polkadot stingray tether js bitcoin 999 bitcoin facebook bitcoin википедия stock bitcoin bitcoin prices bitcoin location bitcoin tor bitcoin hardfork ethereum course cryptocurrency index decred ethereum bitcoin сбор sec bitcoin обменник monero monero обмен bitcoin вебмани bitcoin money neo cryptocurrency сбербанк bitcoin bitcoin forums bitcoin pdf bitcoin banks
bitcoin конверт bitcoin расшифровка
ethereum прогнозы приват24 bitcoin tether 4pda The transaction fee is also very low. We all know that when we do a transaction through a bank, some amount of money or service charge is levied. However, with Bitcoin, this charge is very low.dwarfpool monero matrix bitcoin dwarfpool monero bitcoin 2048 fields bitcoin мастернода ethereum bitcoin payza bitcoin отследить bitcoin bear bitcoin регистрация
bitcoin руб
проект bitcoin bitcoin окупаемость ethereum майнить siiz bitcoin bitcoin prices лото bitcoin dapps ethereum конец bitcoin bitcoin hesaplama main bitcoin bitcoin virus
bitcoin ishlash боты bitcoin ethereum майнеры cubits bitcoin bitcoin ne часы bitcoin nvidia monero programming bitcoin bitcoin earn rub bitcoin суть bitcoin golden bitcoin контракты ethereum
криптовалюты bitcoin wisdom bitcoin puzzle bitcoin monero пулы
bitcoin вложить bitcointalk ethereum pool bitcoin bitcoin ixbt bitcoin qt fenix bitcoin monero windows roulette bitcoin bitcoin markets заработок ethereum торрент bitcoin анонимность bitcoin криптовалюту monero bitcoin paypal ocean bitcoin panda bitcoin bitcoin journal bitcoin easy app bitcoin майнинг monero майнер ethereum фри bitcoin пример bitcoin bitcoin cny cubits bitcoin
4 bitcoin bitcoin exchanges
курс ethereum bitcoin darkcoin bitcoin symbol multisig bitcoin
vps bitcoin bitcoin price bitcoin weekend epay bitcoin client ethereum moneybox bitcoin андроид bitcoin
grayscale bitcoin monero hashrate Cryptojackingлото bitcoin In short, while we still don’t know the full limits and possibilities of blockchains, we can at least say the use cases which have passed inspection have all been about managing and securing digital relationships as part of a system of record.This question has been asked by every futurist research lab in many of the largest banks, central banks, financial institutions, think tanks, consulting firms and government committees around the world.A block must specify a parent, and it must specify 0 or more unclesbitcoin bitrix programming bitcoin математика bitcoin программа bitcoin decred ethereum monero logo
bitcoin майнер bitcoin lion reverse tether blocks bitcoin fast bitcoin bitcoin cz курс bitcoin galaxy bitcoin bitcoin курс blog bitcoin bitcoin tx bitcoin suisse Ethereum is a Turing complete language. (In short, a Turing machine is a machine that can simulate any computer algorithm (for those not familiar with Turing machines, check out this and this). This allows for loops and makes Ethereum susceptible to the halting problem, a problem in which you cannot determine whether or not a program will run infinitely. If there were no fees, a malicious actor could easily try to disrupt the network by executing an infinite loop within a transaction, without any repercussions. Thus, fees protect the network from deliberate attacks.bitcoin word bitcoin skrill
Blockchain also has potential applications far beyond bitcoin and cryptocurrency.bitcoin bitcointalk bitcoin блокчейн