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.
main bitcoin bitcoin weekly bitcoin ключи
bitcoin node
цена ethereum сложность monero bitcoin 4096 currency bitcoin bitcoin подтверждение alpari bitcoin bitcoin комиссия bitcoin get bitcoin coins reddit cryptocurrency ethereum calculator
ethereum price bitcoin hardfork bitcoin shops перспектива bitcoin окупаемость bitcoin bitcoin direct bitcoin автосерфинг bitcoin coingecko
аналитика bitcoin bitcoin blocks
monero cryptonote joker bitcoin
bitcoin 3d map bitcoin bitcoin me bitcoin hosting tether ico
bitcoin презентация
ethereum icon рубли bitcoin monero cryptonight
to the version deemed most useful by its users. Lastly, an organized attack isbitcoin air 16 bitcoin Monero Mining: Full Guide on How to Mine Moneroхалява bitcoin ubuntu bitcoin pps bitcoin bitcoin hashrate stealer bitcoin ethereum прибыльность bitcoin poloniex 100 bitcoin daemon bitcoin masternode bitcoin ethereum clix bitcoin мошенники сложность ethereum алгоритм monero bitcoin capitalization bitcoin брокеры ethereum siacoin bitcoin вложить bitcoin background bitcoin dat мониторинг bitcoin lazy bitcoin android tether monero вывод fx bitcoin ethereum асик bitcoin динамика tether программа mindgate bitcoin tether bootstrap bitcoin site cryptocurrency market monero wallet bitcoin генератор dog bitcoin accelerator bitcoin bitcoin вложить cryptocurrency bitcoin значок bitcoin bitcoin капча reddit bitcoin bitcoin книга продаю bitcoin check bitcoin ethereum контракт обмен bitcoin конвертер bitcoin bitcoin автосборщик bitcoin компьютер ethereum os
ethereum platform arbitrage bitcoin
bitcoin tracker кран bitcoin bitcoin lucky bitcoin заработок сайте bitcoin ethereum miners solo bitcoin asics bitcoin обвал ethereum обменники bitcoin ethereum asic bitcoin qr monero nvidia monero калькулятор сбербанк bitcoin bitcoin работать bitcoin avto видеокарта bitcoin segwit bitcoin bitcoin алгоритм bitcoin darkcoin bitcoin win bitcoin keywords bitcoin nedir bitcoin flip nodes bitcoin doubler bitcoin It is worth noting that the aforementioned thefts and the ensuing news about the losses had a double effect on volatility. They reduced the overall float of bitcoin, producing a potential lift on the value of the remaining bitcoin due to increased scarcity. However, overriding this lift was the negative effect of the news cycle that followed. bitcoin spinner instaforex bitcoin 600 bitcoin ads bitcoin таблица bitcoin цена ethereum bitcoin hd что bitcoin майнер bitcoin bitcoin strategy cryptocurrency gold bitcoin half total cryptocurrency
bitcoin сервисы bye bitcoin system bitcoin форумы bitcoin ethereum обменники satoshi bitcoin купить bitcoin
ethereum токены bitcoin отзывы takara bitcoin cryptocurrency calculator playstation bitcoin bitcoin заработок bitfenix bitcoin tether отзывы trinity bitcoin invest bitcoin добыча bitcoin bitcoin шифрование bitcoin программа bitcoin coin
ethereum addresses обменник ethereum Time preference as a concept is described at length in the Bitcoin Standard by Saifedean Ammous. While the book is a must read and no summary can do it justice, individuals can have lower time preference (weighting the future over the present) or a higher time preference (weighting the present over the future), but everyone has a positive time preference. As a tool, money is merely a utility in coordinating the economic activity necessary to produce the things that people actually value and consume in their daily lives. Given that time is inherently scarce and that the future is uncertain, even those that plan and save for the future (low time preference) are predisposed to value the present over the future on the margin. Taken to an extreme just to make the point, if you made money and literally never spent a dime (or a sat), it wouldn’t have done you any good. So even if money were increasing in value over time, consumption or investment in the present has an inherent bias over the future, on average, because of positive time preference and the existence of daily consumption needs that must be satisfied for survival (if not for want).bitcoin loan миллионер bitcoin my ethereum bitcoin location bitcoin 3 bitcoin 2x bitcoin symbol bitcoin casinos bitcoin currency calculator bitcoin best cryptocurrency bitcoin banking tether верификация dark bitcoin chaindata ethereum выводить bitcoin bitcoin миксеры Ключевое слово bitcoin currency bitcoin xpub mt5 bitcoin bitcoin пул bitcoin keys ethereum solidity bitcoin депозит bitcoin компьютер bitcoin greenaddress
bitcoin london ethereum описание ethereum pos bitcoin биржи игра ethereum ethereum pool bitcoin fasttech bitcoin paw
fake bitcoin my ethereum
Few people know, but cryptocurrencies emerged as a side product of another invention. Satoshi Nakamoto, the unknown inventor of Bitcoin, the first and still most important cryptocurrency, never intended to invent a currency.This episode in bitcoin’s history demonstrated that no one was in control of the network. Not even the most powerful companies and miners, practically all aligned, could change bitcoin. It was an incontrovertible demonstration of the network’s resistance to censorship. It may have seemed like an inconsequential change. A majority of participants probably supported the increase in the block size (or at least the idea), but it was always a marginal issue, and when it comes to change, bitcoin’s default position is no. Only an overwhelming majority of all participants (naturally with competing priorities) can change the network’s consensus rules. And it really was never a debate about block size or transaction capacity. What was at stake was whether or not bitcoin was sufficiently decentralized to prevent external and powerful forces from influencing the network and changing the consensus rules. See, it’s a slippery slope. If bitcoin were susceptible to change by the dictate of a few centralized companies and miners, it would have established that bitcoin were censorable. And if bitcoin were censorable, then all bets would be off. There would have been no reasonable basis to believe that other future changes would not be forced on the network, and ultimately, it would have impaired the credibility of bitcoin’s fixed 21 million supply.