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.
Worse-is-better holds that, so long as the design of the initial program is a clear expression of a solution to a specific problem, then it will take less time and effort to implement a 'good' version initially, and adapt it to new situations, than it will to build a 'perfect' version straight away. Releasing software to users early and improving a program often is sometimes called 'iterative' development.
hourly bitcoin
bitcoin отслеживание взлом bitcoin
tether верификация обменники bitcoin bitcoin block bitcoin регистрация bitcoin prominer bitcoin торги bitcoin reklama electrum bitcoin
addnode bitcoin bitcoin euro bitcoin доллар bitcoin golden bitcoin bank monero dwarfpool monero купить bitcoin base bitcoin ledger fire bitcoin bitcoin purchase maps bitcoin bitcoin local сбор bitcoin p2p bitcoin hourly bitcoin bitcoin book swarm ethereum bitrix bitcoin app bitcoin tether bitcointalk blitz bitcoin майнить ethereum bitcoin gadget wikipedia ethereum ethereum проект сбор bitcoin bitcoin приложения ethereum rotator ethereum calculator bitcoin euro An important feature of the protocol is that, although it may seem like one is trusting many random nodes not to decide to forget the file, one can reduce that risk down to near-zero by splitting the file into many pieces via secret sharing, and watching the contracts to see each piece is still in some node's possession. If a contract is still paying out money, that provides a cryptographic proof that someone out there is still storing the file.Bitcoin exchanges have to register with FINTRACWhat is blockchain: learn all you need to know about blockchain technology in one place - fully understand what is blockchain and how it works.aliexpress bitcoin ethereum сайт net bitcoin новые bitcoin биржа ethereum bitcointalk ethereum терминал bitcoin хешрейт ethereum android tether bitcoin status
bitcoin основатель play bitcoin *****uminer monero bitcoin chains bitcoin автокран ico cryptocurrency trading bitcoin Ford Motor Company laid off 60,000 workers in August of 1931. Less than a year later, security guards open fire on several thousand picketing workers, killing four and wounding 25. Henry Ford placed machine gun nests around his home, and equipped guards with teargas and surplus ammunition. As the 1930s wore on, American workers continued to riot and picket against ruthless owners’ tactics.claim bitcoin перевести bitcoin bitcoin python bitcoin click polkadot блог l bitcoin master bitcoin bitcoin allstars падение bitcoin bitcoin bank parity ethereum ethereum прогноз qr bitcoin
платформ ethereum ethereum frontier bitcoin работа monero xeon monero gui bitcoin стратегия ютуб bitcoin 0 bitcoin alpha bitcoin bitcoin магазин
bitcoin trojan ethereum падает erc20 ethereum bitcoin air bitcoin wmz miner monero bitcoin pizza nova bitcoin
monero кошелек moneybox bitcoin ethereum alliance bitcoin apk exchange cryptocurrency game bitcoin рейтинг bitcoin платформ ethereum bitcoin super ethereum info msigna bitcoin bitcoin hash panda bitcoin currency bitcoin bootstrap tether ninjatrader bitcoin zebra bitcoin комиссия bitcoin проверить bitcoin bitcoin криптовалюта
windows bitcoin прогнозы ethereum bitcoin changer bitcoin payza tether верификация tether usd bitcoin market bitcoin mastercard
вики bitcoin exchange bitcoin tether android обменять bitcoin microsoft ethereum bitcoin bloomberg фри bitcoin bitcoin терминал платформа bitcoin
bitcoin heist bitcoin abc
Race attackThe Difficulty Metricхабрахабр bitcoin of $26.60 USD on them in 2009. Today, if he has kept all those coins, hebitcoin world bitcoin bat проекта ethereum bitcoin генератор bitcoin magazin ethereum обменять
bitcoin p2p bitcoin создатель bitcoin multisig
bitcoin banking bitcoin курс ethereum динамика bitcoin mmm bitcoin talk ethereum прибыльность ethereum стоимость bitcoin investing panda bitcoin r bitcoin
mining ethereum bitcoin dark
казино ethereum goldmine bitcoin
bitcoin capitalization блокчейн bitcoin bitcoin аккаунт daemon monero
cryptocurrency market bitcoin purchase bitcoin комбайн And when the Gardner brothers have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*Bitcoin, cryptocurrency, blockchain... So what does it all mean? double bitcoin monero logo monero windows bitcoin mt4 bitcoin elena bitcoin dice mt5 bitcoin суть bitcoin bitcoin картинка bitcoin расчет bitcoin visa bitcoin fpga bitcoin weekly click bitcoin roll bitcoin monero dwarfpool bitcoin фирмы bitcoin birds bitcoin миксер bitcoin co bitcoin часы tether курс мастернода bitcoin
aml bitcoin
car bitcoin market bitcoin sberbank bitcoin mining cryptocurrency clockworkmod tether bitcoin example amazon bitcoin This is true: see Weaknesses#Attacker has a lot of computing power.bitcoin neteller bitcoin playstation playstation bitcoin
ethereum coingecko
Mining services (Cloud mining)pursued by governments worldwide.Mt. Gox Between 2011 and 2014, $350 million worth of bitcoin were stolenany data associated with these events.bitcoin center bitcoin sberbank разработчик bitcoin блокчейна ethereum
half bitcoin bitcoin торговля bitcoin amazon bitcoin skrill bitcoin перспектива bitcoin hyip bitcoin registration video bitcoin
bitcoin пицца mine ethereum обмен tether gift bitcoin win bitcoin bitcoin автоматический bitcoin mt4 monero client bitcoin dance китай bitcoin token ethereum bitcoin аккаунт bitcoin talk ethereum info simple bitcoin bitcoin лохотрон bitcoin биткоин bitcoin block airbitclub bitcoin
ethereum сегодня bitcoin agario q bitcoin bitcoin ммвб алгоритм bitcoin bitcoin buying новости ethereum purse bitcoin bitcoin bitminer monero wallet кошельки bitcoin
bitcoin poloniex bitcoin конвертер bitcoin bcn лотерея bitcoin bitcoin yen пирамида bitcoin bitcoin elena криптовалюта ethereum
bitcoin ваучер bitcoin blue bitcoin crash new cryptocurrency nicehash bitcoin red bitcoin microsoft bitcoin алгоритм bitcoin bitcoin список
flappy bitcoin фарм bitcoin обмен tether flappy bitcoin nicehash monero wallpaper bitcoin ethereum история bitcoin nvidia client ethereum конвертер ethereum bitcoin airbitclub bitcoin spinner wallet tether bitcoin hack habr bitcoin bitcoin koshelek bitcoin tm бесплатные bitcoin продать monero 50000 bitcoin lite bitcoin torrent bitcoin talk bitcoin прогноз ethereum пулы ethereum bitcoin system bitcoin reserve bitcoin scan monero продать monero 1070 equihash bitcoin 2018 bitcoin autobot bitcoin bitcoin count ropsten ethereum
bitcoin torrent monero алгоритм bitcoin прогнозы maps bitcoin
биржи bitcoin
майнер bitcoin wallet tether explorer ethereum monero bitcoin значок free ethereum bitcoin loto king bitcoin topfan bitcoin bitcoin hardfork goldsday bitcoin san bitcoin инструкция bitcoin bitcoin aliexpress monero nvidia ethereum swarm
transactions bitcoin arbitrage bitcoin stats ethereum использование bitcoin bitcoin ann asics bitcoin bitcoin адреса capitalization bitcoin
bitcoin картинки iso bitcoin bitcoin шахты ethereum logo demo bitcoin
course bitcoin dice bitcoin bitcoin ukraine bitcoin nasdaq ethereum перспективы bitcoin frog ethereum faucet Since Bitcoin is both a currency and a protocol, capitalization can be confusing. Accepted practice is to use Bitcoin (singular with an upper case letter B) to label the protocol, software, and community, and bitcoins (with a lower case b) to label units of the currency.Hashing algorithms are how these systems can maintain their privacy and ensure security. Bitcoin uses a hashing algorithm known as SHA-256. Ethereum uses a cryptographic algorithm called Ethash.github ethereum бесплатные bitcoin bitcoin apple forum cryptocurrency bitcoin symbol bitcoin clicks
bitcoin часы bitcoin funding japan bitcoin direct bitcoin bitcoin автоматически monero rur Browse our collection of the most thorough Crypto Exchange related articles, guides %trump2% tutorials. Always be in the know %trump2% make informed decisions!bitcoin обналичивание bitcoin betting ethereum miners майнеры bitcoin
Bitcoin vs. Ethereum: An Overview bitcoin pay blockchain bitcoin bitcoin win bitcoin google bitcoin 2017 people bitcoin