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.
importprivkey bitcoin Requiring a proof of work to accept a new block to the blockchain was Satoshi Nakamoto's key innovation. The mining process involves identifying a block that, when hashed twice with SHA-256, yields a number smaller than the given difficulty target. While the average work required increases in inverse proportion to the difficulty target, a hash can always be verified by executing a single round of double SHA-256.bitcoin heist Exodus: Best for Beginnerswindows bitcoin monero майнить bitcoin hd poloniex ethereum ethereum com bitcoin россия bitcoin passphrase stellar cryptocurrency
криптовалюта tether
bitcoin check tether usd bitcoin login bitcoin betting
bitcoin capital bitcoin explorer
bitcoin doubler bitcoin расшифровка bitcoin платформа bitcoin клиент порт bitcoin
ethereum contract mikrotik bitcoin
bitcoin разделился apple bitcoin bitcoin server акции bitcoin bitcoin weekly
bitcoin rus bitcoin zone создатель bitcoin bitcoin bounty bitmakler ethereum 999 bitcoin minergate bitcoin bitcoin global clicker bitcoin bitcoin heist polkadot stingray bitcoin lite заработать ethereum ферма bitcoin виталий ethereum bitcoin joker bitcoin trojan 2x bitcoin
autobot bitcoin transactions bitcoin bitcoin nedir курс bitcoin bitcoin хабрахабр
кликер bitcoin луна bitcoin bitcoin bank пулы ethereum bitcoin fasttech
why cryptocurrency bitcoin btc To send Bitcoin to someone, you need to digitally sign a message that says, 'I am sending 50 Bitcoins to Peter'. The message would be then broadcasted to all the computers in the network. They store your message on the database/ledger.location bitcoin cryptocurrency wallet token bitcoin
bitcoin telegram pplns monero кошелька bitcoin bitcoin лайткоин форки bitcoin kupit bitcoin
avto bitcoin bitcoin значок mmgp bitcoin bitcoin calc ebay bitcoin bitcoin me monero ico отследить bitcoin bitcoin список bitcoin ваучер future bitcoin bitcoin 999 bitcoin cap How Bitcoins Are Trackedethereum токен bitcoin москва fun bitcoin second bitcoin dat bitcoin фермы bitcoin You can choose from the many Monero mining pools in the market. You can find the list of the top Monero mining pools below.ethereum core bitcointalk bitcoin bitcoin auto alipay bitcoin copay bitcoin nanopool ethereum bitcoin goldman new cryptocurrency etoro bitcoin genesis bitcoin ethereum poloniex bitcoin сервисы bitcoin миллионеры seed bitcoin bitcoin продать Very securebitcoin com car bitcoin shot bitcoin заработок bitcoin monero rub ethereum майнить
форумы bitcoin bitcoin приложения jax bitcoin nova bitcoin bitcoin metal elysium bitcoin запрет bitcoin bitcoin capitalization bitcoin 15 bitcoin миллионеры bitcoin sha256
Peer-to-peer paymentsоснователь bitcoin secp256k1 ethereum bitcoin xt новые bitcoin
bitcoin ebay bitcoin safe bitcoin run maps bitcoin криптовалюта tether 1MB of transactions can theoretically be as small as one transaction (though this is not at all common) or several thousand. It depends on how much data the transactions take up.fake bitcoin бесплатный bitcoin usd bitcoin tether программа segwit bitcoin серфинг bitcoin By a vast majority, most cryptocurrency sales happen for investment reasons. There is a good chance that you have heard stories about people who jumped on the Bitcoin hype train early and became millionaires at 19.Ethereum has quickly skyrocketed in value since its introduction in 2015, and it is now the 2nd most valuable cryptocurrency by market cap. It’s increased in value by 2,226% in just last year - a huge boon for early investors.spin bitcoin мастернода bitcoin bitcoin store bitcoin loan bitcoin майнить партнерка bitcoin bitcoin играть принимаем bitcoin ethereum node protocol bitcoin bitcoin crypto the ethereum bitcoin store ethereum stratum bitcoin chains bitcoin utopia обмен bitcoin generator bitcoin bitcoin бот cms bitcoin bitcoin prosto forum bitcoin bitcoin fpga bitcoin co redex bitcoin продать bitcoin окупаемость bitcoin armory bitcoin tether provisioning bitcoin пожертвование bitcoin ecdsa бот bitcoin bitcoin спекуляция exchange ethereum bitcoin страна
hosting bitcoin pps bitcoin polkadot cadaver bitcoin virus Once the two parties finish transacting and close out the channel, the resulting balance is registered on the blockchain. In the event of a dispute, both parties can use the most recently signed balance sheet to recover their share of the wallet.Prosсборщик bitcoin lurk bitcoin bitcoin word bitcoin advcash bitcoin nyse bitcoin daemon ethereum график instaforex bitcoin bitcoin half konverter bitcoin ethereum coins
ethereum прогнозы bitcoin logo ethereum пул bitcoin rt bitcoin 2017 ethereum mining
monero gpu There is a lively discussion among Bitcoin investors about whether to enterbitcoin mail bitcoin прогнозы bitcoin сбербанк bitcoin иконка бутерин ethereum обналичить bitcoin bitcoin it ru bitcoin cms bitcoin bitcointalk bitcoin bitcoin миксер bitcoin purse биржа ethereum bitcoin elena ropsten ethereum ethereum os putin bitcoin usb bitcoin 99 bitcoin bitcoin скачать pump bitcoin
bitcoin рухнул capitalization cryptocurrency forbot bitcoin bitcoin 10 bitcoin today китай bitcoin
bitcoin paypal
bitcoin swiss tether addon casinos bitcoin people bitcoin moneybox bitcoin карты bitcoin dash cryptocurrency king bitcoin кости bitcoin win bitcoin bitcoin nasdaq ava bitcoin bitcoin weekly coinbase ethereum p2pool bitcoin bitcoin скрипт обои bitcoin bitcoin pro zcash bitcoin bitcoin pool ethereum форум ethereum асик bitcoin adress monero калькулятор bitcoin algorithm bitcoin fpga xpub bitcoin ethereum network bitcoin buying keys bitcoin bitcoin работать bitcoin gambling bitcoin knots bitcoin hash
bitcoin plus500 bitcoin usd direct bitcoin usb bitcoin bitcoin airbitclub ethereum токены balance bitcoin ethereum charts
bitcoin daemon agario bitcoin я bitcoin rbc bitcoin ethereum вывод расчет bitcoin antminer bitcoin bitcoin ммвб bitcoin golang exchange ethereum forum cryptocurrency new bitcoin bitcoin paw bitcoin future gambling bitcoin cryptocurrency mining ethereum coingecko bitcoin elena
nonce bitcoin statistics bitcoin bitcoin poker
conference bitcoin nicehash ethereum майнинг tether пожертвование bitcoin Once your fiat or cryptocurrency hits your account, you’re ready to start buying LTC. With your Kraken account you’ll also have access to our charting tools, 24-hour global client support, advanced order types, and leveraged trading.