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 акции ethereum окупаемость bitcoin
bitcoin казино
bitcoin weekly настройка monero bitcoin торговать оплатить bitcoin auction bitcoin tradingview bitcoin monero miner будущее bitcoin value bitcoin bitcoin карта bitcoin калькулятор in bitcoin
bitcoin сервера frontier ethereum In its simplest form, a distributed ledger is a database held and updated independently by each participant (or node) in a large network. The distribution is unique: records are not communicated to various nodes by a central authority, but are instead independently constructed and held by every node. That is, every single node on the network processes every transaction, coming to its own conclusions and then voting on those conclusions to make certain the majority agree with the conclusions.bitcoin check
linux bitcoin bitcoin kaufen bitcoin сервисы блок bitcoin
bitcoin серфинг bitcoin analysis
краны ethereum Custodial: Custodial wallets take care of your private key, which is like a password to your money. This is an easy option for users who are new to Ethereum or worried about losing their private key. However, with this type of wallet, users are still relying on a third party, which poses its own risks. These entities can get hacked, for instance.bitcoin hype tether перевод ethereum course bitcoin markets Below, we’ll examine some of the most important digital currencies other than Bitcoin. First, though, a caveat: it is impossible for a list like this to be entirely comprehensive. One reason for this is the fact that there are more than 4,000 cryptocurrencies in existence as of January 2021. While many of these cryptos have little to no following or trading volume, some enjoy immense popularity among dedicated communities of backers and investors.bitcoin zone рынок bitcoin bitcoin выиграть ethereum project monero usd conference bitcoin stellar cryptocurrency bitcoin пулы bitcoin flapper blockchain monero зарегистрироваться bitcoin cudaminer bitcoin bitcoin sberbank
bitcoin пул ethereum стоимость сделки bitcoin
кости bitcoin
secp256k1 ethereum сервисы bitcoin развод bitcoin buy ethereum monero hashrate bitcoin пулы time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp inbitcoin получить From this struggle and melting pot of ideas emerged the Dutch and British goldenethereum core обмен monero блоки bitcoin bitrix bitcoin sberbank bitcoin
bitcoin mempool кошелька bitcoin мавроди bitcoin магазин bitcoin кошель bitcoin кредиты bitcoin bitcoin fasttech cryptocurrency tech
bitcoin лохотрон отзывы ethereum cryptonight monero difficulty monero
cryptocurrency law bitcoin 1000 joker bitcoin spend bitcoin bitcoin payeer bitcoin 2000 bitcoin spend bitcoin betting блокчейна ethereum bcc bitcoin space bitcoin bitcoin masters запросы bitcoin
клиент ethereum cryptocurrency law описание ethereum short bitcoin lealana bitcoin ethereum бесплатно пулы monero
1 ethereum bitcoin legal bitcoin серфинг invest bitcoin bitcoin grant bitcoin cc red bitcoin coinder bitcoin конвертер ethereum bitcoin основы ethereum пул игры bitcoin ethereum microsoft sha256 bitcoin bitcoin казино cryptocurrency calendar bitcoin заработать bitcoin prominer monero logo asic monero bitcoin компьютер bitcoin like email bitcoin monero обменять вложения bitcoin bitcoin казино reverse tether cryptocurrency calculator bitcoin boom hashrate bitcoin статистика ethereum monero кран bitcoin вконтакте download bitcoin bitcoin analysis ethereum картинки bubble bitcoin bitcoin poloniex bitcoin symbol
bitcoin online tether gps bitcoin super смысл bitcoin bitcoin бизнес monero algorithm auto bitcoin ethereum форум перспектива bitcoin криптовалюта tether etoro bitcoin
bitcoin безопасность bitcoin virus
linux bitcoin
ethereum ubuntu bitcoin анализ aml bitcoin bitcoin биткоин ethereum упал калькулятор monero ethereum акции сети ethereum block bitcoin get bitcoin
bitcoin 20 bitcoin co bitcoin login bitcoin dogecoin bitcoin бесплатные форк bitcoin monero вывод bitcoin ann Ключевое слово bitcoin 2000 bitcoin приложения ninjatrader bitcoin bitcoin double
r bitcoin bitcoin перевод bitcoin prices bitcoin loan bitcoin смесители
ethereum обмен habr bitcoin my ethereum 999 bitcoin 100 bitcoin приложение bitcoin обновление ethereum coinwarz bitcoin monero bitcointalk bitcoin mmgp
bitcoin скрипт торги bitcoin golden bitcoin arbitrage bitcoin bitcoin virus bitcoin daily car bitcoin bitcoin analysis monero amd
bitcoin краны credit bitcoin bitcoin uk проекты bitcoin bitcoin synchronization bitcoin valet nanopool monero bitcoin key 22 bitcoin invest bitcoin
bitcoin froggy lamborghini bitcoin abc bitcoin ethereum web3 фарминг bitcoin bitcoin брокеры bitcoin genesis dog bitcoin block bitcoin pool bitcoin multiply bitcoin monero asic
p2pool ethereum ubuntu bitcoin ethereum supernova exchanges bitcoin blacktrail bitcoin bitcoin pdf polkadot блог mine ethereum dag ethereum вход bitcoin ad bitcoin tera bitcoin bitcoin central bitcoin blue ethereum stats bitcoin weekend bitcoin лого alpha bitcoin secp256k1 ethereum exchanges bitcoin json bitcoin
bitcoin crash
faucet bitcoin эмиссия bitcoin bitcoin transactions
game bitcoin bitcoin сети bitcoin ukraine bitcoin vk cold bitcoin
bitcoin system bitcoin мониторинг
bitcoin easy bitcoin bitcointalk bitcoin рубли ethereum биржа android tether iota cryptocurrency приложение tether
registration bitcoin bitcoin коды tether coinmarketcap обналичить bitcoin
bitcoin bounty кошелька bitcoin bitcoin книга bitcoin форум tcc bitcoin
2.3 EVM and smart contractsbitcoin виджет ethereum обменники wisdom bitcoin bitcoin solo bitcoin gif bitcoin markets зарегистрироваться bitcoin bitcoin пополнить
bitcoin 3d gui monero bitcoin начало platinum bitcoin bitcoin украина bitcoin payment faucets bitcoin
bitcoin ru bonus bitcoin
хайпы bitcoin bitcoin utopia finney ethereum обмен monero E-commerceautobot bitcoin ethereum майнить раздача bitcoin the ethereum bitcoin utopia конвертер bitcoin bitcoin info accepts bitcoin zcash bitcoin ethereum classic ethereum ann
poloniex ethereum mmm bitcoin
cryptocurrency bitcoin bitcoin asics
cgminer bitcoin bitcoin тинькофф bio bitcoin bitcoin мониторинг invest bitcoin символ bitcoin обменник monero play bitcoin bitcoin покер cryptocurrency tech joker bitcoin cryptocurrency tech
инструкция bitcoin россия bitcoin ethereum complexity bitcoin проблемы pool monero bitcoin создать bitcoin зебра bitcoin биткоин bitcoin now minecraft bitcoin lite bitcoin avto bitcoin
polkadot ico ico bitcoin bitcoin school
bitcoin перспективы
bitcoin футболка claymore monero fpga bitcoin алгоритм bitcoin wallet tether bitcoin nasdaq ethereum free bitcoin update amd bitcoin bitcoin трейдинг bitcoin презентация ethereum gold bitcoin аналоги
ethereum алгоритм bitcoin ads китай bitcoin
bitcoin gambling bitcoin ira fasterclick bitcoin bitcoin вебмани майнинг tether ферма ethereum bitcoin pool курсы bitcoin abi ethereum bitcoin блог брокеры bitcoin lamborghini bitcoin bitmakler ethereum ethereum web3 bitcoin информация bitcoin миксеры
заработай bitcoin They are susceptible to error and hacking: there is no perfect way to prevent technical glitches, human error or hacking.pools bitcoin bitcoin anonymous Image for postкомпиляция bitcoin bitcoin king
agario bitcoin технология bitcoin
bitcoin key bitcoin news bitcoin msigna bitcoin send 16 bitcoin avto bitcoin monero proxy bitcoin 2018 нода ethereum bitcoin список описание bitcoin cryptocurrency dash credit bitcoin ethereum форк инвестирование bitcoin cryptocurrency calculator client ethereum bitcoin bcc buy bitcoin config bitcoin 50 bitcoin ethereum телеграмм
аккаунт bitcoin rates bitcoin carding bitcoin ethereum упал hacking bitcoin обменник tether
tether wallet nasdaq bitcoin bitcoin service bitcoin комиссия ethereum рост количество bitcoin bitcoin bear заработок ethereum bitcoin лопнет bitcoin кошельки bitcoin талк rinkeby ethereum ethereum chart bitcoin блок bitcoin сети ethereum web3 avatrade bitcoin будущее bitcoin advcash bitcoin bitcoin difficulty bitcoin buying vpn bitcoin
50000 bitcoin bitcoin source ethereum blockchain майнер ethereum
android tether bitcoin china bitcoin 50 yandex bitcoin app bitcoin monero simplewallet
kinolix bitcoin bitcoin code bitcoin markets wechat bitcoin
падение ethereum up bitcoin bitcoin conf sberbank bitcoin battle bitcoin котировки bitcoin bitcoin electrum attack bitcoin ann monero twitter bitcoin bitcoin generate блокчейн bitcoin roboforex bitcoin рейтинг bitcoin ethereum news bitcoin neteller
ethereum история bitcoin 5 bitcoin local british bitcoin bitcoin pdf
bitcoin 5 bitcoin компания
bitcoin форк bitcoin exchange
bitcoin darkcoin
bitcoin рубль bitcoin шахты tether android скрипты bitcoin bitcoin код сайте bitcoin ethereum кошельки bitcoin make bitcoin луна ethereum difficulty bitcoin обои bitcoin проблемы claim bitcoin bitcoin school ethereum plasma
fox bitcoin
ethereum wallet avto bitcoin tinkoff bitcoin bitcoin txid bitcoin buying monero client bitcoin carding bitcoin wm ethereum forum bitcoin skrill bitcoin ютуб отследить bitcoin earning bitcoin fpga bitcoin bitcoin перевод case bitcoin matteo monero
simple bitcoin
bitcoin comprar bitcoin avalon транзакции bitcoin
bitcoin лучшие bitcoin кэш bitcoin golden bitcoin робот бесплатно bitcoin
адрес bitcoin
bitcoin теханализ wallet tether bitcoin froggy security bitcoin bitcoin hardfork курс ethereum пополнить bitcoin ethereum ферма bitcoin conf matteo monero lealana bitcoin кликер bitcoin список bitcoin bitcoin click bitcoin биткоин wisdom bitcoin amazon bitcoin ethereum coin видео bitcoin продать ethereum
Ключевое слово life bitcoin скачать bitcoin
why cryptocurrency importprivkey bitcoin новости monero ethereum news статистика ethereum bitcoin puzzle wirex bitcoin ethereum news
bcc bitcoin cryptocurrency forum bitcoin links flappy bitcoin доходность bitcoin monero майнинг форум bitcoin bitcoin уязвимости обменник tether putin bitcoin