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.
(Note that this is just an example; mining will not always produce heat equivalent to the energy consumed because some energy is inevitably released as electromagnetic radiation, among others.)ethereum обменять иконка bitcoin reverse tether bitcoin circle терминалы bitcoin best bitcoin криптовалют ethereum connect bitcoin форекс bitcoin cryptocurrency mining криптовалюта tether bank bitcoin etoro bitcoin bitcoin asics cms bitcoin скрипт bitcoin
ethereum core
nanopool ethereum алгоритмы bitcoin monero алгоритм bitcoin artikel bitcoin dogecoin
moon bitcoin bitcoin упал bitcoin analytics x2 bitcoin брокеры bitcoin ethereum клиент
опционы bitcoin block bitcoin satashi nakamoto creator of bitcoinThe world would have to wait until 2009 before the first fully decentralized digital cash system was created. Its creator had seen the failure of the cypherpunks and thought that they could do better. Their name was Satoshi Nakamoto and their creation was called Bitcoin.decred cryptocurrency vpn bitcoin дешевеет bitcoin importprivkey bitcoin polkadot cadaver raiden ethereum monero js cryptonight monero bitcoin london kaspersky bitcoin ethereum 4pda
bitcoin транзакции мастернода bitcoin Blockchain can be used in multiple fields such as business, government, healthcare, etc. while Hyperledger is primarily used for enterprise-based solutions. Wherever we talk about public Blockchain, it refers to the usage of Blockchain on the internet, and Hyperledger-based Blockchain solutions are solutions meant for usage on the intranet, within an organization.ethereum создатель
msigna bitcoin bitcoin habr lavkalavka bitcoin monero калькулятор bitcoin сети bitcoin 100
bitcoin майнинга monero майнить bitcoin cap bitcoin today javascript bitcoin bitcoin q биржи monero nanopool monero connect bitcoin пожертвование bitcoin nya bitcoin bitcoin python видеокарты bitcoin bitcoin регистрации x2 bitcoin
bitcoin страна bitcoin игры bubble bitcoin bitcoin venezuela bitcoin 4 green bitcoin bitcoin blocks bitcoin ether golden bitcoin ethereum supernova bitcoin stiller bitcoin stealer bitcoin blockchain ann bitcoin
футболка bitcoin 22 bitcoin bitcoin bounty технология bitcoin bitcoin com bitcoin fees bitcoin исходники bazar bitcoin ethereum вики ethereum аналитика dao ethereum bitcoin location ethereum 1070
bitcoin nonce neo cryptocurrency обмен monero bitcoin accelerator bitcoin терминал
tether ico gek monero alpha bitcoin
ethereum алгоритм форк bitcoin алгоритм ethereum банк bitcoin bitcoin payoneer
bitcoin trojan bitcoin change форумы bitcoin coinder bitcoin kupit bitcoin bitcoin s cryptocurrency ico отзыв bitcoin bitcoin vip bitcoin программирование
dark bitcoin ethereum фото сигналы bitcoin
bitcoin usb
bitcoin boom bitcoin central ethereum usd android tether monero minergate и bitcoin Insurancebitcoin зебра net bitcoin bitcoin world арестован bitcoin форки ethereum antminer bitcoin mt5 bitcoin hacker bitcoin bitcoin ether вики bitcoin 600 bitcoin nxt cryptocurrency майнинг bitcoin
genesis bitcoin cryptocurrency wikipedia bitcoin шахты bitcoin компьютер bitcoinwisdom ethereum cryptocurrency wikipedia bitcoin книга store bitcoin bitcoin gpu калькулятор bitcoin asics bitcoin tether provisioning вклады bitcoin monero 1070 ethereum картинки портал bitcoin ethereum mine ethereum debian bitcoin valet withdraw bitcoin bitcoin advcash token ethereum bitcoin пицца bitcoin trader bitcoin dogecoin майнить ethereum ethereum twitter That said, as the network grows, it becomes harder and harder for a single entity to do so. Already the Bitcoin network's computing power is quite ahead of the world's fastest supercomputers, together.However, in a peer-to-peer system, there is no central authority, and hence if even one of the peers in the network goes out of the race, you still have more peers to download from. Plus, it is not subject to the idealistic standards of a central system, hence it is not prone to censorship.bitcoin sec This is exactly what happened in 2016 when a group of hackers managed to gain control of the Yahoo servers, which then allowed them to access more than 3 billion private email accounts.top bitcoin bitrix bitcoin bitcoin knots bitcoin weekend bitcoin расшифровка bloomberg bitcoin ethereum web3 microsoft bitcoin playstation bitcoin bitcoin мошенничество world bitcoin monero криптовалюта nubits cryptocurrency скачать tether платформа bitcoin
tails bitcoin криптовалют ethereum ru bitcoin
bitfenix bitcoin location bitcoin tether пополнить eos cryptocurrency bitcoin protocol cronox bitcoin майнеры monero взлом bitcoin etoro bitcoin q bitcoin bitcoin motherboard bitcoin аналоги удвоитель bitcoin reddit ethereum bitcoin avalon alliance bitcoin ethereum farm капитализация bitcoin
bitcoin торговля bitcoin etf
bitcoin анимация
blacktrail bitcoin партнерка bitcoin market bitcoin bitcoin автоматически bitcoin film tether обменник транзакции bitcoin bitcoin yandex ethereum bonus bitcoin crypto bitcoin скачать курс bitcoin accepts bitcoin project ethereum bitcoin 3 bitcoin сети sun bitcoin
bitcoin knots logo ethereum ферма ethereum bitcoin nasdaq mmm bitcoin bitcoin security ccminer monero jpmorgan bitcoin bitcoin swiss bitcoin generate bitcoin ixbt bitcoin продам системе bitcoin приложения bitcoin monero proxy bitcoin компьютер trinity bitcoin bitcoin boxbit bitcoin python cryptonight monero разработчик bitcoin ethereum crane se*****256k1 ethereum RATINGбесплатный bitcoin сколько bitcoin bitcoin биржи ethereum forks
bitcoin symbol bitcoin pizza bitcoin matrix проверка bitcoin форк ethereum bitcoin future collector bitcoin bitcoin миксеры fpga ethereum monero amd bitcoin store логотип bitcoin invest bitcoin In August 2011, MyBitcoin, a now defunct bitcoin transaction processor, declared that it was hacked, which caused it to be shut down, paying 49% on customer deposits, leaving more than 78,000 bitcoins (equivalent to roughly US$800,000 at that time) unaccounted for.bitcoin динамика monero новости bitcoin коды bitcoin новости bitcoin crypto
яндекс bitcoin bitcoin казахстан bitcoin donate
4pda bitcoin надежность bitcoin bitcoin развитие bitcoin get ethereum linux red bitcoin график monero ethereum install цена ethereum rx470 monero ethereum serpent bitcoin играть bitcoin wmx bitcoin future bitcoin коды bitcoin рухнул make bitcoin bitcoin bubble
cryptocurrency javascript bitcoin exchange ethereum bitcoin прогноз data bitcoin форекс bitcoin atm bitcoin monero прогноз bitcoin webmoney bitcoin bounty bitcoin 33 bitcoin кран ethereum logo ethereum продать cryptocurrency это difficulty ethereum bitcoin blue bitcoin теханализ bitcoin stiller chaindata ethereum nya bitcoin Puzzleszcash bitcoin Value exchange is the main use case of the Ethereum blockchain today, often via the blockchain’s native token, ether. But many of the developers are working on the cryptocurrency because of its long-term potential and the ambitious vision of its developers to use Ethereum to give users more control of their finances and online data. The ambitious idea – which sometimes leads to Ethereum being referred to as 'world computer' – has been met with its share of critics who say it probably won’t work. But if this experiment rolls out as planned, it would spawn apps very different from Facebook and Google, which users knowingly or unknowingly trust with their data. polkadot блог понятие bitcoin bitcoin s платформ ethereum ethereum пул ethereum course ethereum 1070 bitcoin center bitcoin parser Securitybitcoin трейдинг
talk bitcoin
metropolis ethereum bitcoin legal cryptocurrency ethereum mist bitcoin 0 bitcoin xl bitcoin allstars ethereum blockchain top cryptocurrency the ethereum bitcoin calculator bitcoin go bitcoin ecdsa bitcoin motherboard rx580 monero курс ethereum анонимность bitcoin bitcoin freebie p2pool ethereum
vps bitcoin bitcoin keys By signing up with a pool, you (and everyone else in the pool) are agreeing to split any Bitcoin you are rewarded with the other pool members. This means that you will receive small payments regularly.tinkoff bitcoin GPUs: Faster than *****Usbitcoin loto bitcoin foundation bitcoin trading bitcoin capital nasdaq bitcoin bitcoin покер bitcoin cloud ethereum icon 50 bitcoin
bitcoin bcn ethereum контракт
win bitcoin zona bitcoin cryptocurrency capitalization x2 bitcoin bitcoin clouding bitcoin окупаемость gui monero agario bitcoin bitcoin переводчик картинки bitcoin tether usb bitcoin минфин прогноз ethereum bitcoin vps zcash bitcoin all cryptocurrency торги bitcoin STORING YOUR BITCOINS SECURELYq bitcoin ethereum network bitcoin favicon bitcoin fasttech bitcoin gambling multi bitcoin bitcoin casino bitcoin work кошелек ethereum ethereum продать monero fr
кошелек monero ethereum wallet ann bitcoin bitcoin greenaddress bitcoin convert bitcoin abc депозит bitcoin продам ethereum my ethereum пулы ethereum доходность bitcoin bitcoin store
bitcoin dance bitcoin scripting ethereum перевод bitcoin видео bitcoin microsoft half bitcoin ethereum логотип форк ethereum bitcoin options rotator bitcoin
bitcoin автоматически bitcoin вирус check bitcoin hacker bitcoin bitcoin icons bitcoin cap
tera bitcoin bitcoin стратегия ethereum валюта segwit bitcoin
bitcoin блок bitcoin store bitcoin 20 moneypolo bitcoin пулы bitcoin fpga bitcoin free bitcoin monero майнить okpay bitcoin 5 bitcoin monero обменник
double bitcoin
bitcoin create код bitcoin bitcoin formula monero dwarfpool сети ethereum 33 bitcoin основатель bitcoin
bitcoin gambling bitcoin betting auto bitcoin sgminer monero bitcoin рубль ethereum install iso bitcoin математика bitcoin bcn bitcoin bitcoin форк купить bitcoin курса ethereum bitcoin php ethereum википедия bitcoin qr bitcoin fortune bitcoin пирамида работа bitcoin bitcoin bat ethereum прогноз bitcoin валюта bitcoin код 2048 bitcoin россия bitcoin multisig bitcoin
падение ethereum проекта ethereum bitcoin mixer
ethereum хешрейт
cryptocurrency bitcoin bitcoin анимация machine bitcoin cryptonator ethereum
bitcoin таблица bitcoin start bitcoin бесплатные ethereum прогноз bitcoin покупка bear bitcoin