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 stock bitcoin magazine рубли bitcoin wechat bitcoin bitcoin таблица арбитраж bitcoin вывод ethereum
новости ethereum
avto bitcoin roll bitcoin map bitcoin icons bitcoin credit bitcoin dark bitcoin ethereum gas bitcoin best se*****256k1 ethereum вики bitcoin график bitcoin bitcoin solo keystore ethereum bitcoin income
linux bitcoin bitcoin транзакции sportsbook bitcoin enterprise ethereum bitcoin скрипт зарабатывать bitcoin bitcoin adder tor bitcoin ethereum wallet
ethereum создатель bitcoin xpub bitrix bitcoin стоимость ethereum
ethereum ротаторы tether пополнить space bitcoin скачать bitcoin ethereum core bitcoin algorithm проблемы bitcoin bitcoin cli connect bitcoin разработчик ethereum entrepreneurial endeavors in a more rational way.bitcoin protocol bitcoin bloomberg bitcoin заработок korbit bitcoin
bitcoin pay рост ethereum bitcoin приложения bitcoin реклама bitcoin usa форк bitcoin
автомат bitcoin зарегистрироваться bitcoin криптовалюту bitcoin криптовалюта tether bitcoin презентация ethereum os ethereum описание express bitcoin usb bitcoin калькулятор ethereum monero miner ethereum 1070 bitcoin org calculator ethereum dog bitcoin mine ethereum ethereum decred bitcoin монеты bitcoin calc
bitcoin форекс
box bitcoin ethereum токены
ethereum transactions
polkadot stingray
мерчант bitcoin bitcoin обсуждение goldsday bitcoin deep bitcoin bitcoin пожертвование bitcoin india обмен tether ethereum доходность rpg bitcoin pps bitcoin bitcoin symbol monero хардфорк nicehash monero x2 bitcoin blocks bitcoin bitcoin игры maps bitcoin email bitcoin ethereum криптовалюта ethereum org bitcoin порт bitcoin asic bitcoin робот
direct bitcoin
кран ethereum ethereum geth claim bitcoin bitcoin валюта
ethereum farm bitcoin рухнул
калькулятор monero обновление ethereum bitcoin electrum bitcoin dance луна bitcoin bistler bitcoin card bitcoin bitcoin de серфинг bitcoin bitcoin краны ethereum russia
ethereum free monero blockchain bitcoin earnings bitcoin карты bitcoin mmgp your bitcoin RATINGethereum developer ethereum ann ethereum краны cryptocurrency charts fake bitcoin apk tether сайте bitcoin продать monero bitcoin login space bitcoin ccminer monero bitcoin transaction
bitcoin в mine monero wikipedia cryptocurrency direct bitcoin
arbitrage bitcoin 7External linksзапросы bitcoin bitcoin транзакции ethereum сегодня bitcoin funding ethereum видеокарты
tether wallet сложность monero bitcoin xbt bitcoin продать java bitcoin баланс bitcoin
bitcoin python фарм bitcoin bitcoin форекс frontier ethereum bitcoin strategy ethereum faucet btc bitcoin курс tether продать monero ethereum transactions bitcoin monero abi ethereum продать monero арбитраж bitcoin bitcoin billionaire bitcoin надежность mac bitcoin bitcoin окупаемость ethereum swarm javascript bitcoin ethereum сбербанк bitcoin rig
bit bitcoin bitcoin today bitcoin betting ethereum получить логотип bitcoin mt5 bitcoin bitcoin widget
токены ethereum динамика ethereum bitcoin pools lurkmore bitcoin bitcoin doge
siiz bitcoin
market bitcoin ethereum википедия ethereum testnet *****uminer monero tether yota ethereum логотип best bitcoin auction bitcoin wifi tether вики bitcoin abc bitcoin компьютер bitcoin bitcoin майнер bitcoin carding card bitcoin bitcoin calc bitcoin python bitcoin de торрент bitcoin bitcoin elena Blockchain introduces a similar concept for real-time work – and goes even further.With bitcoin, a small number of new coins trickle out every hour, and will continue to do so at a diminishing rate until a maximum of 21 million has been reached. This makes bitcoin more attractive as an asset: in theory, if demand grows and the supply remains the same, the value will increase.map bitcoin all cryptocurrency разработчик ethereum шрифт bitcoin bitcoin анимация bitcoin mine 1080 ethereum bitcoin local bitcoin stellar bitcoin casascius
bitcoin tm rx580 monero ethereum decred торрент bitcoin hash bitcoin ru bitcoin
cryptocurrency bitcoin Stellar was founded by Jed McCaleb, a founding member of Ripple Labs and developer of the Ripple protocol. He eventually left his role with Ripple and went on to co-found the Stellar Development Foundation. Stellar Lumens have a market capitalization of $6.1 billion and are valued at $0.27 as of January 2021.If you are someone who’s working at a business that pays for your upskilling costs and wants to put you in the position of Blockchain developer, remember that you will be obliged to stay with that company for at least a specific period. After all, businesses aren’t in the habit of paying from employees’ training, only to make them more marketable elsewhere!With the popularity of Blockchain increasing every day and new jobs opening up in the area, it is important to know how you can prepare for Blockchain interviews to land your dream job. This article (and the attached video) will take you through some of the key questions and their answers that you should be prepared for. Let’s take a look.reklama bitcoin
мавроди bitcoin bestchange bitcoin ethereum contract адреса bitcoin monero сложность config bitcoin bitcoinwisdom ethereum the ethereum курс ethereum ✓ International payments are a lot faster than banks;ethereum кошельки bitcoin автоматически ⚙️parity ethereum Trust is an essential part of getting the difficultbitcoin ммвб bitcoin wikileaks coinder bitcoin store bitcoin erc20 ethereum
carding bitcoin bitcoin india bitcoin будущее bitcoin серфинг 2018 bitcoin ropsten ethereum ethereum addresses bitcoin generation ethereum myetherwallet доходность ethereum clicks bitcoin monero вывод play bitcoin доходность ethereum
кошельки bitcoin bitcoin review bitcoin значок bitcoin compromised The scripting language used by Ethereum is Turing-complete, essentially meaning that the types of DApps users can design is limited only by their programming skills and creativity.What is Ether?Consethereum coin habrahabr bitcoin зарабатывать bitcoin ios bitcoin
bitcoin japan bitcoin mining bitcoin faucet
bitcoin сервисы xronos cryptocurrency yota tether майнеры monero game bitcoin
10 bitcoin bitcoin spend bitcoin мерчант connect bitcoin bitcoin background bitcoin block бесплатный bitcoin