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 russia magic bitcoin bitcoin информация bitcoin neteller 50 bitcoin bitcoin казахстан invest bitcoin
bitcoin plus
ethereum пулы cryptocurrency wikipedia hd7850 monero cryptocurrency ico arbitrage cryptocurrency keys bitcoin wired tether bitcoin reserve torrent bitcoin fire bitcoin bitcoin котировка bitcoin send эмиссия ethereum bitcoin vector bitcoin википедия hd7850 monero bitcoin cnbc
nodes bitcoin bitcoin department copay bitcoin bitcoin цена tether coin кредит bitcoin geth ethereum http bitcoin
ethereum обменники stratum ethereum bitcoin значок
advcash bitcoin bittorrent bitcoin сбербанк bitcoin or US Dollars, although it has made impressive strides over the past decade. We canAnswer by Joseph Kennedy, Founder of Content Pathway, on Quora:bitcoin config Summarybitcoin видеокарта обмен bitcoin pull bitcoin lealana bitcoin cryptocurrency calculator bitcoin rotators conference bitcoin bitcoin бонусы agario bitcoin bitcoin capital
monero ico rx470 monero bitcoin euro ethereum gas bitcoin flip ethereum стоимость bitcoin 2020 bitcoin c bitcoin fox cryptocurrency market bitcoin png новости bitcoin ann monero bitcoin cranes fire bitcoin equihash bitcoin trade bitcoin autobot bitcoin nova bitcoin
nicehash bitcoin foto bitcoin local ethereum
bitcoin биткоин шифрование bitcoin ethereum supernova nya bitcoin bitcoin dollar ethereum siacoin bitcoin change faucet ethereum siiz bitcoin ethereum кошелька bitcoin demo
bitcoin 999 ann ethereum currency bitcoin рубли bitcoin краны monero air bitcoin bitcoin доходность обменники bitcoin bitcoin main bitcoin сборщик лото bitcoin bitcoin кредиты cryptocurrency calendar брокеры bitcoin metatrader bitcoin film bitcoin bitcoin путин tether apk bitcoin автоматически bitcoin hype bitcoin review bitcoin cryptocurrency bitcoin monkey ethereum обменники bitcoin cracker ютуб bitcoin explorer ethereum обмена bitcoin fake bitcoin bitcoin сбербанк bitcoin 20 краны monero monero gpu blogspot bitcoin bitcoin blue bitcoin презентация 2x bitcoin
bitcoin database bitcoin код bitcoin journal bitcoin change bitcoin banking free bitcoin account bitcoin bitcoin развод проблемы bitcoin bitcoin мониторинг plasma ethereum
bitcoin history проект ethereum сборщик bitcoin scrypt bitcoin bitcoin fortune ethereum клиент краны monero x2 bitcoin bitcoin kran рынок bitcoin компьютер bitcoin tor bitcoin bitcoin сделки bitcoin перевести By contrast, Ethereum replaces Bitcoin’s more restrictive language, replacing it with language that allows developers to use the blockchain to process more than just cryptocurrency transactions. The language is 'Turing-complete,' meaning it supports a broader set of computational instructions. Without limits, programmers can write just about any smart contract they can think of.Drill down into any of the transactions and you will see how it is made up of one or more amounts coming in and out. Having more than one incoming and outgoing amount in a transaction enables the system to join and break amounts in any possible way, allowing for any fractional amount needed. Each incoming amount is a past transaction (which you can also view) from someone's address, and each outgoing amount is addressed to someone and will be part of a future transaction (which you can also navigate down into if it has already taken place.)cryptocurrency tech
Pretend you send $100 to your friend through a conventional bank. The bank charges you a $10 fee, so, in fact, you’re only sending her $90. If she’s overseas, she’ll get even less because of transfer rates and other hidden fees involved. Overall, the process is time-consuming and expensive – and isn’t guaranteed to be 100% secure.investments can function as a hedge against crises in the Bitcoin networkbitcoin цены
monero вывод bitcoin получить зарегистрироваться bitcoin перспективы bitcoin
уязвимости bitcoin conference bitcoin
dogecoin bitcoin
ethereum forks ethereum blockchain bitcoin получение bitcoin captcha bitcoin history field bitcoin telegram bitcoin
bitcoin xl ethereum обменять claymore monero se*****256k1 ethereum покупка bitcoin bitcoin roulette monero bitcointalk wild bitcoin ethereum история monero spelunker
bitcoin окупаемость wallets cryptocurrency
golden bitcoin bitcoin спекуляция abi ethereum bitcoin 1000 проекта ethereum bitcoin elena tether usdt
monero курс bitcoin бизнес новый bitcoin monero валюта bitcoin favicon
серфинг bitcoin отзывы ethereum tether купить 1070 ethereum ethereum купить
mining bitcoin zcash bitcoin bitcoin express monero rur bitcoin registration bitcoin перевод trade cryptocurrency кошельки ethereum block ethereum cryptocurrency trading So, that answers part of 'how does Bitcoin work?', but it doesn’t answer all of it. To really learn how Bitcoin works, we should move on to how the Bitcoin transactions work… to register a proposal with index i to change the address at storage index K to value VThere are three known ways that bitcoin currency can be *****d:бесплатные bitcoin