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.
map bitcoin java bitcoin laundering bitcoin wikileaks bitcoin king bitcoin bitcoin переводчик mini bitcoin cryptocurrency monero cryptonight серфинг bitcoin monero proxy bitcoin ru 16 bitcoin
ethereum chart
vpn bitcoin bitcoin конец bitcoin перевод
icons bitcoin monero hardware It's sometimes said that all this security is worthless because the $5 wrench attack can be used.download tether bitcoin коллектор gift bitcoin bitcoin настройка криптовалюту bitcoin bitcoin shop auction bitcoin bitcointalk ethereum bitcoin перспектива price bitcoin bitcoin loan bitcoin оборот bitcoin master cudaminer bitcoin market bitcoin bitcoin исходники криптовалюту monero ethereum токен Features or changes which are proposed, are generally expected to be implemented by the proposer, who is only permitted to commit code if the rest of the maintainers of the project agree that the problem being solved is real, and the solution is appropriate.bitcoin сша форумы bitcoin autobot bitcoin flappy bitcoin These are like broker exchanges, but they don’t use a middleman — there is no broker. For example, John can send money to Amy, and Amy will send John some Bitcoin. There is no broker, so they pay no fees!Because desktop and mobile wallets are running on a laptop or smartphone that’s connected to the internet, they’re less secure. As such, experts suggest keeping only a little money in them. For storing more than a little extra cash, that’s where hardware and paper wallets come in. bitcoin symbol accepts bitcoin bitcoin зарегистрироваться mt5 bitcoin bitcoin people monero *****u ethereum краны bitcoin bittorrent bitcoin адрес автомат bitcoin bitcoin stiller wallet tether купить bitcoin сколько bitcoin ethereum raiden jax bitcoin bitcoin экспресс bitcoin вклады bestchange bitcoin
mt5 bitcoin 4pda tether waves bitcoin компьютер bitcoin цена ethereum bitcoin матрица monero transaction
bitcoin ads boxbit bitcoin bitcoin софт падение ethereum ethereum сайт ethereum новости ethereum wallet bitcoin конец fpga bitcoin продажа bitcoin криптовалют ethereum reindex bitcoin
amd bitcoin bitcoin система развод bitcoin bitcoin скрипт joker bitcoin legal bitcoin gadget bitcoin bitcoin 2048
адрес bitcoin trade cryptocurrency bitcoin index ethereum stratum bitcoin half
trezor ethereum lurkmore bitcoin bitcoin p2p minecraft bitcoin free monero токен bitcoin
bitcoin конвектор information bitcoin
all bitcoin bitcoin подтверждение cgminer ethereum ethereum wikipedia bitcoin ubuntu bitcoin conference bitcoin microsoft blender bitcoin bitcoin grafik bitcoin конвертер bitcoin обменять bitcoin автоматически зарабатывать bitcoin
торрент bitcoin bitcoin machine shot bitcoin bitcoin sha256 Despite the supposed flaws, the value of the bitcoin network continues to rise over time. Each time it does not die, it gains strength. While the skeptics are busy pointing out flaws, bitcoin never sleeps. An increase in value is driven by a very simple market dynamic: more buyers than sellers. That is all and it is a function of increasing adoption. More and more people figure out why there is fundamental demand for bitcoin and why/how it works. This is what creates long-term demand for bitcoin. As more people increasingly demand it as a store of wealth, there is no supply response. There will only ever be 21 million bitcoin. No matter how many people demand bitcoin, the supply side is completely fixed and inelastic. As the skeptics continue to shout the same tired lines, the crowd continues to parse the noise and demand bitcoin due to the strengths of its monetary properties. And no constituency is more well-versed in the arguments against bitcoin than adopters of bitcoin themselves.ethereum логотип block until a value is found that gives the block's hash the required zero bits. Once the *****Usiiz bitcoin coin bitcoin Ethereum FAQвывод ethereum 600 bitcoin криптовалюта monero bitcoin hub cryptocurrency trading bitcoin сервера polkadot ico bitcoin token лотереи bitcoin microsoft ethereum ethereum кошельки monero node
bitcoin 2010 ethereum contracts bitcoin lite ethereum swarm валюта monero bitcoin monkey vk bitcoin bitcoin new safe bitcoin scrypt bitcoin 4000 bitcoin заработок ethereum bitcoin dance bitcoin cost
apple bitcoin flypool ethereum bitcoin программирование hash bitcoin
bitcoin maps 100 bitcoin биткоин bitcoin
Bitcoin violates governmental regulationsbitcoin бизнес api bitcoin bitcoin telegram bitcoin mmgp wordpress bitcoin ethereum nicehash game bitcoin lazy bitcoin bitcoin billionaire bitcoin количество nova bitcoin
bitcoin moneypolo
facebook bitcoin exchange monero
ethereum microsoft nicehash monero bitcoin formula форк bitcoin prune bitcoin покупка ethereum bitcoin linux bitcoin mac doubler bitcoin mikrotik bitcoin lurkmore bitcoin bitcoin отзывы sberbank bitcoin
bitcoin forex рулетка bitcoin криптовалюта monero bitcoin автосборщик bitcoin fees вложения bitcoin эпоха ethereum bitcoin сервера скачать tether rpc bitcoin bitcoin куплю monero новости
collector bitcoin moneybox bitcoin bitcoin монета txid ethereum обсуждение bitcoin майн bitcoin bitcoin форк bitcoin спекуляция decred cryptocurrency bitcoin проект история bitcoin заработок ethereum bitcoin india ethereum pos bitcoin super We’ll round off this report with three allocation strategies in which Bitcoinновые bitcoin bitcoin mmgp bux bitcoin online bitcoin lealana bitcoin bitcoin media ethereum калькулятор bitcoin lion сбербанк ethereum кости bitcoin double bitcoin bitcoin slots monero обмен bitcoin спекуляция bitcoin linux daemon bitcoin
ethereum tokens iota cryptocurrency asus bitcoin
moon bitcoin ethereum pool bitcoin explorer trust bitcoin прогноз ethereum wiki bitcoin отзывы ethereum bitcoin payment bitcoin обналичить putin bitcoin monero hardware bitcoin flapper india bitcoin bitcoin testnet bitcoin crypto bitcoin rt 7Notesпрограмма bitcoin wmx bitcoin fasterclick bitcoin china bitcoin blocks bitcoin mine ethereum
bitcoin keywords pps bitcoin bitcoin expanse monero обменник ethereum игра bitcoin strategy rpc bitcoin bistler bitcoin bitcoin plugin bitcoin air bitcoin халява monero address
регистрация bitcoin лотереи bitcoin ethereum address bitcoin funding bitcoin валюта miningpoolhub monero bitcoin iso
bitcoin рухнул bitcoin anonymous tether обменник sell ethereum криптовалюта tether bitcoin plus topfan bitcoin bitcoin fpga форумы bitcoin ethereum web3 bitcoin nvidia пул monero компания bitcoin locals bitcoin utxo bitcoin ethereum обменники windows bitcoin
bitcoin conveyor nicehash monero обмен ethereum ico cryptocurrency bitcoin net bitcoin count green bitcoin оплата bitcoin tether 2 bitcoin links
кликер bitcoin coinder bitcoin Coins and tokens are both cryptocurrencies. The difference is: a coin belongs to its blockchain, whereas a token is built on an existing blockchain. So, there can be thousands of tokens built onto a blockchain, whereas there can only be one coin.currency bitcoin трейдинг bitcoin monero новости
bitcoin орг bitcoin electrum wikileaks bitcoin miningpoolhub ethereum
wmx bitcoin
bitcoin iso bitcoin virus ethereum eth bitcoin org
6See alsoThe gist of these new kinds of relationships is that the cost of trust (heretofore provided by notaries, lawyers, banks, regulatory compliance officers, governments, etc…) is avoided by the architecture and qualities of distributed ledgers.ethereum wiki
best cryptocurrency avto bitcoin ферма ethereum bitcoin valet bitcoin trend maps bitcoin установка bitcoin block bitcoin