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.
статистика ethereum Portabilitynodes bitcoin bitcoin растет air bitcoin bitcoin расчет
blocks bitcoin
bitcoin видеокарты bitcoin ocean xronos cryptocurrency minergate bitcoin sell ethereum ethereum course бесплатные bitcoin bitcoin отзывы купить bitcoin обмена bitcoin bitcoin xpub обвал bitcoin bitcoin fan casino bitcoin
statistics bitcoin кредиты bitcoin bitcoin book In general, most owners of Bitcoin and other coins are attracted to the technology because of its cheaper and faster transactions and for the huge investment potential.bitcoin кредит bitcoin lucky отследить bitcoin bitcoin valet bitcoin продать bitcoin получение bitcoin платформа bitcoin calc рубли bitcoin bitcoin usb bitcoin future
проект bitcoin tether usb 1 ethereum продать ethereum tether coin gif bitcoin ethereum контракт ethereum ann monero xmr лотереи bitcoin wei ethereum fasterclick bitcoin bio bitcoin bitcoin бизнес ethereum транзакции bitcoin окупаемость bitcoin история dance bitcoin
торги bitcoin live bitcoin блокчейн ethereum ethereum cryptocurrency
nem cryptocurrency bitcoin ira monero news tether wallet куплю bitcoin bitcoin xl bitcoin testnet капитализация bitcoin робот bitcoin bitcoin торги скачать bitcoin wikipedia cryptocurrency bitcoin xpub bitcoin матрица bitcoin withdrawal bitcoin hype
bitcoin завести bitcoin кран сервисы bitcoin кошельки ethereum bitcoin bloomberg bitcoin wmx сайт ethereum токен ethereum txid ethereum ethereum investing bitcoin euro bitcoin golden bitcoin global trust bitcoin bitcoin trojan криптовалюты bitcoin rpg bitcoin lootool bitcoin difficulty bitcoin bitcoin base
сбор bitcoin
bitcoin daily bitcoin hype
bitcoin значок price bitcoin wisdom bitcoin ethereum os world bitcoin bitcoin ebay форк ethereum fun bitcoin кошелька bitcoin
android ethereum bitcoin donate bitcoin рухнул monero 1070 bitcoin auto monero пул
bitcoin yandex bitcoin инвестиции bitcoin steam arbitrage cryptocurrency bitcoin эмиссия график ethereum
адреса bitcoin credit bitcoin
ethereum siacoin cryptocurrency wallet bitcoin карты tokens ethereum терминалы bitcoin tether ico bitcoin zona bitcoin school cryptocurrency market Regular digital signatures, such as those used in bitcoin, involve a single pair of keys – one public and one private. This allows the owner of a public address to prove that they own it by signing a spend of funds with the corresponding private key.simple bitcoin робот bitcoin A Dapp has its back-end code (smart contract) which runs on a decentralized peer-to-peer networkbitcoin tools bitcoin heist
bitcoin перевод ethereum обменники monero pro abi ethereum froggy bitcoin будущее bitcoin cardano cryptocurrency bitcoin legal bitcoin реклама bitcoin payeer matteo monero ethereum ubuntu аналоги bitcoin bitcoin bonus forum cryptocurrency bitcoin bounty raspberry bitcoin
ethereum os блоки bitcoin bitcoin alpari bitcoin компьютер bitcoin solo lurkmore bitcoin bitcoin сервисы
code bitcoin bitcoin antminer importprivkey bitcoin tracker bitcoin bitcoin комиссия
car bitcoin bitcoin пулы продажа bitcoin trezor ethereum bitcoin казахстан auto bitcoin bitcoin flapper mt5 bitcoin nicehash bitcoin bitcoin payeer monero майнеры armory bitcoin tether usdt bitcoin pizza it bitcoin зарабатывать bitcoin мониторинг bitcoin покупка ethereum
With the Exodus charts, you can *****m in or out on just about any time frame so you can get a micro or macro level view of price action.Total Difficulty:java bitcoin яндекс bitcoin обменник tether usa bitcoin bitcoin foundation love bitcoin bitcoin tx email bitcoin blender bitcoin ethereum homestead генераторы bitcoin cryptocurrency law half bitcoin bitcoin rt bitcoin count таблица bitcoin fast bitcoin bitcoin москва bitcoin халява биржа bitcoin bitcoin nedir split bitcoin bitcoin регистрация ico ethereum bitcoin yandex bitcoin что bitcoin транзакции bitcoin miner bitcoin mining tether валюта
bitcoin халява bitcoin pay е bitcoin js bitcoin сложность bitcoin coingecko bitcoin swarm ethereum ethereum markets
bitcoin background fee bitcoin cryptocurrency charts hashrate bitcoin token ethereum
algorithm bitcoin bitcoin masters
проект ethereum
bitcoin bat bitcoin eu chaindata ethereum store bitcoin bitcoin cudaminer cryptocurrency nem bitcoin рубль bitcoin usa all bitcoin cryptocurrency forum MiningFor instance, if the block size limit were to be increased from 1MB to 4MB, a 2MB block would be accepted by nodes running the new version, but rejected by nodes running the older version.Size of the Poolbitcoin aliexpress bitcoin work
bitcoin обзор pps bitcoin
bitcoin shops порт bitcoin bitcoin wordpress bitcoin spend bitcoin заработать bitcoin рулетка bitcoin баланс jax bitcoin forex bitcoin
click bitcoin bitcoin china bitcoin бесплатно bitcoin программирование clame bitcoin exchange ethereum алгоритм monero обсуждение bitcoin bitcoin etf converter bitcoin ethereum видеокарты captcha bitcoin сложность monero
bitcoin algorithm bitcoin favicon bitcoin trojan bitcoin motherboard delphi bitcoin cryptocurrency tech bitcoin список скачать bitcoin ethereum bitcoin bitcoin knots skrill bitcoin bitcoin spinner monero faucet hourly bitcoin bitcoin online bitcoin reddit bitcoin multiplier collector bitcoin кредиты bitcoin bitcoin 4000 bitcoin crypto monero майнинг исходники bitcoin 1080 ethereum fake bitcoin 60 bitcoin forum cryptocurrency
tether приложение analysis bitcoin bitcoin service bitcoin кредиты bitcoin widget ccminer monero china cryptocurrency hashrate bitcoin