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 калькулятор stealer bitcoin legal bitcoin оплатить bitcoin nodes bitcoin bitcoin 123 bitcoin nedir reddit bitcoin ethereum contract bitcoin plugin bitcoin ixbt token ethereum bitcoin автомат bitcoin play new cryptocurrency продаю bitcoin bitcoin обменники bitcoin china half bitcoin bitcoin work
999 bitcoin
bitcoin кошелек бесплатно bitcoin приложение tether sberbank bitcoin bitcoin iso cryptocurrency faucet bitcoin click ● For board members, Ten questions every board should ask about cryptocurrencies suggests questions to consider when engaging in a conversation about the strategic potential of cryptocurrencies.bitcoin лайткоин бонусы bitcoin ethereum blockchain captcha bitcoin кредит bitcoin daily bitcoin bitcoin generate bitcoin биржи 10 bitcoin bitcoin pro instant bitcoin bitcoin python stratum ethereum кошельки bitcoin ethereum получить difficulty ethereum система bitcoin wallets cryptocurrency mastering bitcoin bitcoin миллионеры bitcoin акции monero algorithm ethereum faucet bitcoin amazon security bitcoin wechat bitcoin bitcoin mail bitfenix bitcoin group bitcoin bitcoin signals платформу ethereum bitcoin обозначение 16 bitcoin tether майнинг настройка bitcoin bitcoin 33 bitcoin two
finex bitcoin coinder bitcoin ротатор bitcoin приват24 bitcoin bitcoin уязвимости bitcoin калькулятор joker bitcoin поиск bitcoin
bitcoin collector обзор bitcoin эмиссия ethereum bitcoin 123 bitcoin capital bitcoin world bitcoin roulette
frontier ethereum ethereum скачать команды bitcoin phoenix bitcoin
подарю bitcoin 777 bitcoin usa bitcoin bitcoin картинка bitcoin gift bitcoin accelerator
ethereum капитализация bitcoin data купить bitcoin майнинга bitcoin bitcoin dance bitcoin de bitcoin analysis взлом bitcoin
bitcoin instagram bitcoin motherboard bitcoin free proxy bitcoin bitcoin автоматический bitcoin wallpaper bitcoin motherboard ethereum news портал bitcoin half bitcoin msigna bitcoin bitcoin china Trace Mayer explaining the Future of Bitcoin and why it will succeed. This event was hosted by CRYPSA at LaGuardia Community College is one example of what a P2P community can achieve.world of blockchain explained.bitcoin win bitcoin окупаемость bitcoin что ethereum биткоин ethereum кран ethereum news ethereum bitcoin продам ethereum clicker bitcoin clockworkmod tether roboforex bitcoin monero пулы ann ethereum p2pool bitcoin goldmine bitcoin проблемы bitcoin bitcoin php майнить bitcoin ethereum info bitcoin xl
truffle ethereum
to bitcoin bitcoin ledger bitcoin ann bitcoin car bitcoin explorer rx560 monero bitcoin иконка monero benchmark ethereum asic bitcoin войти bitcoin casino etf bitcoin p2pool ethereum bitcoin roll обмен monero testnet bitcoin
explorer ethereum electrum bitcoin
wirex bitcoin bitcoin автомат
ethereum os bitcoin puzzle bitcoin nyse apple bitcoin андроид bitcoin clockworkmod tether bitcoin валюты
ethereum stratum bitcoin терминал пополнить bitcoin microsoft bitcoin кости bitcoin
обмен monero
bitcoin форум money bitcoin bitcoin скачать bitcoin бот
btc ethereum bitcoin pizza bitcoin it bitcoin доходность bitcoin count bitcoin best bitcoin обозреватель
In the past, producing a faster generation of chips simply required placing transistors closer together on the chip substrate. The distance between transistors is measured in nanometers. As chip designers begin working with cutting-edge tech nodes with transistor distances as low as 7nm, the improvement in performance may not be proportional to the decrease in distance between transistors. Bitmain has reportedly tried to tape-out new Bitcoin ASIC chips at 16nm, 12nm, and 10nm as of March 2018. The tape-out of all these chips allegedly resulted in failure which cost the company almost 500 million dollars.bitcoin покупка bitcoin ocean 99 bitcoin eID walletTransparent: The code is open source, meaning anyone can look at it. On the blockchain, anyone can scan through the history to see how decisions were made. bitcoin биржи nicehash bitcoin майнеры monero bitcoin 10 bitcoin pattern flappy bitcoin short bitcoin hacking bitcoin bitcoin webmoney bitcoin bat bitcoin бесплатный bitcoin nodes calculator ethereum rigname ethereum bitcoin utopia bitcoin теория bitcoin lion bitcoin skrill testnet bitcoin accepts bitcoin bitcoin раздача ethereum developer bitcoin prune
bitcoin развод tether wallet bitcoin song брокеры bitcoin japan bitcoin tether пополнить live bitcoin bitcoin 0 bitcoin рубль android tether coinder bitcoin anomayzer bitcoin
bitcoin masternode bitcoin видеокарты bitcoin capitalization
poloniex ethereum mining cryptocurrency bitcoin video bitcoin freebie monero client bitcoin код бесплатно ethereum bitcoin telegram обменники bitcoin rush bitcoin nova bitcoin
weekend bitcoin laundering bitcoin fire bitcoin ethereum падает bitcoin сеть bitcoin index ethereum падение forbes bitcoin bitcoin express bitcoin 123 gek monero bitcoin satoshi мониторинг bitcoin bitcoin gadget search bitcoin bitcoin vk moneybox bitcoin polkadot ico bitcoin rt bitcoin girls
bitcoin exchanges loco bitcoin
bitcoin fees bitcoin раздача cryptocurrency charts ethereum ubuntu 1070 ethereum ethereum перевод
goldmine bitcoin bitcoin slots world bitcoin bitcoin s вложения bitcoin история bitcoin
avatrade bitcoin buying bitcoin запрет bitcoin приват24 bitcoin attack bitcoin bitcoin окупаемость
bitcoin минфин avatrade bitcoin machines bitcoin life bitcoin bitcoin бизнес ethereum zcash bitcoin футболка calculator bitcoin bitcoin earn бутерин ethereum putin bitcoin check bitcoin новости ethereum арбитраж bitcoin monero xmr bitcoin кэш crococoin bitcoin bitcoin робот