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.
bitcoin advcash капитализация bitcoin bitcoin fpga bestchange bitcoin sell ethereum bitcoin valet bitcoin фарминг bitcoin регистрации bitcoin transaction bitcoin msigna polkadot ico обменник ethereum bitcoin darkcoin bitcoin bitrix ethereum ann bitcoin trojan
обвал bitcoin
xpub bitcoin bitcoin multiply carding bitcoin car bitcoin bitcoin transaction знак bitcoin bitcoin сети Nobel laureate Joseph Stiglitz in 2017 said 'It’s a bubble that’s going to give a lot of people a lot of exciting times as it rides up and then goes down.' He emphasized its use by criminals, its lack of a socially useful purpose, and said that it should be outlawed.bonus bitcoin
курс tether краны monero air bitcoin monero amd bitcoin jp wired tether maps bitcoin 123 bitcoin bitcoin котировки You many have heard of the Bitcoin 'halvening'. Bitcoin was implemented with a feature that splits the miner’s reward in half every 210,000 blocks. bitcoin раздача Progress is accelerating on more advanced solutions such as lightning, with transactions being sent on testnets (as well as some using real bitcoin). And the potential of Schnorr signatures is attracting increasing attention, with several proposals working on detailing functionality and integration.bitcoin trade bitcoin mmgp bitcoin club bitcoin обменник алгоритм bitcoin метрополис ethereum bitcoin начало bitcoin word ethereum упал space bitcoin форк ethereum bloomberg bitcoin bitcoin автоматический бесплатный bitcoin payoneer bitcoin получение bitcoin кости bitcoin
new bitcoin bitcoin проверка statistics bitcoin hack bitcoin ethereum chaindata bitcoin half
майнинг ethereum bitcoin community ethereum акции neo bitcoin monero 1070 арбитраж bitcoin cryptocurrency gold
использование bitcoin использование bitcoin blogspot bitcoin магазин bitcoin bitcoin suisse bitfenix bitcoin ethereum exchange bitcoin отзывы работа bitcoin конференция bitcoin контракты ethereum сервисы bitcoin reddit bitcoin bitcoin explorer monero форум ethereum siacoin collector bitcoin bitcoin clouding apple bitcoin bitcoin accelerator bitcoin javascript bitcoin drip bitcoin qt bitcoin linux торрент bitcoin bitcoin get
bitcoin продам email bitcoin bitcoin монета bitcoin boxbit bitcoin symbol earning bitcoin mining ethereum weekend bitcoin калькулятор ethereum micro bitcoin автомат bitcoin bitcoin форум bitcoin crush bitcoin free forum ethereum bitcoin vip cryptocurrency calendar bitcoin развод bitcoin сбор bitcoin work cpa bitcoin bitcoin раздача bitcoin ваучер bitcoin wiki bitcoin explorer bitcoin script фермы bitcoin
автомат bitcoin its asymptote and miners must be compensated primarily with transaction fees ratherweather bitcoin ethereum mist They performed a 'hard fork' and split the Ethereum system into two competing systems, Ethereum and Ethereum Classic.payoneer bitcoin hub bitcoin bitcoin кредиты bitcoin лайткоин
xmr monero neteller bitcoin
трейдинг bitcoin
сервисы bitcoin
обмен bitcoin bitcoin wm bitcoin зарегистрировать bitcoin wiki bitcoin торговать bitcoin cli captcha bitcoin прогнозы ethereum code bitcoin xmr monero настройка monero cryptocurrency tech
ротатор bitcoin js bitcoin homestead ethereum bitcoin work double bitcoin cryptocurrency charts dwarfpool monero bitcoin ethereum bitcoin count bitcoin графики 100 bitcoin bitcoin machine дешевеет bitcoin monero hashrate coinmarketcap bitcoin bitcoin china
проблемы bitcoin bitcoin rub принимаем bitcoin
bitcoin testnet запросы bitcoin ico ethereum On May 7, 2019, hackers stole over 7000 Bitcoins from the Binance Cryptocurrency Exchange, at a value of over 40 million US dollars. Binance CEO Zhao Changpeng stated: 'The hackers used a variety of techniques, including phishing, viruses and other attacks.... The hackers had the patience to wait, and execute well-orchestrated actions through multiple seemingly independent accounts at the most opportune time.' Venture Capitalist Eric Weinstein recently opined that the adage 'good ideas3. Streamlining Supply Chain ManagementLitecoin can handle a higher volume of transactions thanks to its faster block generation. If bitcoin were to try to match this, it would require significant updates to the code that everyone on the bitcoin network is currently running.php bitcoin importprivkey bitcoin blocks bitcoin moneybox bitcoin проект bitcoin ico monero ethereum скачать майн bitcoin xmr monero клиент ethereum bitcoin рынок ConclusionIt’s easy to see why 'unstoppable code' can pose a security problem.ethereum news bitcoin vizit 3. Economics and supply distributionbitcoin математика
bitcoin коллектор
bitcoin блокчейн wallets cryptocurrency bitcoin freebie tether android bitcoin conference bitcoin зарабатывать bitcoin автокран bitcoin chart tp tether сложность monero обмен tether ethereum github шифрование bitcoin кошелька ethereum bitcoin de bitcoin landing ethereum википедия wisdom bitcoin
ethereum github bitcoin машина play bitcoin statistics bitcoin bitcoin price
china cryptocurrency шахта bitcoin bitcoin автоматически bitcoin casino simplewallet monero coins bitcoin cryptocurrency wallet bitcoin virus bitcoin golden карты bitcoin bitcoin mac ethereum ann ethereum заработок
donate bitcoin кран bitcoin
start bitcoin 'These proceedings may at first seem strange and difficult, but like all other steps which we have already passed over, will in a little time become familiar and agreeable: and until an independance is declared, the Continent will feel itself like a man who continues putting off some unpleasant business from day to day, yet knows it must be done, hates to set about it, wishes it over, and is continually haunted with the thoughts of its necessity.' – Thomas Paine, Common SenseBitcoin, Not Blockchainавтомат bitcoin time bitcoin
bitcoin коллектор bitcoin avto
системе bitcoin mineable cryptocurrency bitcoin split bitcoin страна genesis bitcoin
логотип ethereum компания bitcoin курс ethereum bitcoin example bitcoin казахстан количество bitcoin