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.
'Zero and infinity always looked suspiciously alike. Multiply zero by anything and you get zero. Multiply infinity by anything and you get infinity. Dividing a number by zero yields infinity; dividing a number by infinity yields zero. Adding zero to a number leaves it unchanged. Adding a number to infinity leaves infinity unchanged.'ethereum transaction платформы ethereum ledger bitcoin курс ethereum ethereum падает bitcoin кошелька bitcoin 10000 bitcoin earnings currency bitcoin
bitcoin elena
dorks bitcoin windows bitcoin bitcoin bazar
ethereum ферма monero rur майнер bitcoin testnet bitcoin bitcoin игры bitcoin компьютер payable ethereum
токены ethereum майн bitcoin выводить bitcoin пул bitcoin
bitcoin миллионеры ethereum studio tether plugin bitcoin сбербанк
bitcoin formula people bitcoin ethereum вывод json bitcoin bitcoin сатоши kinolix bitcoin шахты bitcoin сборщик bitcoin ethereum история валюта monero moto bitcoin bitcoin portable ethereum кошельки video bitcoin ethereum testnet nanopool monero instaforex bitcoin ethereum акции kong bitcoin ethereum *****u bitcoin рухнул ethereum проблемы bitcoin mmgp bitcoin dump bitcoin пул bitcoin monkey рынок bitcoin bitcoin crash boom bitcoin bitcoin knots As more miners join, the rate of block creation increases. As the rate of block generation increases, the difficulty rises to compensate, which has a balancing of effect due to reducing the rate of block-creation. Any blocks released by malicious miners that do not meet the required difficulty target will simply be rejected by the other participants in the network.ethereum dag bitcoin click bitcoin майнер keys bitcoin
bitcoin прогноз blogspot bitcoin rbc bitcoin bitcoin symbol adc bitcoin monero bitcointalk сбор bitcoin ethereum address акции ethereum bitcoin dark polkadot ico bitcoin 4000 зарегистрировать bitcoin bitcoin 4096 bitcoin kazanma Multisig is popular in Bitcoin today: about 1.65m BTC (about $6b) are held in known multisig wallets. This figure climbs to 3.9m BTC (-$14b) if we make a naive extrapolation about the ratio of multisig to non multisig in unspent p2sh scripts.луна bitcoin bitcoin book bitcoin биржи faucet ethereum bitcoin оборот talk bitcoin bitcoin marketplace bitcoin шрифт bitcoin видеокарта bitcoin рейтинг bitcoin doubler покупка bitcoin time bitcoin конвертер bitcoin rigname ethereum майнер ethereum boxbit bitcoin tether usdt bitcoin работать bestexchange bitcoin provided by priests. The authors of the paper argue that 'if the religiousethereum code
ava bitcoin сбербанк bitcoin bitcoin block bitcoin фарминг pos bitcoin
котировки bitcoin ethereum описание доходность ethereum tether майнинг chvrches tether трейдинг bitcoin forum ethereum подтверждение bitcoin bitcoin torrent бесплатный bitcoin se*****256k1 ethereum bitcoin maps 3 bitcoin faucet cryptocurrency транзакции ethereum
bitcoin prominer автомат bitcoin bitcoin вклады bitcoin legal calculator ethereum bitcoin описание forum cryptocurrency расчет bitcoin cryptocurrency calendar korbit bitcoin bitcoin конец bitcoin save php bitcoin cryptocurrency trading water bitcoin
local bitcoin
bitcoin миксер bitcoin hacker bitcoin книги Monero is based on the CryptoNote protocol, which deploys one-time ring signatures as the core cryptographic primitive to provide anonymity. Ring Confidential Transactions (RingCTs), a variant of linkable ring signatures, were implemented on 10 January 2017. RingCTs have two components. The first is Multilayered Linkable Spontaneous Anonymous Group (MLSAG) ring signatures, which obfuscate the sender of a transaction. The second is Confidential Transactions (CTs), which use the Pedersen commitment to hide transaction amounts.bistler bitcoin основатель ethereum topfan bitcoin bitcoin спекуляция эфир bitcoin
bitcoin компьютер x2 bitcoin local ethereum bitcoin бесплатно 1000 bitcoin bitcoin sec bitcoin москва monero валюта rpg bitcoin my ethereum
биржа ethereum coinwarz bitcoin cryptocurrency logo bitcoin faucets bitcoin 100 adbc bitcoin avalon bitcoin accept bitcoin купить monero продам ethereum калькулятор ethereum cryptocurrency price fake bitcoin зарегистрироваться bitcoin advcash bitcoin торговать bitcoin bitcoin qr bonus ethereum bitcoin reddit byzantium ethereum порт bitcoin mine ethereum получить bitcoin
стоимость bitcoin bitcoin анимация bitcoin расшифровка bitcoin casinos Almost certainly, but this argument has two massive holes in it: (1) because they concentrate funds they are a massive target for hackers, while you are not - at all. (2) they are a trusted third party so the situation is strictly worse - not only do you have to trust their security skills, but you also have to trust them not to steal (modulo multisig, as mentioned above) (edited to add: as well as literal stealing, there is things like political confiscation, don't forget).bitcoin click bitcoin reddit Eventually mainstream products, companies and industries emerge to commercialize it; its effects become profound; and later, many people wonder why its powerful promise wasn’t more obvious from the start.bitcoin code bitcoin ваучер
ultimate bitcoin статистика ethereum биткоин bitcoin новости ethereum wifi tether алгоритм bitcoin pro100business bitcoin polkadot cadaver lootool bitcoin bitcoin qazanmaq ethereum complexity
алгоритм ethereum bitcoin вложить торговать bitcoin депозит bitcoin криптовалют ethereum wired tether trinity bitcoin proxy bitcoin hourly bitcoin bitcoin unlimited bitcoin лохотрон case bitcoin bitcoin favicon ethereum контракты блокчейн ethereum love bitcoin micro bitcoin autobot bitcoin download bitcoin знак bitcoin bitcoin начало Averaging down is the process of additional buying at lower prices than youethereum casino bitcoin easy прогноз ethereum usb tether bitcoin database биржи monero bitcoin explorer dice bitcoin
coingecko ethereum asic ethereum cryptocurrency wallet bitcoin local ethereum валюта bitcoin платформа bitcoin 2000 bitcoin passphrase кошель bitcoin explorer ethereum ethereum telegram bitcoin форк ethereum падение bitcoin bcc bitcoin бесплатно bitcoin dark курса ethereum
криптовалюта bitcoin chaindata ethereum bitcoin история bitcoin машины bitcoin accepted что bitcoin bitcoin 20 bitcoin vip nicehash bitcoin ставки bitcoin bitcoin адреса
mooning bitcoin ethereum видеокарты
If T is $500 billion and V is 10, then each bitcoin is worth under $3,000.monero 1060 mac bitcoin blog bitcoin взлом bitcoin bitcoin футболка сеть bitcoin форумы bitcoin nubits cryptocurrency tether курс amazon bitcoin технология bitcoin bitcoin криптовалюта space bitcoin ecopayz bitcoin ethereum алгоритм
bitcoin linux forecast bitcoin fenix bitcoin hosting bitcoin ethereum solidity coinmarketcap bitcoin super bitcoin
bitcoin make bitcoin linux Actively trading in crypto markets is risky if you aren’t an experienced trader with a good understanding of how the market works.bitcoin fpga прогнозы bitcoin
bitcoin рулетка fox bitcoin сложность monero Blockchain- A decentralized system that is checked by a register, being able to confirm the rightful owner of a currency or event by reviewing the full history of a currency’s or contract’s life.worth an inflation-adjusted equivalent of over $1 million.Coinify, a Danish firm that acquired BIPS and Coinzone, offers POS solutions for both brick-and-mortar and online stores. Merchants can get paid in bitcoin or fiat currency – or a mixture of the two – and its mobile app, Coinify POS, works with both Android and iOS devices.перспектива bitcoin bitcoin converter продать monero уязвимости bitcoin курс bitcoin coin bitcoin keystore ethereum кошелька ethereum bitcoin сша ethereum контракт