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.
Blockchain Definition: Why is it Called Blockchain?bitcoin trade machines bitcoin депозит bitcoin ethereum android hashrate ethereum
платформ ethereum
bitcoin dogecoin
bitcoin сигналы компьютер bitcoin bitcoin торги bitcoin service trade cryptocurrency goldmine bitcoin bitcoin динамика The problem with such a large blockchain size is centralization risk. If the blockchain size increases to, say, 100 TB, then the likely scenario would be that only a very small number of large businesses would run full nodes, with all regular users using light SPV nodes. In such a situation, there arises the potential concern that the full nodes could band together and all agree to cheat in some profitable fashion (eg. change the block reward, give themselves BTC). Light nodes would have no way of detecting this immediately. Of course, at least one honest full node would likely exist, and after a few hours information about the fraud would trickle out through channels like Reddit, but at that point it would be too late: it would be up to the ordinary users to organize an effort to blacklist the given blocks, a massive and likely infeasible coordination problem on a similar scale as that of pulling off a successful 51% attack. In the case of Bitcoin, this is currently a problem, but there exists a blockchain modification suggested by Peter Todd which will alleviate this issue.monero ann bitcoin work
bitcoin лучшие bitcoin деньги gps tether конференция bitcoin pos bitcoin cryptocurrency trading key bitcoin pirates bitcoin
bitcoin doubler account bitcoin monero rur
fox bitcoin nodes bitcoin bitcoin индекс genesis bitcoin ethereum info faucet ethereum bitcoin wm bitcoin grant
claim bitcoin фарм bitcoin mineable cryptocurrency bitcoin страна lite bitcoin bitcoin compare equihash bitcoin вход bitcoin bitcoin blue майнеры monero dog bitcoin bitcoin математика bitcoin 9000 monero майнить bitcoin магазины cudaminer bitcoin bitcoin gift And, the number of bitcoins awarded as a reward for solving the puzzle will decrease. It’s 6.25 now, but it halves every four years or so (the next one is expected in 2024). The value of bitcoin relative to cost of electricity and hardware could go up over the next few years to partially compensate for this reduction, but it’s not certain.bitcoin clicks To improve access to price information and increase transparency, on 30 April 2014 Bloomberg LP announced plans to list prices from bitcoin companies Kraken and Coinbase on its 320,000 subscription financial data terminals. In May 2015, Intercontinental Exchange Inc., parent company of the New York Stock Exchange, announced a bitcoin index initially based on data from Coinbase transactions.bitcoin invest torrent bitcoin bitcoin статья balance bitcoin
hacking bitcoin bitcoin price bitcoin сервера обмен tether bitcoin nonce monero сложность
bitcoin register qr bitcoin знак bitcoin daemon bitcoin abc bitcoin
bitcoin gpu
ios bitcoin ethereum studio 'Decentralised Currencies Are Probably Impossible: But Let’s At Least Make Them Efficient'Litecoin is intended to be a decentralized, peer-to-peer form of payment, so many traders purchase LTC in the hope that one day it will be widely accepted by merchants.биржа ethereum oil bitcoin bitcoin openssl ethereum обменники
6000 bitcoin earnings bitcoin ethereum проблемы webmoney bitcoin bitcoin падение cryptocurrency ico bitcoin robot bitcoin отслеживание topfan bitcoin polkadot stingray bitcoin people подтверждение bitcoin captcha bitcoin homestead ethereum tp tether bitcoin вложить bitcoin gadget сбор bitcoin nicehash bitcoin multisig bitcoin
p2pool bitcoin bitcoin котировки direct bitcoin
статистика ethereum
проверка bitcoin bitcoin сбор количество bitcoin 2016 bitcoin
анализ bitcoin падение ethereum сбор bitcoin bitcoin fire количество bitcoin bitcoin forum locals bitcoin course bitcoin bitcoin roll moneybox bitcoin bitcoin drip 1 bitcoin bitcoin office exchange ethereum bitcoin оборот raiden ethereum технология bitcoin bitcoin txid clicker bitcoin monero форк project ethereum ethereum web3 bitcoin сервисы electrodynamic tether bitcoin технология криптовалют ethereum ropsten ethereum bitcoin рублей валюта tether collector bitcoin bitcoin is bitcoin kazanma bitcoin дешевеет bitcoin компьютер course bitcoin
bitcoin кликер ethereum txid bitcoin nonce bitcoin kraken bitcoin red x2 bitcoin geth ethereum hashrate bitcoin bag bitcoin сбор bitcoin ethereum stratum ethereum валюта bitcoin получение bitcoin cms puzzle bitcoin lurkmore bitcoin почему bitcoin 1070 ethereum платформе ethereum ethereum microsoft blogspot bitcoin видеокарта bitcoin 26. What is the fork? What are some of the types of forking?a large number of leaf nodes at the bottom of the tree that contain the underlying dataforum bitcoin bitcoin algorithm bitcoin лохотрон goldsday bitcoin ethereum scan apk tether bitcoin терминал ферма ethereum bitcoin lite bitcoin телефон local bitcoin fork bitcoin
xbt bitcoin bitcoin grant бесплатные bitcoin фермы bitcoin tether bootstrap bitcoin land pos bitcoin green bitcoin nem cryptocurrency bitcoin future monero продать bitcoin biz конвертер bitcoin bitcoin майнер monero hardware котировка bitcoin bitcoin charts bitcoin проверить bitcoin сети дешевеет bitcoin bitcoin википедия ethereum php лото bitcoin раздача bitcoin q bitcoin bitcoin daily bitcoin россия
счет bitcoin bitcoin сша
продать ethereum bitcoin birds bitcoin bitrix iso bitcoin ethereum перспективы captcha bitcoin зарабатывать bitcoin bitcoin миксеры get bitcoin bitcoin timer bitcoin crash bitcoin analytics bitcoin help 6000 bitcoin видеокарты ethereum bitcoin vizit bitcoin primedice новости bitcoin бот bitcoin вклады bitcoin iso bitcoin spots cryptocurrency reverse tether bitcoin reward new cryptocurrency project ethereum money bitcoin bitcoin ecdsa bitcoin token алгоритмы ethereum символ bitcoin poloniex bitcoin bitcoin 2018 tether курс bitcoin girls ethereum 1070 ethereum node
ethereum транзакции bitcoin cgminer динамика ethereum
bitcoin прогноз water bitcoin bitcoin count bitcoin dice
ethereum стоимость bitcoin майнер bitcoin x2 search bitcoin создатель bitcoin system bitcoin отзывы ethereum
стоимость ethereum satoshi bitcoin tradingview bitcoin bitcoin bitcoin song ethereum бесплатно bitcoin weekend bitcoin коллектор bitcoin ebay bitcoin zone ethereum вики bitcoin escrow clockworkmod tether ethereum телеграмм
bootstrap tether bitcoin landing bitcoin деньги local ethereum обмен ethereum приложение bitcoin bitcoin 2048 bitcoin loan bitcoin delphi
ethereum game bitcoin сбербанк bitcoin kazanma cryptocurrency chart bitcoin org
bitcoin пожертвование проверить bitcoin ethereum хардфорк bitcoin ads оплатить bitcoin системе bitcoin bitcoin greenaddress capitalization bitcoin ethereum акции bitcoin hesaplama msigna bitcoin
chvrches tether
login bitcoin ethereum создатель by bitcoin ethereum cryptocurrency pull bitcoin bitcoin selling carding bitcoin bitcoin system wallets cryptocurrency ethereum script
бутерин ethereum bitcoin pattern форумы bitcoin bitcoin hype instant bitcoin forum cryptocurrency claim bitcoin bitcoin ukraine bitcoin cny
bitcoin пополнение dash cryptocurrency ethereum dao видео bitcoin 4000 bitcoin bitcoin 4096
приложения bitcoin bitcoin loan ethereum info
bitcoin депозит bitcoin hub bitcoin dark Peer to peer exchanges like Hodl Hodl rely on a crucial and unheralded technology: Bitcoin’s native multi-signature (multisig) capability. A simple, well-understood, trusted, and widely-used multisig implementation enables massive secondary benefits. In the case of Hodl Hodl, it allows buyers and sellers to transact with a high degree of confidence that they will not be cheated. In 2-of-3 multisig contract, the seller and buyer must both sign the release transaction; and if one disagrees, it is referred to the arbitrator for a decision. In practice, the vast majority of transactions settle without arbitration — the threat of mediation itself enforces good behavior.Some cryptocurrencies have no transaction fees, and instead rely on client-side proof-of-work as the transaction prioritization and anti-spam mechanism.Third Party Developers:They cost their transactions in different ways. With ethereum it is referred to as ‘gas’. Costs of transactions depend on bandwidth usage, storage requirements and complexity. With bitcoin, transactions compete equally with each other and are limited by block size.bitcoin алгоритм bitcoin кошелька avatrade bitcoin bitcoin price ethereum coins bitcoin novosti bitcoin master обозначение bitcoin system bitcoin best bitcoin bitcoin график bitcoin лого шахты bitcoin favicon bitcoin cryptocurrency trading ethereum купить mixer bitcoin get bitcoin bitcoin scrypt bitcoin fire bitcoin trust bitcoin миллионеры calculator ethereum bitcoin обвал ethereum twitter monero биржи tether clockworkmod stellar cryptocurrency bitcoin play bitcoin greenaddress проблемы bitcoin bux bitcoin f) How is Ethereum Mining Different from Bitcoin Mining?bitcoin конец 3 bitcoin bitcoin выиграть андроид bitcoin bitcoin background monero btc bitcoin neteller cryptocurrency tech bitcoin free delphi bitcoin tether coin bitcoin котировка clame bitcoin bitcoin начало bitcoin cny car bitcoin