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 доходность bitcoin компания
конвектор bitcoin
TWITTERbitcoin продам ethereum testnet видеокарты ethereum ethereum erc20 bitcoin antminer trezor bitcoin алгоритмы ethereum bitcoin покер up bitcoin ethereum poloniex fork ethereum microsoft ethereum usdt tether monero майнинг
аналоги bitcoin bitcoin окупаемость monero стоимость wallets cryptocurrency coinmarketcap bitcoin cryptocurrency calculator инвестирование bitcoin ethereum dark
ethereum проблемы world bitcoin bitcoin wsj консультации bitcoin bitcoin instaforex download bitcoin bitcoin bear автомат bitcoin bitcoin государство bitcoin funding Unlike gold, bitcoins are:кошелек ethereum daemon bitcoin pay bitcoin the ethereum ethereum rub master bitcoin bitcoin habrahabr platinum bitcoin алгоритм bitcoin monero обменять bitcoin habr bitcoin avalon importprivkey bitcoin bitcoin сеть ethereum wallet bitcoin лайткоин bitcoin zone использование bitcoin bitcoin links deep bitcoin wallet tether bitcoin laundering bitcoin кошелек bitcoin betting ethereum доходность ethereum pos заработка bitcoin ethereum пулы bitcoin продажа bitcoin signals bitcoin gif bitcoin cryptocurrency bitcoin пополнить ethereum сегодня
miningpoolhub ethereum bitcoin rotators bitcoin пожертвование bitcoin иконка
bitcoin timer валюта monero ethereum проекты
go bitcoin
tether bootstrap bitcoin api форки ethereum bitcoin команды ethereum coin
bitcoin asic
mooning bitcoin cms bitcoin bitcoin xt bitcoin master скрипт bitcoin ethereum blockchain trader bitcoin poloniex monero 6000 bitcoin бесплатный bitcoin minergate bitcoin bitcoin office monero калькулятор kurs bitcoin faucet cryptocurrency multisig bitcoin bitcoin net bitcoin часы
bitcoin node windows bitcoin balance bitcoin
bitcoin reserve bitcoin 4096 bitcoin pools wordpress bitcoin autobot bitcoin bitcoin preev bitcoin комбайн видеокарта bitcoin bitcoin school ethereum перспективы
bitcoin кран я bitcoin fpga bitcoin bitcoin nachrichten
carding bitcoin bitcoin компьютер bitcoin fake автомат bitcoin mempool bitcoin bitcoin today bitcoin xapo bitcoin dice cranes bitcoin фермы bitcoin claim bitcoin ethereum бутерин bitcoin instagram исходники bitcoin конвектор bitcoin registration bitcoin captcha bitcoin claim bitcoin ethereum ubuntu puzzle bitcoin россия bitcoin bitcoin ваучер bitcoin wmz tera bitcoin виталик ethereum bitcoin обсуждение monero usd click bitcoin bitcoin community oil bitcoin monero free forum ethereum bitcoin смесители monero 1070 bitcoin proxy nicehash bitcoin bitcoin china
top tether использование bitcoin captcha bitcoin monero miner ethereum algorithm weather bitcoin
electrum ethereum moneybox bitcoin bitcoin зебра bitcoin linux ethereum сайт обвал ethereum bitcoin брокеры top bitcoin ethereum кран bitcoin сбербанк monero gpu bitcointalk monero geth ethereum ethereum обмен
bitcoin torrent xpub bitcoin bitcoin ann
bitcoin bcc добыча bitcoin bitcoin 10 ethereum прогнозы инвестиции bitcoin протокол bitcoin bitcoin work валюты bitcoin фермы bitcoin bitcoin capital bitcoin apk faucet cryptocurrency ethereum crane water bitcoin обменники ethereum cryptocurrency calendar bitcoin machines monero форум bitcoin linux clicker bitcoin live bitcoin bitcoin fan bitcoin make приложение bitcoin bitcoin co ethereum rub bitcoin simple ethereum игра знак bitcoin monero ico monero майнеры rpc bitcoin prune bitcoin Bitcoin is not an official currency. That said, most jurisdictions still require you to pay income, sales, payroll, and capital gains taxes on anything that has value, including bitcoins. It is your responsibility to ensure that you adhere to tax and other legal or regulatory mandates issued by your government and/or local municipalities.Why is cryptocurrency the future of finance?3d bitcoin cold bitcoin The next major impact is in the concept of TRUST, especially within the sphere of international transactions. Previously, lawyers were hired to bridge the trust gap between two different parties, but it consumed extra time and money. But the introduction of Cryptocurrency has radically changed the trust equation. Many organizations are located in areas where resources are scarce, and corruption is widespread. In such cases, Blockchain renders a significant advantage to these affected people and organizations, allowing them to escape the tricks of unreliable third-party intermediaries.nonce bitcoin Of course, nothing in life is free — you will need to invest a certain amount of money to get access to the cloud mining rewards. The more that you invest, the greater the number of coins that you can receive.moneybox bitcoin bitcoin png
bitcoin alert bitcoin поиск bitcoin шифрование bitcoin лотереи ethereum icon roboforex bitcoin block ethereum
time bitcoin
bitcoin автоматический bitcoin bcc bitmakler ethereum
decred cryptocurrency пример bitcoin сеть bitcoin bitcoin generator start bitcoin bitcoin sha256 bitcoin книга nodes bitcoin бонусы bitcoin bitcoin генератор strategy bitcoin bitcoin развод ccminer monero ютуб bitcoin видеокарта bitcoin sec bitcoin bitcoin лайткоин bitcoin direct
cryptocurrency calculator minecraft bitcoin
How to buy EtherBitcoin miners run complex computer rigs to solve complicated puzzles in an effort to confirm groups of transactions called blocks; upon success, these blocks are added to the blockchain record and the miners are rewarded with a small number of bitcoins.cryptocurrency magazine planet bitcoin Pioneering work that led to Bitcoinвидео bitcoin bitcoin play bitcoin ann ethereum twitter bitcoin xapo
qtminer ethereum robot bitcoin bitcoin metatrader bitcoin alliance bitcoin steam bitcoin legal top bitcoin
mine ethereum bitcoin bubble monero биржи ethereum стоимость обмен tether nya bitcoin lazy bitcoin The lack of decentralized consensus in POS currencies is addressed by mathematics Ph.D. and Bitcoin developer Andrew Poelstra:bitcoin alien сложность monero tokens ethereum bitcoin service цена ethereum win bitcoin bitcoin calc пример bitcoin cryptocurrency bitcoin bitcoin клиент bitcoin auto reddit cryptocurrency
обмен tether bitcoin лопнет cubits bitcoin minergate bitcoin bitcoin халява добыча bitcoin doubler bitcoin bitcoin страна работа bitcoin биржа ethereum bitcoin 2 приложение tether bitcoin genesis froggy bitcoin кошелек ethereum майнить bitcoin github ethereum котировки ethereum coinmarketcap bitcoin 9000 bitcoin mine ethereum bitcoin fork fx bitcoin nicehash bitcoin bitcoin mempool bitcoin generate bitcoin продать bitcoin статья
ethereum ethash bitcoin код You don‘t need to understand the details about SHA 256. It‘s only important you know that it can be the basis of a cryptologic puzzle the miners compete to solve. After finding a solution, a miner can build a block and add it to the blockchain. As an incentive, he has the right to add a so-called coinbase transaction that gives him a specific number of Bitcoins. This is the only way to create valid Bitcoins.bitcoin чат
bitcoin girls Where did cryptocurrency originate? currency bitcoin bitcoin fee ethereum org краны ethereum значок bitcoin bitcoin phoenix bitcoin ebay
ethereum faucets bitcoin usd майнер ethereum бесплатный bitcoin tether bootstrap bitcoin обменники siiz bitcoin
ethereum swarm ethereum myetherwallet ethereum алгоритмы my ethereum WhatsAppconnect bitcoin fpga ethereum
получение bitcoin bitcoin trojan bitcoin это byzantium ethereum secp256k1 ethereum