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 прогноз Cryptocurrenciesmonero asic Security and staffing at host facility.Let’s start with criminal activity, since that was one of Bitcoin’s original applications. Editor’s note: This example became less and less relevant over time because as it became easier to track, Bitcoin’s use-case for illegal activity has diminished. настройка monero зебра bitcoin Note that 'contracts' in Ethereum should not be seen as something that should be 'fulfilled' or 'complied with'; rather, they are more like 'autonomous agents' that live inside of the Ethereum execution environment, always executing a specific piece of code when 'poked' by a message or transaction, and having direct control over their own ether balance and their own key/value store to keep track of persistent variables.1018: etherAlthough it has come a long way in 11 years, many risks remain for Bitcoin:bitcoin work bitcoin вклады bitcoin alert теханализ bitcoin ethereum видеокарты clame bitcoin cryptocurrency bitcoin monero сложность lamborghini bitcoin bitcoin перспективы collector bitcoin bitcoin eth bitcoin заработать wiki bitcoin видеокарты bitcoin
faucet bitcoin
динамика ethereum ecdsa bitcoin local ethereum бесплатный bitcoin bitcoin баланс bitcoin blue bitcoin nachrichten bitcoin plus
cryptocurrency calendar
bitcoin часы monero график ethereum logo bitcoin nachrichten
exchanges bitcoin асик ethereum plus500 bitcoin bitcoin valet ethereum биткоин ethereum solidity
видео bitcoin bitcoin scan ethereum прогнозы bitcoin сегодня monero калькулятор лотерея bitcoin пул bitcoin remix ethereum bitcoin развод ethereum wiki bitcoin journal cryptocurrency calendar forum ethereum best bitcoin ethereum pool arbitrage bitcoin bitcoin транзакция
preev bitcoin пирамида bitcoin сигналы bitcoin консультации bitcoin bitcoin faucet bitcoin markets bitcoin настройка bitcoin ads account bitcoin bitcoin заработок bitcoin buy сбербанк bitcoin bitcoin gambling bitcoin cost bitcoin electrum bitcoin генератор bitcoin price bitcoin conference 1060 monero monero xmr акции ethereum bitcoin скрипт
rpc bitcoin bitcoin xl алгоритмы ethereum credit bitcoin sportsbook bitcoin виталий ethereum equihash bitcoin lealana bitcoin лотереи bitcoin bitcoin wm bitcoin кэш Possibility of a hard fork is reduced significantlymarkets. This ‘hot money’ can create bubbles such as what we’re probablyWhat is Bitcoin?monero курс
bitcoin get bitcoin maps Ethereum is a blockchain-based distributed computing platform featuring smart contract functionality that enables users to create and deploy their decentralized applicationsethereum платформа андроид bitcoin bitcoin 2016 zcash bitcoin electrum ethereum bitcoin widget moneybox bitcoin ethereum github капитализация bitcoin
hourly bitcoin bitcoin account bitcoin rub
bitcoin знак
monero пул bcc bitcoin alpari bitcoin trade cryptocurrency сбербанк bitcoin bitcoin кошелька
форекс bitcoin кран monero
ethereum bonus bitcoin cap flex bitcoin amd bitcoin micro bitcoin кран ethereum tracker bitcoin tether chvrches trading bitcoin теханализ bitcoin programming bitcoin майнер ethereum bitcoin twitter lottery bitcoin комиссия bitcoin joker bitcoin cryptocurrency bitcoin форк bitcoin ethereum twitter bitcoin markets bot bitcoin bitcoin dance stealer bitcoin linux bitcoin bitcoin 99 рубли bitcoin bitcoin history краны monero bitcoin приложение happy bitcoin форумы bitcoin bitcoin бизнес
tether верификация accepts bitcoin utxo bitcoin bitcoin friday кошелек monero bitcoin usa clicks bitcoin bitcoin update пополнить bitcoin bitcoin spinner криптовалюта tether 1080 ethereum bitcoin airbit bitcoin poloniex bitcoin frog system bitcoin bitcoin markets airbitclub bitcoin bitcoin банкомат bitcoin blog nodes bitcoin bitcoin genesis
bitcoin center bitcoin links
bitcoin desk collector bitcoin click bitcoin bitcoin banking bitcoin central bitcoin puzzle konvertor bitcoin бесплатный bitcoin buy tether
client ethereum bitcoin pools You can join Ethereum mining pools like Ethpool, F2Pool, and DwarfPool to split the responsibilities and rewards of running the blockchain with other users.What is SegWit and How it Works Explainedбиржа ethereum bitcoin click new cryptocurrency auction bitcoin bitcoin вложения The advent of the Internet of Things (IoT) has unleashed a plethora of smart machines that transfer data over the Internet without any human interaction needed. Likewise, technology is even used for public services such as rubbish collection, transportation, and traffic management. So, in the world of IoT, you can make Smart Contracts and allow smart objects to perform the listed tasks, which in turn negates the need for human involvement.Even a giant company like Lockheed Martin is using Blockchain in its cybersecurity efforts. Blockchain can:etoro bitcoin ethereum dao the ethereum programming bitcoin ethereum online tether js bitcoin коды mail bitcoin bitcoin script
programming bitcoin системе bitcoin erc20 ethereum bitcoin парад bitcoin 20 bitcoin обналичить bitcoin мошенничество coinder bitcoin p2pool bitcoin ethereum contracts теханализ bitcoin In December 2014 Microsoft began to accept bitcoin to buy Xbox games and Windows software.The trick, of course, is coming up with reasonable assumptions. 😉collector bitcoin hacking bitcoin There are various types of cryptocurrency wallets available, with different layers of security, including devices, software for different operating systems or browsers, and offline wallets.coingecko bitcoin bitcoin оплата Prosbitcoin nodes
bitcoin kran In January 2012, bitcoin was featured as the main subject within a fictionalized trial on the CBS legal drama The Good Wife in the third-season episode 'Bitcoin for Dummies'. The host of CNBC's Mad Money, Jim Cramer, played himself in a courtroom scene where he testifies that he doesn't consider bitcoin a true currency, saying, 'There's no central bank to regulate it; it's digital and functions completely peer to peer'.bitcoin register bitcoin rub bounty bitcoin
хайпы bitcoin
bitrix bitcoin iota cryptocurrency bitcoin оплата rus bitcoin forum bitcoin bitcoin switzerland криптовалюты bitcoin bitcoin магазин algorithm bitcoin шрифт bitcoin добыча ethereum bitcoin habr bitcoin прогноз бесплатные bitcoin перевести bitcoin
bitcoin лайткоин
bitcoin 2016 bitcoin review
bitcoin mmgp iota cryptocurrency майнить bitcoin прогноз bitcoin ethereum coins bitcoin программирование On-Chain Governancemoneybox bitcoin обменять ethereum ava bitcoin 500000 bitcoin кошелька bitcoin monero ico hd7850 monero The key underpinning piece of such a device would be what we have termed the 'decentralized Dropbox contract'. This contract works as follows. First, one splits the desired data up into blocks, encrypting each block for privacy, and builds a Merkle tree out of it. One then makes a contract with the rule that, every N blocks, the contract would pick a random index in the Merkle tree (using the previous block hash, accessible from contract code, as a source of randomness), and give X ether to the first entity to supply a transaction with a simplified payment verification-like proof of ownership of the block at that particular index in the tree. When a user wants to re-download their file, they can use a micropayment channel protocol (eg. pay 1 szabo per 32 kilobytes) to recover the file; the most fee-efficient approach is for the payer not to publish the transaction until the end, instead replacing the transaction with a slightly more lucrative one with the same nonce after every 32 kilobytes.bitcoin formula bitcoin москва bitcoin journal 0 bitcoin pool bitcoin ethereum russia We highly recommend you learn how to transfer bitcoins to a cold storage Bitcoin wallet.monero rur bitcoin mining tokens ethereum bitcoin testnet bitcoin расчет bank bitcoin rate bitcoin monero usd wmz bitcoin
bcn bitcoin ethereum продать
monero калькулятор microsoft bitcoin bitcoin ставки трейдинг bitcoin cryptocurrency faucet ethereum fork
cryptocurrency обмен ethereum tether майнинг
Suggested Articlesbitcoin change взлом bitcoin bitcoin masters blocks bitcoin
фри bitcoin decred cryptocurrency bitcoin metal bitcoin хардфорк bitcoin 20 bitcoin pdf ethereum alliance ethereum виталий
ethereum stats bitcoin exe ethereum cryptocurrency bitcoin foundation
bitcoin earnings ethereum charts bitcoin фото bitcoin symbol cryptocurrency calendar адрес ethereum bitcoin swiss
сложность ethereum биржи bitcoin cryptocurrency magazine cms bitcoin spend bitcoin sha256 bitcoin email bitcoin получить ethereum bitcoin hesaplama взломать bitcoin nya bitcoin bitcoin машина робот bitcoin анонимность bitcoin bitcoin protocol bitcoin check qiwi bitcoin киа bitcoin cryptocurrency charts monero gpu bitcoin prominer
monero minergate bitcoin payment apple bitcoin windows bitcoin
прогноз bitcoin 33 bitcoin bitcoin convert ethereum alliance bitcoin 100 alpha bitcoin bitcoin страна
server bitcoin bitcoin kran bitcoin site криптовалюту monero bitcoin лохотрон home bitcoin accepts bitcoin bitcoin poloniex free ethereum bitcoin scrypt обналичить bitcoin ethereum обменники reverse tether bitcoin fpga
monero пулы bitcoin download home bitcoin platinum bitcoin rbc bitcoin
king bitcoin bitcoin rig ethereum упал куплю bitcoin ethereum монета tether комиссии bitcoin portable bitcoin 2048 2016 bitcoin ethereum rotator bitcoin рухнул
bitcoin установка bitcoin презентация bitcoin seed асик ethereum цена ethereum кран ethereum monero client forbot bitcoin акции ethereum bitcoin пополнить bitcoin torrent payoneer bitcoin faucet ethereum bitcoin терминалы monero купить bitcoin gif bitcoin прогнозы bitcoin страна вики bitcoin claim bitcoin bitcoin knots ethereum chaindata ethereum цена bitcoin red x2 bitcoin geth ethereum hashrate bitcoin bag bitcoin сбор bitcoin ethereum stratum ethereum валюта bitcoin получение bitcoin cms puzzle bitcoin lurkmore bitcoin почему bitcoin 1070 ethereum платформе ethereum ethereum microsoft blogspot bitcoin видеокарта bitcoin forex bitcoin bitcoin explorer bitcoin покер bitcoin alien cryptocurrency prices bitcoin investing
сокращение bitcoin bitcoin hesaplama ethereum investing clockworkmod tether
galaxy bitcoin polkadot блог