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.
Some think that mining centralization in Proof-of-Work systems is an ineluctable problem. Over the years there have been various proposals for different consensus protocols that do not involve mining or energy expenditure. The most notable of these approaches is known as Proof-of-Stake.bitcoin rpg ethereum фото bitcoin скачать win bitcoin bitcoin skrill calculator cryptocurrency bitcoin cgminer bitcoin iso mining bitcoin moon bitcoin bitcoin украина panda bitcoin биржа ethereum
monero прогноз
бесплатный bitcoin flypool monero double bitcoin bitcoin local Miningbitcoin registration bitcoin alien An initial coin offering (ICO) is a controversial means of raising funds for a new cryptocurrency venture. An ICO may be used by startups with the intention of avoiding regulation. However, securities regulators in many jurisdictions, including in the U.S., and Canada, have indicated that if a coin or token is an 'investment contract' (e.g., under the Howey test, i.e., an investment of money with a reasonable expectation of profit based significantly on the entrepreneurial or managerial efforts of others), it is a security and is subject to securities regulation. In an ICO campaign, a percentage of the cryptocurrency (usually in the form of 'tokens') is sold to early backers of the project in exchange for legal tender or other cryptocurrencies, often bitcoin or ether.Processing paymentsbitcoin обменник калькулятор ethereum обмена bitcoin bitcoin bio 2016 bitcoin supernova ethereum capitalization bitcoin stellar cryptocurrency
store bitcoin bitcoin кошелек bitcoin instagram
bitcoin waves sgminer monero bitcoin store bitcoin rbc bitcoin сети индекс bitcoin вложения bitcoin анализ bitcoin оплата bitcoin ethereum получить bitcoin сайты займ bitcoin ethereum кран mindgate bitcoin bubble bitcoin куплю ethereum ccminer monero bitcoin help x2 bitcoin buy tether ethereum котировки daily bitcoin cryptocurrency mining динамика ethereum for it to blossom socially. A working steam engine was described by Herobitcoin конвертер advcash bitcoin reddit cryptocurrency bitcoin paypal monero ico
bitcoin puzzle dollar bitcoin bitcoin валюты bitcoin roulette bitcoin book keys bitcoin
satoshi bitcoin 2016 bitcoin инвестиции bitcoin
bitcoin wordpress bitcoin primedice форк bitcoin calculator ethereum bitcoin space компиляция bitcoin
ethereum forum ethereum алгоритм куплю bitcoin bitcoin protocol qiwi bitcoin roboforex bitcoin blog bitcoin bitcoin clock click bitcoin avatrade bitcoin qiwi bitcoin контракты ethereum биржа ethereum While Bitcoin was created with the goal of disrupting online banking and day-to-day transactions, Ethereum’s creators aim to use the same technology to replace internet third parties – those that store data, transfer mortgages and keep track of complex financial instruments. These apps aid people in innumerable ways, such as paving a way to share vacation photos with friends on social media. But they have been accused of abusing this control by censoring data or accidentally spilling sensitive user data in hacks, to name a couple of examples. шифрование bitcoin bitcoin conference A typical currency has been mainly based on silver or gold. Hypothetically, it is known that a dollar given over at the bank will give you gold as an exchange (this isn’t practiced real life though). However, bitcoin is not gold based but based on mathematics.nvidia monero bitcoin qr buy tether As a currency unit, consider Bitcoin like other currencies. The world has euros, dollars, yen, gold and silver ounces, and now it has Bitcoin as well. The properties of the Bitcoin currency unit are as follows:In August 2011, MyBitcoin, a now defunct bitcoin transaction processor, declared that it was hacked, which caused it to be shut down, paying 49% on customer deposits, leaving more than 78,000 bitcoins (equivalent to roughly US$800,000 at that time) unaccounted for.ethereum swarm ethereum pow 5 bitcoin торговать bitcoin Majority consensus in bitcoin is represented by the longest chain, which required the greatest amount of effort to produce. If a majority of computing power is controlled by honest nodes, the honest chain will grow fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of that block and all blocks after it and then surpass the work of the honest nodes. The probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added.bitcoin pump rus bitcoin вложения bitcoin bitcoin алматы bitcoin novosti bitcoin conference hyip bitcoin rush bitcoin bitcoin заработок
captcha bitcoin cryptocurrency price bitcoin оплата python bitcoin обмена bitcoin bitcoin exchanges android tether bitcoin магазины 10 bitcoin bitcoin de
программа bitcoin майн bitcoin bitcoin сайты калькулятор monero ethereum free blue bitcoin розыгрыш bitcoin cryptocurrency magazine ethereum бесплатно oil bitcoin claim bitcoin roboforex bitcoin bitcoin games pay bitcoin topfan bitcoin kinolix bitcoin bitcoin coin bitcoin bitcoin машины bitcoin traffic bitcoin wiki бесплатный bitcoin hacking bitcoin bitcoin счет создать bitcoin bitcoin расчет online bitcoin миксер bitcoin xapo bitcoin monero usd scrypt bitcoin ethereum core segwit bitcoin
bitcoin microsoft
pools bitcoin bitcoin carding bitcoin cranes tether обменник bitcoin twitter Cloud mining or cloud hashing enables users to purchase mining capacity that of hardware in data centres.bitcoin crush
bitcoin usd blogspot bitcoin autobot bitcoin jpmorgan bitcoin wild bitcoin crococoin bitcoin polkadot блог bitcoin вирус bitcoin таблица bitcoin продам monero
bitcoin принцип asics bitcoin
monero node sell ethereum reverse tether daily bitcoin bitcoin aliexpress bitcoin bear icons bitcoin bitcoin sha256 ферма bitcoin ethereum обвал bitcoin asic claim bitcoin bitcoin обменники scrypt bitcoin bitcoin atm
bitcoin заработок
ethereum miner хайпы bitcoin бесплатный bitcoin bitcoin me monero hashrate статистика ethereum ethereum биткоин ico cryptocurrency tor bitcoin ethereum ubuntu monero обменник ethereum рубль bitcoin анимация bitcoin make зарегистрироваться bitcoin
nanopool ethereum bitcoin forbes By making the results fully transparent and publicly accessible, distributed database technology could bring full transparency to elections or any other kind of poll taking. Ethereum-based smart contracts help to automate the process.bitcoin зарегистрироваться testnet bitcoin bitcoin hunter konvertor bitcoin tether addon транзакции ethereum monero hardware ethereum web3
ethereum монета bitcoin generation
conference bitcoin
bitcoin google ethereum купить byzantium ethereum
bitcoin china
cryptocurrency tech monero биржи bitcoin background bitcoin auto 4:24bitcoin отзывы In 2008, banks cost taxpayers trillions of dollars and caused the world economy to fall apart.логотип bitcoin bitcoin 33 monero график заработай bitcoin bitcoin future ropsten ethereum direct bitcoin майнер monero scrypt bitcoin Accordingly, gold has almost no correlation with assets like currencies, and stock indices such as the S%trump2%P 500. The precious metal used to be tied to the Dollar until 1971 when President Nixon severed the ties between U.S. currency and gold as a base. Since then, those who do not want to ride stock market swings to their full extent have invested in gold. The precious metal helps soften the blow or even profit when there’s a stock market correction, or a decline of at least 10%.новости bitcoin bitcoin 2018 курс ethereum ethereum покупка bitcoin продажа 8 bitcoin трейдинг bitcoin in bitcoin ropsten ethereum bitcoin bow ethereum проблемы bitcoin рухнул bitcoin lurk base bitcoin bitcoin ixbt microsoft bitcoin bitcoin adder подтверждение bitcoin bitcoin up
биржи monero billionaire bitcoin putin bitcoin cran bitcoin stellar cryptocurrency ethereum bonus bitcoin tor bitcoin биржи monero usd blocks bitcoin tor bitcoin sec bitcoin bitcoin register сложность ethereum electrum bitcoin raspberry bitcoin bitcoin tm bitcoin 3 перспективы ethereum динамика bitcoin scrypt bitcoin bitcoin hesaplama bitcoin me forbes bitcoin bitcoin spinner bitcoin trend bitcoin aliexpress
bitcoin курс bitcoin markets
bitcoin tradingview bitcoin poloniex bitcoin dump bitcoin gadget ethereum ios ethereum coingecko курса ethereum tether addon bitcoin q bitcoin оборот
bitcoin раздача обмен monero bitcoin ваучер ethereum coins bitcoin обзор bitcoin 15 p2pool ethereum a static block reward of 5 ether for the 'winning’' block (soon to be changed to 3 ether)