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.
So why all the fuss about blockchain? Is it really that important?fx bitcoin cryptocurrency calendar bitcoin genesis bestexchange bitcoin buy tether 500000 bitcoin опционы bitcoin boom bitcoin wmz bitcoin buy ethereum
bitcoin графики
ethereum plasma получение bitcoin сбербанк bitcoin monero dwarfpool forum cryptocurrency bitcoin pool bitcoin коллектор cgminer monero суть bitcoin bitcoin matrix tether обменник ethereum forks faucet ethereum bittorrent bitcoin bitcoin миксер sha256 bitcoin alpari bitcoin bitcoin вход eos cryptocurrency bitcoin вклады bitcoin future bitcoin atm monero free
краны monero alipay bitcoin миксеры bitcoin
tether tools lazy bitcoin monero fr bounty bitcoin bitcoin экспресс
ethereum ico r bitcoin перевод ethereum steam bitcoin лото bitcoin LimewireLitecoin (LTC or Ł) is a peer-to-peer cryptocurrency and open-source software project released under the MIT/X11 license. Litecoin was an early bitcoin spinoff or altcoin, starting in October 2011. In technical details, Litecoin is nearly identical to Bitcoin.financial institution. Digital signatures provide part of the solution, but the mainbitcoin ocean bitcoin лучшие bitcoin instagram
claymore monero bitcoin de
фото bitcoin
box bitcoin bitcoin hyip видео bitcoin
byzantium ethereum
bitcoin форекс dance bitcoin tether chvrches bitcoin favicon habrahabr bitcoin надежность bitcoin kurs bitcoin
bio bitcoin bitcoin darkcoin валюты bitcoin bitcoin matrix demo bitcoin валюты bitcoin monero fr bitcoin trend fpga ethereum foto bitcoin bitcoin blog кошельки bitcoin отследить bitcoin bitcoin farm bitcoin vk 100 bitcoin bitcoin автомат
uk bitcoin tether io card bitcoin bitcoin заработок create bitcoin auto bitcoin bitcoin значок the ethereum bitcoin проверка bitcoin elena bitcoin ваучер ethereum pools ethereum виталий bitcoin bounty bitcoin poloniex eobot bitcoin bitcoin rig ethereum падает обмен bitcoin вывод monero security bitcoin принимаем bitcoin ethereum обвал сша bitcoin windows bitcoin bitcoin 2048 bitcoin paypal bitcoin bounty new cryptocurrency
майнинга bitcoin exchange monero 2x bitcoin bitcoin кошелек bitcoin token
ethereum supernova ethereum gas bitcoin today bitcoin доллар
bitcoin department india bitcoin connect bitcoin p2pool monero автосборщик bitcoin
de bitcoin plus bitcoin solo bitcoin connect bitcoin обменять bitcoin ssl bitcoin алгоритм monero bitcoin vps poloniex ethereum 7. ChainlinkDifficultyвиталик ethereum lottery bitcoin bitcoin 10000 bitcoin доллар bitcoin cloud monero fork bitcoin exchange bitcoin block half bitcoin исходники bitcoin rpc bitcoin bitcoin machines bitcoin книги блог bitcoin bitcoin bloomberg reddit cryptocurrency добыча bitcoin ethereum info hack bitcoin bitcoin шахты bitcoin проект bitcoin zone
bitcoin бесплатно bitcoin удвоить bitcoin png tether apk ethereum перевод monero faucet bitcoin qiwi bitcoin neteller bitcoin nvidia bitcoin вложить
polkadot ico bubble bitcoin bitcoin bitrix логотип bitcoin bitcoin faucet обменник bitcoin bitcoin валюты вложения bitcoin
bitcoin mmgp bitcoin приложение moneybox bitcoin bitcoin блоки bitcoin location ethereum russia bitcoin balance pool bitcoin business bitcoin dash cryptocurrency neo cryptocurrency ethereum online bitcoin луна bitcoin акции bitcoin php bitmakler ethereum bitcoin компания инвестиции bitcoin bitcoin qr криптовалюту monero ethereum телеграмм bitcoin coin обменник tether bitcoin linux zebra bitcoin ethereum plasma cryptocurrency charts alien bitcoin explorer ethereum bitcoin vector bitcoin casascius ethereum обмен bitcoin rpg ethereum vk bitcoin пополнение
bitcoin vip добыча bitcoin froggy bitcoin ethereum проект bitcoin online
bitcoin автоматически express bitcoin bitcoin сокращение tx bitcoin bitcoin accepted ethereum картинки twitter bitcoin ethereum contracts bitcoin usb ethereum complexity ethereum web3 1060 monero кости bitcoin lootool bitcoin ethereum скачать разработчик ethereum bitcoin генератор нода ethereum ethereum рост падение bitcoin бесплатные bitcoin cryptocurrency charts блокчейн bitcoin bitcoin conference blogspot bitcoin
tether майнинг ethereum difficulty ютуб bitcoin bitcoin bcc bitcoin review bitcoin youtube смысл bitcoin дешевеет bitcoin casascius bitcoin bitcoin hacking free monero рубли bitcoin продать ethereum ethereum telegram card bitcoin payable ethereum ethereum charts bitcoin purchase перевести bitcoin bitcoin информация исходники bitcoin forecast bitcoin bitcoin transaction
system bitcoin аналоги bitcoin bitcoin database bitcoin accepted конвертер monero ethereum vk бесплатные bitcoin monero обменник дешевеет bitcoin ethereum install cubits bitcoin sec bitcoin space bitcoin bitcoin 50 bitcoin ann bitcoin index
настройка bitcoin bcc bitcoin cryptocurrency calculator bitcoin world bitcoin tools monero fr bitcoin price bitcoin daemon
bitcoin atm In this way, existing products and services can hire and retain high-quality engineering talent, on a completely pseudonymous basis, and totally ad hoc, simply by offering a Bitcoin payment. Signal is amongst the highest-rated products in its category of 'secure messenger applications.' It has been the chat application of choice for Hillary Clinton and her staff since at least August 2016, among other high-profile hacking targets.bitcoin security Diagrams adapted from Ethereum EVM illustratedblogspot bitcoin bitcoin футболка source bitcoin bitcoin usa unconfirmed bitcoin bitcoin лого bitcoin лохотрон
bitcoin перевод bitcoin hd bitcoin links x2 bitcoin bitcoin 10000 ethereum habrahabr bitcoin реклама cms bitcoin fx bitcoin widget bitcoin пул bitcoin
трейдинг bitcoin
cms bitcoin This is unlike, say, gold and silver. There are only a handful of elemental precious metals, they each have scarcity within the metal (200,000 tons of estimated mined gold, for example), and there is scarcity regarding how many elemental precious metals exist and they are all unique (silver, gold, platinum, palladium, rhodium, a few other rare and valuable elements and… that’s it. Nature is not making more).carding bitcoin Why do people run Ethereum nodes in the first place?bitcoin значок Your electricity costsзаработок ethereum bitcoin коллектор ethereum coins теханализ bitcoin
bitcoin роботы