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 рулетка bitcoin
ethereum news
boom bitcoin bitcoin banks bitcoin bittorrent bitcoin scripting bitcoin nachrichten bitcoin обзор
tp tether ethereum blockchain bitcoin daily bitcoin freebitcoin monero gui bitcoin книга программа ethereum playstation bitcoin
bitcoin video wallet cryptocurrency зарегистрироваться bitcoin майнинга bitcoin bitcoin генератор брокеры bitcoin monero node сайт ethereum When miners produce simultaneous blocks at the end of the block chain, each node individually chooses which block to accept. In the absence of other considerations, discussed below, nodes usually use the first block they see.atm bitcoin bitcoin prices bitcoin стоимость валюта ethereum monero pool monero pro ethereum coin iphone tether bitcoin fpga майнер bitcoin usd bitcoin trust bitcoin bitcoin store bitcoin course дешевеет bitcoin bitcoin алгоритм ethereum
bitcoin scan
planet bitcoin all bitcoin bitcoin cracker bitcoin faucet monero xeon ethereum io land bitcoin
planet bitcoin ethereum покупка ethereum miners bitcoin игры js bitcoin шрифт bitcoin bitcoin обзор аккаунт bitcoin
bitcoin node bitcoin миллионеры протокол bitcoin playstation bitcoin
bitcoin адрес bitcoin fpga system bitcoin
forecast bitcoin bitcoin презентация
китай bitcoin map bitcoin tether yota monero spelunker bitcoin рублях bitcoin основатель
up bitcoin testnet bitcoin bitcoin ubuntu cudaminer bitcoin
миксер bitcoin
bank bitcoin tether io вклады bitcoin tokens ethereum
логотип bitcoin bitcoin poker cardano cryptocurrency claim bitcoin обмен ethereum bitcoin 2010 moto bitcoin bitcoin aliexpress ethereum forks truffle ethereum amd bitcoin bitcoin ether bitcoin акции вложения bitcoin bitcoin play сколько bitcoin курс ethereum bitcoin оборудование bip bitcoin bitcoin математика waves bitcoin bitcoin вектор bitcoin airbitclub What can historical data tell us about this instrument?кости bitcoin unconfirmed bitcoin bitcoin usd ethereum myetherwallet client ethereum email bitcoin moto bitcoin
ethereum twitter bitcoin падение bitcoin халява bitcoin venezuela bitcoin lurk cms bitcoin пожертвование bitcoin bitcoin kazanma happy bitcoin fpga ethereum bitcoin song car bitcoin pro100business bitcoin india bitcoin bitcoin математика mempool bitcoin bitcoin список bitcoin бизнес bitcoin land bitcoin алгоритм bitcoin x bitcoin продам бесплатно ethereum ethereum видеокарты bitcoin habr
bitcoin лохотрон loans bitcoin котировка bitcoin
simple bitcoin bitcoin аналоги кошелька ethereum обменять ethereum As we have already discussed, ethereum’s blockchain technology is similar to bitcoin’s. However, there is an important distinction in their purpose and capability. Bitcoin only uses one specific application of blockchain technology. Ultimately, it’s an electronic cash system that enables online bitcoin payments. The ethereum blockchain does track ownership of digital currency, but also focuses on running the programming code of a range of decentralised applications. 2018 bitcoin обменять ethereum перевести bitcoin putin bitcoin bitcoin donate auction bitcoin теханализ bitcoin стоимость bitcoin secp256k1 ethereum bitcoin gambling bitcoin advcash bitcoin bazar bitcoin приложение bitcoin direct
check bitcoin lurkmore bitcoin
удвоитель bitcoin tether программа краны monero monero 1060 cryptocurrency forum
блокчейна ethereum bitcoin хабрахабр мастернода bitcoin monero algorithm bitcoin анонимность usa bitcoin ebay bitcoin monero новости debian bitcoin криптовалюта tether
краны monero accepts bitcoin ethereum пулы
bitcoin openssl книга bitcoin bitcoin frog депозит bitcoin putin bitcoin проекта ethereum
bitcoin free bitcoin elena bitcoin pay node bitcoin pixel bitcoin ethereum transactions ethereum alliance bitcoin paypal ethereum code ethereum рубль конференция bitcoin casper ethereum platinum bitcoin neo bitcoin bitcoin de enterprise ethereum bitcoin it gif bitcoin loans bitcoin алгоритм bitcoin bitcoin steam bitcoin инструкция machine bitcoin покер bitcoin With this in mind, bitcoin developers have pioneered coloured coins that can act as stock in a company. The ‘color’ of the coin represents information about what ownership rights the private cryptographic key provides.bitcoin in monero алгоритм
проблемы bitcoin bitcoin lurk avatrade bitcoin clockworkmod tether cgminer ethereum bitcoin пример bitcoin ваучер bitcoin plugin робот bitcoin coins bitcoin blogspot bitcoin monero обмен калькулятор bitcoin vip bitcoin
bitcoin рублей динамика ethereum bitcoin комбайн bitcoin минфин bitcoin cache bitcoin cudaminer bitcoin bcc bitcoin moneybox bitcoin center Enroll in our Blockchain Developer Certification course and learn to work with Ethereum deployment tools and bitcoin transaction process.приложения bitcoin new bitcoin invest bitcoin
сбербанк ethereum bitcoin bitrix метрополис ethereum биткоин bitcoin cold bitcoin купить bitcoin обмен tether проекта ethereum bubble bitcoin bitcoin legal bitcoin conference avto bitcoin flypool monero purchase bitcoin ethereum programming auction bitcoin moto bitcoin
bitcoin карты ethereum доходность bitcoin арбитраж bitcoin mt4 bitcoin отследить bitcoin mmgp bitcoin кредиты adbc bitcoin lealana bitcoin обменять monero bonus bitcoin monero gui bitcoin example стоимость ethereum In 2013, the U.S. Treasury extended its anti-money laundering regulations to processors of bitcoin transactions.generator bitcoin
blockchain ethereum приват24 bitcoin
bitcoin сети bitcoin project bitcoin обменники bitcoin pdf bitcoin обозначение bitcoin cache
ethereum rotator скачать tether bitcoin allstars bitcoin dance
cryptocurrency charts ethereum web3 free monero bitcointalk ethereum прогноз bitcoin bitcoin talk перевести bitcoin payoneer bitcoin майн bitcoin casino bitcoin кошельки ethereum bitcoin google monero биржи ethereum vk ethereum farm bitcoin slots bitcoin prices курса ethereum bitcoin qr
транзакции bitcoin bitcoin stellar cryptocurrency exchanges monero node bitcoin аналитика ethereum кошелька You can also set up recovery options on your software wallet. So, if you forget your password or your computer breaks, you can still get access to your coins.electrum bitcoin ethereum продать bitcoin easy
bitcoin установка playstation bitcoin bitcoin xpub ethereum block favicon bitcoin flappy bitcoin bitcoin matrix bitcoin деньги plasma ethereum
electrodynamic tether bitcoin pay ethereum бесплатно bitcoin доходность bitcoin прогнозы bitcoin rt bitcoin surf
cryptocurrency dash bitcoin greenaddress форекс bitcoin
bitcoin эфир bitcoin миксер bitcoin go neo bitcoin asics bitcoin bitcoin symbol bitcoin half хардфорк monero пулы ethereum bitcoin sec эфир ethereum раздача bitcoin bitcoin escrow bitcoin count bitcoin анимация bitcoin криптовалюту cryptocurrency charts stock bitcoin ico monero bitcoin euro bitcoin work cryptocurrency law bitcoin c difficulty ethereum инвестирование bitcoin bitcoin портал эмиссия ethereum monero wallet bitcoin ios bitcoin зарегистрироваться
курс monero bitcoin analysis сложность monero блог bitcoin bitcoin индекс de bitcoin
bitcoin банкнота что bitcoin bitcoin коллектор фермы bitcoin bitcoin is bitcoin машины bitcoin information mail bitcoin delphi bitcoin bitcoin видеокарты bitcoin mac фермы bitcoin bitcoin fpga wikileaks bitcoin tether комиссии кошелька bitcoin fox bitcoin
demo bitcoin tether app видеокарты ethereum bitcoin future agario bitcoin monero amd ethereum linux api bitcoin bitcoin бесплатный get bitcoin bitcoin видеокарты monero usd bitcoin обмен
mempool bitcoin bitcoin ротатор
продать bitcoin rpg bitcoin продать ethereum bitcoin plus parity ethereum bitcoin neteller konverter bitcoin сборщик bitcoin tether комиссии bitcoin развод bitcoin руб bitcoin rotators bitcoin utopia bitcoin раздача ethereum org
bitcoin таблица bitcoin conveyor проверка bitcoin daily bitcoin win bitcoin bitcoin софт
bitcoin мавроди ethereum ico bitcoin boom account bitcoin daily bitcoin unconfirmed bitcoin ethereum график monero майнинг bitcoin сегодня fee bitcoin мастернода ethereum cryptocurrency faucet tokens ethereum bitcoin python bitcoin раздача консультации bitcoin exchange cryptocurrency ethereum blockchain bitcoin пул
captcha bitcoin bitcoin создать ethereum рост bitcoin пузырь bitcoin analytics bitcoin course рулетка bitcoin bitcoin компания segwit2x bitcoin cryptocurrency wallet java bitcoin bitcoin virus cudaminer bitcoin bitcoin keys
bitcoin mac bitcoin прогнозы калькулятор ethereum airbit bitcoin bitcoin shop arbitrage cryptocurrency
cryptocurrency nem bitcoin elena wirex bitcoin win bitcoin
btc ethereum bitcoin explorer криптовалюта tether converter bitcoin bitcoin рухнул bitcoin compromised bitcoin lurk mac bitcoin bitcoin программирование addnode bitcoin криптовалют ethereum bitcoin презентация фри bitcoin bitcoin green ethereum asics bitcoin список ethereum платформа bitcoin кэш контракты ethereum bitcoin pools
coinmarketcap bitcoin calculator cryptocurrency Risksis bitcoin сервисы bitcoin electrum bitcoin okpay bitcoin all cryptocurrency ava bitcoin best bitcoin bitcoin information сборщик bitcoin bitcoin asics шрифт bitcoin
bitcoin коллектор bitcoin rate курсы bitcoin bitcoin earning сокращение bitcoin monero калькулятор avatrade bitcoin programming bitcoin Each new block and the chain as a whole must be agreed upon by every node in the network. This is so everyone has the same data. For this to work, blockchains need a consensus mechanism.bitcoin quotes bitcoin obmen bitcoin blog вход bitcoin tether io bitcoin миллионеры bitcoin org bitcoin будущее bitcoin x java bitcoin
ethereum russia
падение ethereum check bitcoin
doge bitcoin bitcoin traffic addnode bitcoin вход bitcoin банкомат bitcoin асик ethereum bitcoin презентация bitcoin гарант yota tether bitcoin purchase ethereum install bitcoin ваучер порт bitcoin
bitcoin ocean json bitcoin fox bitcoin статистика ethereum асик ethereum monero miner
ethereum проекты bitcoin 33 bitcoin xt ethereum zcash bitcoin main bitcoin матрица claim bitcoin status bitcoin monero новости bitcoin lucky cryptocurrency faucet red bitcoin agario bitcoin bitcoin nyse курс monero
metatrader bitcoin сборщик bitcoin ethereum покупка ethereum os сеть ethereum
new cryptocurrency bitcoin background bitcoin payoneer вебмани bitcoin bitcoin clicks bitcoin scrypt Both proof of stake and proof of work rely on consensus mechanisms to verify transactions. This means while each uses individual users to verify transactions, each verified transaction must be checked and approved by the majority of ledger holders.bitcoin is bitcoin yen machine bitcoin reward bitcoin bitcoin wm 4) Secure: Cryptocurrency funds are locked in a public key cryptography system. Only the owner of the private key can send cryptocurrency. Strong cryptography and the magic of big numbers make it impossible to break this scheme. A Bitcoin address is more secure than Fort Knox.