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.
график monero ethereum проекты кости bitcoin bitcoin технология ethereum russia
ethereum web3
bitcoin machine bitcoin валюты
bitcoin converter bitcoin air mikrotik bitcoin pos bitcoin Smart contract (backend code)Today, in exchange for their personal data people can use social media platforms like Facebook for free. In future, users will have the ability to manage and sell the data their online activity generates. Because it can be easily distributed in small fractional amounts, Bitcoin — or something like it — will most likely be the currency that gets used for this type of transaction.• It is a digital bearer asset similar to a commodity.Bitcoin was launched in January of 2009. It introduced a novel idea set out in a white paper by the mysterious Satoshi Nakamoto—bitcoin offers the promise of an online currency that is secured without any central authority, unlike government-issued currencies. There are no physical bitcoins, only balances associated with a cryptographically secured public ledger. Although bitcoin was not the first attempts at an online currency of this type, it was the most successful in its early efforts, and it has come to be known as a predecessor in some way to virtually all cryptocurrencies which have been developed over the past decade.1wired tether euro bitcoin lightning bitcoin фермы bitcoin global bitcoin
homestead ethereum cryptocurrency top play bitcoin bitcoin goldmine bitcoin информация bitcoin carding
up bitcoin DASH mixing. Source: DASH whitepaperbitcoin indonesia bitcoin рухнул ethereum pools bitcoin игры bitcoin express tera bitcoin bitcoin рбк
bitcoin markets майнинг tether bitcoin scan рейтинг bitcoin покер bitcoin
краны monero bitcoin заработок cryptocurrency gold ethereum script пожертвование bitcoin cryptonator ethereum ethereum ubuntu взлом bitcoin wirex bitcoin bitcoin сети hacking bitcoin эпоха ethereum ethereum faucet ethereum alliance bitcoin monkey
bitcoin hype bitcoin автоматически Alice alone can withdraw a maximum of 1% of the funds per day.mini bitcoin
ethereum blockchain автомат bitcoin
pow bitcoin robot bitcoin bitcoin miner ethereum coins space bitcoin
bcn bitcoin ethereum клиент bitcoin metal monero кошелек bazar bitcoin bitcoin testnet bitcoin работа bitcoin обозреватель биржа ethereum xpub bitcoin ethereum bitcoin alert bitcoin calc cubits bitcoin bitcoin пузырь adbc bitcoin *****a bitcoin зарабатывать ethereum
платформу ethereum usb tether bitcoin farm cryptocurrency converter little bitcoin genesis bitcoin blockchain ethereum ethereum frontier
bitcoin форум
ethereum contracts график ethereum bitcoin blockstream accepts bitcoin airbitclub bitcoin bitcoin habr 22 bitcoin bitcoin analytics
bazar bitcoin ethereum coins bitcoin paypal ninjatrader bitcoin bitcoin пополнение теханализ bitcoin
кран bitcoin bitcoin today bitcoin bloomberg bitcoin school green bitcoin network bitcoin bitcoin trezor bitcoin prominer However, as the bitcoin ecosystem has grown over the past few years, privacy concerns seem to have been pushed to the backburner.bitcoin разделился bitcoin api обмен ethereum ethereum клиент протокол bitcoin bitcoin приват24 bitcoin pro miner bitcoin magic bitcoin математика bitcoin bitcoin fee заработать bitcoin tether app cryptocurrency gold
ethereum покупка
monero free iso bitcoin protocol bitcoin bitcoin ru bitcoin skrill 6000 bitcoin bitcoin service
bitcoin school monero криптовалюта ethereum crane car bitcoin андроид bitcoin регистрация bitcoin cryptocurrency calculator free ethereum blitz bitcoin tether пополнение ethereum news ethereum blockchain alien bitcoin краны monero
wallets cryptocurrency скачать bitcoin On Coinbase, you can buy major cryptocurrencies likeпадение ethereum se*****256k1 bitcoin bitcoin роботы However, Bitcoin, in typical bullet-biting fashion, selects the less palatable of the two choices — capped supply and a fee market — in order to obtain a trait its users find desirable: genuine, unimpeachable scarcity. Whether it will work is to be determined; Bitcoin will have to grow its transaction volume and transactors will have to remain comfortable paying for block space in perpetuity. The most comprehensive take on how fees might develop comes from Dan Held.bitcoin банкнота bitcoin maps bitcoin аккаунт
sberbank bitcoin bitcoin get blog bitcoin stake bitcoin ethereum асик форекс bitcoin bitcoin fund bitcoin принимаем
bitcoin blockchain vector bitcoin ethereum хардфорк asics bitcoin bitcoin адреса space bitcoin картинки bitcoin bitcoin завести ethereum online ethereum gas check bitcoin bitcoin проект segwit bitcoin surf bitcoin
finex bitcoin падение ethereum safe bitcoin инструкция bitcoin
bitcoin талк
love bitcoin cryptocurrency dash bitcoin торговать bitcoin список bitcoin magazine проекта ethereum bitcoin описание bitcoin аккаунт bitcoin legal bitcoin япония
bitcoin btc dat bitcoin bitcoin forum bitcoin fpga
ethereum markets майнер bitcoin приложение tether bitcoin instagram bitcoin china bloomberg bitcoin
tera bitcoin faucet bitcoin заработок ethereum payoneer bitcoin bitcoin now bitcoin будущее panda bitcoin
bitcoin converter ethereum покупка bitcoin автор
tails bitcoin миксеры bitcoin bitcoin вконтакте nanopool ethereum bitcoin evolution майнить monero
accepts bitcoin ethereum перспективы bitcoin прогноз 4 bitcoin tether clockworkmod
bitcoin значок ethereum контракты bitcoin 2010 lamborghini bitcoin генераторы bitcoin bitcoin save bitcoin nachrichten
tether верификация создатель bitcoin
currency bitcoin minergate ethereum ninjatrader bitcoin get bitcoin bitcoin обозначение ethereum доллар продам ethereum bitcoin github rinkeby ethereum bitcoin казино
moneybox bitcoin daemon bitcoin форк bitcoin приват24 bitcoin
сети bitcoin bubble bitcoin
скачать tether андроид bitcoin cryptocurrency dash iphone bitcoin masternode bitcoin bitcoin приложение bitcoin video bitcoin machine bitcoin проблемы bitcoin fasttech
metropolis ethereum byzantium ethereum Satoshi only ever spoke on internet message boards and in emails. By April 2011, Satoshi was gone. All that’s left of Satoshi Nakamoto is Bitcoin — and the name.99 bitcoin прогнозы ethereum ethereum хешрейт bitcoin cost cryptocurrency tech alien bitcoin zebra bitcoin bitcoin обменники bitcoin падение
bitcoin cryptocurrency bitcoin convert пицца bitcoin ethereum dag
bitcoin фермы forum bitcoin lurkmore bitcoin bitcoin lurk порт bitcoin платформ ethereum bitcoin войти bitcoin banking
boom bitcoin wikipedia cryptocurrency cryptocurrency price падение ethereum bitcoin sha256 claim bitcoin 2016 bitcoin bitcoin core bitcoin frog ethereum os bitcoin goldman cryptocurrency law ethereum pools bitcoin capitalization ethereum blockchain ethereum заработок registration bitcoin ethereum calculator кости bitcoin bitcoin компания
999 bitcoin bitcoin бесплатный roulette bitcoin ethereum alliance alipay bitcoin bittorrent bitcoin конвертер bitcoin asrock bitcoin simplewallet monero electrodynamic tether
bitcoin today go ethereum card bitcoin bitcoin qt new cryptocurrency bitcoin birds se*****256k1 ethereum
ethereum доллар криптовалюта tether ethereum info инструкция bitcoin bitcoin start bitcoin книга monero address использование bitcoin яндекс bitcoin bitcoin valet bitcoin asic
bank bitcoin hyip bitcoin Main article: Online transaction processingbitcoin torrent
Mining is the key innovation that makes decentralized record-keeping possible.100 bitcoin