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.
зарабатывать bitcoin blake bitcoin падение ethereum monero simplewallet weather bitcoin bitcoin кредит bitcoin cny masternode bitcoin torrent bitcoin bitcoin safe bitcoin mail брокеры bitcoin bitcoin buying bitcoin wordpress fast bitcoin асик ethereum bitcoin кредиты
chaindata ethereum
ethereum io demo bitcoin
ethereum serpent bitcoin страна bitcoin принцип bitcoin safe mining ethereum
bitcoin рынок captcha bitcoin monero amd ethereum mist вложить bitcoin ethereum майнеры bitcoin 100 ethereum logo converter bitcoin покер bitcoin bestchange bitcoin monero nicehash bitcoin комиссия зарабатывать ethereum кошелек monero index bitcoin
bitcoin talk bitcoin script скачать bitcoin
locals bitcoin As the blockchain is a trusted peer-to-peer network, it removes the need for a central third party. This is one of the major benefits for businesses as it completely removes the costs that are required to pay third parties.bitcoin talk server bitcoin аналоги bitcoin opencart bitcoin
bitcoin вебмани bitcoin создатель blue bitcoin bitcoin joker ethereum добыча bitcoin etherium
bux bitcoin ethereum course курс tether dark bitcoin abi ethereum ethereum рубль pirates bitcoin курс ethereum bitcoin оплатить
bitcoin скачать bitcoin casinos bitcoin бот bitcoin in bitcoin gift bitcoin mixer bitcoin порт
фото bitcoin bitcoin ann p2pool bitcoin delphi bitcoin
bitcoin cny bitcoin bux ethereum клиент ico ethereum bitcoin bcc бот bitcoin blender bitcoin bitcoin продам coinbase ethereum kaspersky bitcoin bitcoin fields
bitcoin cost bitcoin cap bitcoin froggy bitcoin eobot bitcoin проблемы ютуб bitcoin ethereum poloniex purse bitcoin курса ethereum
символ bitcoin программа ethereum bitcoin flapper
xapo bitcoin
block ethereum rpg bitcoin
ethereum обмен
get bitcoin The copy of the ledger is shared amongst participants in a distributed ledger while in a traditional ledger, a single copy is maintained in a centralized location. It is not shared amongst the participants.bitcoin 3 kinolix bitcoin copay bitcoin значок bitcoin bitcoin fox bitcoin virus верификация tether
бесплатный bitcoin взломать bitcoin
bitcoin microsoft сервер bitcoin
bitcoin начало
bitcoin порт Beginning with Smart Contracts and decentralized Applications (Dapps), Ethereum soon realized that they needed a single currency for their platform that could be trusted in line with their protocols. This led the Ethereum Foundation, a body that oversees Ethereum’s activity but can not independently change protocols, to create Ether.bitcoin cranes mini bitcoin
bitcoin криптовалюта
pump bitcoin bitcoin ios fast bitcoin bitcoin список bitcoin converter uk bitcoin ethereum explorer
wmx bitcoin скачать bitcoin bitcoin like андроид bitcoin
кошелька bitcoin bitcoin шахты магазин bitcoin bitcoin протокол пул monero kurs bitcoin bitcoin вирус портал bitcoin kinolix bitcoin bitcoin information bitcoin автосерфинг bitcoin poker отзывы ethereum bitcoin rigs криптовалюта tether future bitcoin bitcoin froggy вебмани bitcoin course bitcoin график bitcoin bitcoin delphi сети bitcoin daemon bitcoin bitcoin dance credit bitcoin monero прогноз bitcoin source курсы bitcoin debian bitcoin bitcoin server bitcoin passphrase When Maxwell presented Sidechain Elements at the San Francisco Bitcoin Devs meetup, I recall him saying 'One of the greatest regrets held by the greybeards at the IETF is that the Internet was not built with encryption as the default method of transmitting data.'генераторы bitcoin blocks bitcoin The first miner to get a resulting hash within the desired range announces its victory to the rest of the network. All the other miners immediately stop work on that block and start trying to figure out the mystery number for the next one. As a reward for its work, the victorious miner gets some new bitcoin.Are there new cryptocurrency-driven offerings that we could provide?hourly bitcoin birds bitcoin bitcoin earnings
bitcoin torrent майнер monero
bitcoin счет
bitcoin обмен перспективы bitcoin скрипт bitcoin ethereum homestead bitcoin игры bitcoin wm bitcoin nodes carding bitcoin monero ann bitcoin spinner
ethereum frontier bitcoin курс client ethereum взлом bitcoin ethereum php bitcoin 3 bitcoin обсуждение bitcoin xpub обучение bitcoin
bitcoin государство сложность ethereum
bitcoin doubler ethereum code динамика ethereum bitcoin сатоши фильм bitcoin china bitcoin monero новости форк bitcoin bitcoin book bitcoin base love bitcoin bitcoin разделился краны monero secp256k1 bitcoin bitcoin ios forum ethereum auto bitcoin tether 4pda reverse tether
программа ethereum bitcoin украина There can only ever be 84 million Litecoins, and as it stands, 55.58 million have been released or mined already, meaning almost 30 million coins are still fair game for miners. The figure of 84 million was based on the 21 million limit of Bitcoin, and the fact that Litecoin was designed to be 4x faster than Bitcoin.надежность bitcoin bitcoin pool bitcoin фильм ethereum clix bitcoin scam Generate and store one or more private keys.cryptocurrency arbitrage ethereum parity bitcoin monkey casinos bitcoin ethereum статистика
salt bitcoin робот bitcoin adc bitcoin карты bitcoin mine ethereum cpp ethereum bitcoin go lavkalavka bitcoin
bitcoin cache solo bitcoin
bitcoin registration торги bitcoin эфир bitcoin windows bitcoin
bitcoin wiki логотип bitcoin bitcoin софт
bitcoin daemon monero ann bitcoin работа
mail bitcoin bitcoin virus bitcoin apple Blockchain is the technology on which bitcoin, and all cryptocurrencies, run. It is the means that is used to record bitcoin transactions, and it is for this reason that banks and financial institutions fear the new technology.If a blockchain is used as a database, the information going into the database needs to be of high quality. The data stored on a blockchain is not inherently trustworthy, so events need to be recorded accurately in the first place.hosting bitcoin bitcoin бонусы bitcoin экспресс пул monero faucets bitcoin
ethereum ротаторы
asrock bitcoin bitcoin алгоритм electrum bitcoin bitcoin carding bitcoin обмена dark bitcoin bitcoin python bitcoin classic bitcoin mail bitcoin express bitcoin wmx bitcoin iq ethereum ферма конференция bitcoin bitcoin значок fire bitcoin хабрахабр bitcoin Data in the blockchainswarm ethereum алгоритмы ethereum