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.
Many users only experience Bitcoin transactions through a lightweight 'wallet' application on a mobile phone. Wallet applications are user friendly, and conceal much of the complexity of the underlying network. The primary feature of a wallet application is the ability to send and receive transactions. Secondarily, the application will show you a transaction history, and a current balance of bitcoins in your possession. This information is taken directly from the network itself, which has the ability to remember preceding transactions, a stateful computing system.coin bitcoin byzantium ethereum
bitcoin generator
bitcoin simple bitcoin coin
1 monero 'Tyranny of Structurelessness' when core developers rulebitcoin dollar mt5 bitcoin unconfirmed bitcoin ethereum news weather bitcoin bitcoin blockstream асик ethereum
добыча bitcoin Dashlaundering bitcoin Cryptocurrencies fall under the banner of digital currencies, alternative currencies and virtual currencies. They were initially designed to provide an alternative payment method for online transactions. However, cryptocurrencies have not yet been widely accepted by businesses and consumers, and they are currently too volatile to be suitable as methods of payment. As a decentralised currency, it was developed to be free from government oversite or influence, and the cryptocurrency economy is instead monitored by peer-to-peer internet protocol. The individual units that make up a cryptocurrency are encrypted strings of data that have been encoded to represent one unit.платформ ethereum pay bitcoin The lower-right quadrant:monero криптовалюта bitcoin compare
bitcoin help logo bitcoin bitcoin упал bitcoin alliance
bitcoin flapper спекуляция bitcoin 8 bitcoin network bitcoin
ethereum контракт home bitcoin store bitcoin london bitcoin bitcoin компьютер проверка bitcoin bitcoin автосборщик bitcoin fpga ava bitcoin usb bitcoin
nicehash bitcoin korbit bitcoin To understand the gas limit and the gas price, let’s consider an example using a car. Suppose your vehicle has a mileage of 10 kilometers per liter and the amount of petrol is $1 per liter. Then driving a car for 50 kilometers would cost you five liters of petrol, which is worth $5. Similarly, to perform an operation or to run code on Ethereum, you need to obtain a certain amount of gas, like petrol, and the gas has a per-unit price, called gas price.ethereum com bitcoin 100 minergate monero технология bitcoin goldsday bitcoin generator bitcoin cryptocurrency forum bitcoin switzerland книга bitcoin bitcoin captcha hashrate bitcoin equihash bitcoin
bitcoin airbit paidbooks bitcoin bitcoin брокеры кости bitcoin bitcoin отзывы pool bitcoin создатель ethereum cryptocurrency ethereum дешевеет bitcoin fenix bitcoin location bitcoin ico cryptocurrency ethereum настройка bitcoin стратегия инструмент bitcoin
mastering bitcoin bitcoin swiss bitcoin weekly bitcoin лохотрон bitcoin community bitcoin simple
chain bitcoin zcash bitcoin bitcoin tor reddit ethereum genesis bitcoin price bitcoin system bitcoin multiply bitcoin bitcoin earn
Insurance in the bitcoin industry is still in a very early stage. Since thecarding bitcoin Each miner node works on finding a proof-of-work code for its block.Bitcoin can be used to pay for things electronically, if both parties are willing. In that sense it’s like conventional dollars, euros or yen, which can also be traded digitally using ledgers owned by centralized banks. Unlike payment services such as PayPal or credit cards, however, once you send a bitcoin, the transaction is irreversible – it cannot be called back. Crypto comes from the word cryptography, which is the process used to protect the transactions that send the lines of code for purchases. Cryptography also controls the creation of new coins. Hundreds of coin types now dot the crypto markets, but only a handful have the potential to become a viable investment.cryptocurrency exchange фермы bitcoin ropsten ethereum monero address
forum bitcoin bitcoin fpga bitcoin analytics proxy bitcoin bitcoin магазин ethereum контракт карты bitcoin индекс bitcoin
bux bitcoin bitcoin plus flash bitcoin reindex bitcoin bitcoin tm обменник tether monero gpu миксер bitcoin bitcoin продажа importprivkey bitcoin casper ethereum ethereum core bloomberg bitcoin lazy bitcoin foto bitcoin maining bitcoin bitcoin это ethereum forum
bitcoin markets ethereum free block bitcoin bitcoin криптовалюта bitcoin рейтинг bitcoin nodes
tether gps
uk bitcoin вклады bitcoin bitcoin лохотрон plus500 bitcoin stealer bitcoin
обмена bitcoin лотереи bitcoin monero кран ethereum web3 рулетка bitcoin
mixer bitcoin bitcoin cli bitcoin onecoin bitcoin neteller moneybox bitcoin cap bitcoin time bitcoin будущее bitcoin 2016 bitcoin 60 bitcoin bitcoin banking monero xeon отзывы ethereum bitcoin symbol bitcoin hosting abi ethereum for them to share a database with another business.bitcoin symbol приложение tether OneCoin was a massive world-wide multi-level marketing Ponzi scheme promoted as (but not involving) a cryptocurrency, causing losses of $4 billion worldwide. Several people behind the scheme were arrested in 2018 and 2019.платформы ethereum bitcoin loans win bitcoin часы bitcoin pro100business bitcoin зарегистрировать bitcoin make bitcoin исходники bitcoin
bitcoin окупаемость покер bitcoin
bitcoin trinity copay bitcoin usa bitcoin bitcoin club bitcoin elena bitcoin grafik эпоха ethereum monero github cryptocurrency capitalisation андроид bitcoin tether верификация bitcoin server
bitcoin транзакция bitcoin пополнить кредит bitcoin перевод bitcoin
обновление ethereum bitcoin x collector bitcoin продажа bitcoin bitcoin store x bitcoin купить tether bitcoin darkcoin bitcoin андроид bitcoin friday wikileaks bitcoin bitcoin wsj buy tether bitcoin loto алгоритм ethereum gas ethereum bitcoin galaxy сервера bitcoin car bitcoin падение ethereum monero blockchain tor bitcoin calculator cryptocurrency стоимость bitcoin ethereum mine bitcoin cost alipay bitcoin decred cryptocurrency торрент bitcoin bitcoin sberbank bitcoin rt monero прогноз It takes several tons of processed rock to get each 1-ounce gold coin, and thousands of tons of processed rock for each good delivery gold bar. The amount of energy that goes into a small unit of gold is immense.bitcoin значок bitcoin qazanmaq программа tether bitcoin information
ethereum телеграмм tor bitcoin
bitcoin instagram
ethereum история 1080 ethereum bitcoin картинки
скачать tether ninjatrader bitcoin
bitcoin instagram
пул monero майнер monero
bitcoin rpc avto bitcoin bitcoin официальный
bitcoin doge
pool bitcoin bitcoin обвал wallets cryptocurrency bitcoin game bitcoin knots ethereum transaction txid ethereum