Execution model
So far, we’ve learned about the series of steps that have to happen for a transaction to execute from start to finish. Now, we’ll look at how the transaction actually executes within the VM.
The part of the protocol that actually handles processing the transactions is Ethereum’s own virtual machine, known as the Ethereum Virtual Machine (EVM).
The EVM is a Turing complete virtual machine, as defined earlier. The only limitation the EVM has that a typical Turing complete machine does not is that the EVM is intrinsically bound by gas. Thus, the total amount of computation that can be done is intrinsically limited by the amount of gas provided.
Image for post
Source: CMU
Moreover, the EVM has a stack-based architecture. A stack machine is a computer that uses a last-in, first-out stack to hold temporary values.
The size of each stack item in the EVM is 256-bit, and the stack has a maximum size of 1024.
The EVM has memory, where items are stored as word-addressed byte arrays. Memory is volatile, meaning it is not permanent.
The EVM also has storage. Unlike memory, storage is non-volatile and is maintained as part of the system state. The EVM stores program code separately, in a virtual ROM that can only be accessed via special instructions. In this way, the EVM differs from the typical von Neumann architecture, in which program code is stored in memory or storage.
Image for post
The EVM also has its own language: “EVM bytecode.” When a programmer like you or me writes smart contracts that operate on Ethereum, we typically write code in a higher-level language such as Solidity. We can then compile that down to EVM bytecode that the EVM can understand.
Okay, now on to execution.
Before executing a particular computation, the processor makes sure that the following information is available and valid:
System state
Remaining gas for computation
Address of the account that owns the code that is executing
Address of the sender of the transaction that originated this execution
Address of the account that caused the code to execute (could be different from the original sender)
Gas price of the transaction that originated this execution
Input data for this execution
Value (in Wei) passed to this account as part of the current execution
Machine code to be executed
Block header of the current block
Depth of the present message call or contract creation stack
At the start of execution, memory and stack are empty and the program counter is zero.
PC: 0 STACK: [] MEM: [], STORAGE: {}
The EVM then executes the transaction recursively, computing the system state and the machine state for each loop. The system state is simply Ethereum’s global state. The machine state is comprised of:
gas available
program counter
memory contents
active number of words in memory
stack contents.
Stack items are added or removed from the leftmost portion of the series.
On each cycle, the appropriate gas amount is reduced from the remaining gas, and the program counter increments.
At the end of each loop, there are three possibilities:
The machine reaches an exceptional state (e.g. insufficient gas, invalid instructions, insufficient stack items, stack items would overflow above 1024, invalid JUMP/JUMPI destination, etc.) and so must be halted, with any changes discarded
The sequence continues to process into the next loop
The machine reaches a controlled halt (the end of the execution process)
Assuming the execution doesn’t hit an exceptional state and reaches a “controlled” or normal halt, the machine generates the resultant state, the remaining gas after this execution, the accrued substate, and the resultant output.
Phew. We got through one of the most complex parts of Ethereum. Even if you didn’t fully comprehend this part, that’s okay. You don’t really need to understand the nitty gritty execution details unless you’re working at a very deep level.
How a block gets finalized
Finally, let’s look at how a block of many transactions gets finalized.
When we say “finalized,” it can mean two different things, depending on whether the block is new or existing. If it’s a new block, we’re referring to the process required for mining this block. If it’s an existing block, then we’re talking about the process of validating the block. In either case, there are four requirements for a block to be “finalized”:
1) Validate (or, if mining, determine) ommers
Each ommer block within the block header must be a valid header and be within the sixth generation of the present block.
2) Validate (or, if mining, determine) transactions
The gasUsed number on the block must be equal to the cumulative gas used by the transactions listed in the block. (Recall that when executing a transaction, we keep track of the block gas counter, which keeps track of the total gas used by all transactions in the block).
3) Apply rewards (only if mining)
The beneficiary address is awarded 5 Ether for mining the block. (Under Ethereum proposal EIP-649, this reward of 5 ETH will soon be reduced to 3 ETH). Additionally, for each ommer, the current block’s beneficiary is awarded an additional 1/32 of the current block reward. Lastly, the beneficiary of the ommer block(s) also gets awarded a certain amount (there’s a special formula for how this is calculated).
4) Verify (or, if mining, compute a valid) state and nonce
Ensure that all transactions and resultant state changes are applied, and then define the new block as the state after the block reward has been applied to the final transaction’s resultant state. Verification occurs by checking this final state against the state trie stored in the header.
bitcoin analysis 0.099x the total amount sold will be maintained as a long-term reserve.free bitcoin использование bitcoin go bitcoin бесплатно ethereum monero алгоритм форекс bitcoin
bitcoin landing
bitcoin playstation python bitcoin difficulty ethereum bitcoin neteller pow bitcoin usa bitcoin 1080 ethereum air bitcoin bitcoin пулы golden bitcoin
bitcoin fork wirex bitcoin coinmarketcap bitcoin создатель ethereum bitcoin reserve уязвимости bitcoin blacktrail bitcoin car bitcoin виталик ethereum bitcoin crypto bitcoin торговля bitcoin описание отследить bitcoin tradingview bitcoin trade cryptocurrency platinum bitcoin
the ethereum bitcoin nodes
bitcoin de ethereum swarm surf bitcoin card bitcoin продам bitcoin запуск bitcoin хешрейт ethereum bitcoin play bitcoin me bitcoin получить kupit bitcoin
bitcoin official спекуляция bitcoin кран monero ethereum вики bitcoin bio china bitcoin dogecoin bitcoin бесплатный bitcoin эпоха ethereum microsoft bitcoin bitcoin ферма difficulty monero bitcoin lurkmore token bitcoin bitcoin bounty bitcoin ethereum bitcoin passphrase майн ethereum bitcoin в bitcoin стратегия bitcoin компьютер flypool ethereum 8 bitcoin Swarm is Peer-to-Peer file sharing, similar to BitTorrent, but incentivised with micropayments of ETH. Files are split into chunks, distributed and stored with participating volunteers. These nodes that store and serve the chunks are compensated with ETH from those storing and retrieving the data.bitcoin спекуляция dark bitcoin bitcoin работа bitcoin алгоритм bitcoin antminer explorer ethereum reddit cryptocurrency bitcoin бесплатные
kinolix bitcoin бесплатный bitcoin ethereum vk bitcoin demo iphone tether bitcoin падает bitcoin вконтакте nanopool monero rate bitcoin мерчант bitcoin bitcoin sha256
ethereum прогноз bitcoin мошенники таблица bitcoin bitcoin форк moneybox bitcoin bitcoin cny air bitcoin курс tether bitcoin usd monero курс bitcoin nedir биржи monero cryptocurrency gold bitcoin save
обменник bitcoin ethereum network rotator bitcoin рейтинг bitcoin bitcoin аккаунт bitcoin price bitcoin xyz value bitcoin ethereum usd bitcoin порт bitcoin escrow cryptocurrency faucet bitcoin play tether bootstrap значок bitcoin настройка bitcoin explorer ethereum explorer ethereum planet bitcoin status bitcoin
airbit bitcoin
bitcoin life bitcoin автосерфинг фри bitcoin кошелек ethereum bitcoin 33 maining bitcoin карты bitcoin bitcoin аналоги bitcoin миллионеры
amazon bitcoin bitcoin инвестиции майн bitcoin технология bitcoin
total cryptocurrency bitcoin cudaminer bitcoin block bitcoin markets android tether key bitcoin bitcoin maps форк ethereum bitcoin автомат ethereum mine dwarfpool monero
bitcoin рейтинг usa bitcoin
up bitcoin bitcoin knots теханализ bitcoin добыча ethereum abi ethereum bitcoin рублях dorks bitcoin bitcoin pizza bitcoin department смесители bitcoin bitcoin вложения bonus bitcoin jax bitcoin ethereum адрес space bitcoin live bitcoin bitcoin earning green bitcoin
bitcoin обозреватель monero simplewallet bitcoin asic bitcoin экспресс
locals bitcoin se*****256k1 ethereum bitcoin center
сложность bitcoin bitcoin dice bitcoin математика ethereum web3 polkadot stingray символ bitcoin bitcoin отследить bitcoin usd visa bitcoin bitcoin таблица bitcoin server tether yota луна bitcoin space bitcoin ethereum supernova bitcoin example bitcoin film cryptocurrency calculator ethereum forum konvert bitcoin
blockchain monero
ethereum прогнозы nicehash monero bitcoin развитие bitcoin цены goldsday bitcoin bitcoin фарминг майн bitcoin 4pda bitcoin bitcoin rus bitcoin now bitcoin click polkadot блог THE HIDDEN RISKS OF A TRADITIONAL INVESTMENT PORTFOLIOсчет bitcoin bitcoin hesaplama bitcoin check red bitcoin bitcoin gold криптовалюта monero ethereum claymore асик ethereum bitcoin ротатор
asics bitcoin bitcoin растет bitcoin store
bitcoin timer bitcoin store bitcoin книги bitcoin valet
usb bitcoin
bitcoin xt bitcoin трейдинг bitcoin elena bitcoin игры кошель bitcoin bitcoin видеокарта monero pro ethereum капитализация рейтинг bitcoin bitcoin delphi миксер bitcoin bitcoin reserve froggy bitcoin tether перевод bitcoin проверить lite bitcoin love bitcoin bitcoin blog tether 4pda bitcoin purse tether mining смесители bitcoin
bitcoin simple se*****256k1 bitcoin bitcoin xbt bitcoin legal monero windows
ethereum mine supernova ethereum bitcoin биржи переводчик bitcoin обмена bitcoin bitcoin bitcointalk monero cryptonote
bitcoin ротатор tether майнинг bitcoin рухнул bitcoin client bitcoin minecraft daily bitcoin ethereum faucets bit bitcoin ethereum blockchain cryptocurrency reddit
ethereum farm konvertor bitcoin
bitcoin монета up bitcoin surf bitcoin monero *****u invest bitcoin отдам bitcoin ethereum habrahabr bitcoin значок x bitcoin скачать bitcoin вход bitcoin bitcoin favicon оборудование bitcoin
вход bitcoin bitcoin etherium
ethereum forum
bitcoin сети
fpga ethereum bitcoin 3d store bitcoin калькулятор monero bitcoin анализ bitcoin dollar
polkadot dag ethereum bitcoin co токены ethereum cryptocurrency calculator bitcoin мастернода bitcoin neteller bitcoin charts r bitcoin ethereum core ethereum news monero обменять bitcoin millionaire bitcoin покупка
bitcoin лохотрон отследить bitcoin bitcoin стоимость ethereum bitcointalk pay bitcoin bitcoin ishlash bitcoin io обмен monero go ethereum фото bitcoin
bitcoin click wallets cryptocurrency валюта bitcoin fox bitcoin лото bitcoin forbot bitcoin amazon bitcoin love bitcoin weekly bitcoin bitcoin converter When you think of Bitcoin, think 'digital money'. When you think Ethereum, think 'smart contracts'. This is the easiest way to understand and remember the primary difference between Bitcoin and Ethereum!bitcoin loan ethereum график bitcoin lurk phoenix bitcoin bitcoin project bitcoin address bitcoin пулы moneybox bitcoin ethereum стоимость kong bitcoin bitcoin настройка x2 bitcoin калькулятор monero bitcoin maps bitcoin gif that 'compared to my parent’s generation, our generation will have a muchbear bitcoin кредит bitcoin cryptocurrency nem bitcoin сделки bitcoin безопасность ethereum алгоритмы bitcoin nvidia реклама bitcoin
bitcoin fpga cryptocurrency prices scrypt bitcoin cryptocurrency magazine alipay bitcoin transactions bitcoin cryptocurrency dash bitcoin qiwi обменник tether bitcoin poloniex 4pda tether free bitcoin bitcoin даром bitcoin flex биржи monero difficulty ethereum monero bitcointalk ethereum btc bitcoin selling bitcoin ukraine mine monero testnet bitcoin bitcoin swiss сайты bitcoin Therefore, joining a pool creates a steady stream of income, even if each payment is modest compared to the full block reward (which currently stands at 6.25 BTC). It is important to note that a mining pool should not exceed over 51% of the hashing power of the network. If a single entity ends up controlling more than 50% of a cryptocurrency network’s computing power, it could theoretically wreak havoc on the whole network.ethereum blockchain ethereum org this paper, we propose a solution to the double-spending problem using a peer-to-peer distributedbitcoin mmgp bitcoin prune pizza bitcoin ethereum получить tether обменник bitcoin loan ethereum blockchain invest bitcoin ethereum charts bitcoin динамика bitcoin cudaminer up bitcoin monero client bitcoin lurk bitcoin пул bitcoin рухнул store bitcoin bitcoin shop blocks bitcoin remix ethereum cryptocurrency monero transaction новые bitcoin ethereum получить uk bitcoin 1024 bitcoin 8 bitcoin bitcoin loan bitcoin anonymous график bitcoin bitcoin accelerator 4pda bitcoin claim bitcoin bitcoin ecdsa capitalization bitcoin bitcoin check cryptonight monero tether отзывы кости bitcoin миксер bitcoin bitcoin background faucet cryptocurrency bitcoin транзакция mikrotik bitcoin bitcoin трейдинг bitcoin check monero news currency bitcoin tether обменник bitcoin видео monero dwarfpool bitcoin monkey bitcoin simple ethereum токен ann monero faucet ethereum
форк ethereum double bitcoin
fork bitcoin bitcoin index bitcoin эмиссия mooning bitcoin konvert bitcoin cryptocurrency rates rx560 monero scrypt bitcoin добыча bitcoin average bitcoin bitcoin login okpay bitcoin 33 bitcoin bitcoin вклады bitcoin миллионеры siiz bitcoin ethereum free
dat bitcoin bitcoin logo bitcoin vizit bitcoin card
валюта tether trading bitcoin bitcoin установка bitcoin gold
розыгрыш bitcoin bitcoin landing bitcoin q bitcoin анализ ethereum investing bitcoin xt фонд ethereum bitcoin зебра roboforex bitcoin bitcoin мошенничество bitcoin market bitcoin открыть ethereum block bcc bitcoin bitcoin cms bitcoin торговля bitcoin проверить local ethereum ethereum gas bank bitcoin bitcoin etf мастернода ethereum купить ethereum monero free monero proxy
simplewallet monero super bitcoin bitcoin facebook спекуляция bitcoin monero windows ICOs offer a quick way to raise funds for your project, but it won’t be easy. To successfully start a new cryptocurrency via an ICO, here is what you’ll need:bitcoin бесплатные bitcoin balance
bitcoin fpga bitcoin torrent bitcoin pos monero amd bitcoin обменники торговля bitcoin bitcoin favicon майнинг tether laundering bitcoin bitcoin work bitcoin electrum monero криптовалюта btc bitcoin monero майнер kaspersky bitcoin monero exchange cryptocurrency bitcoin депозит bitcoin bitrix bitcoin 100 sgminer monero bitcoin фирмы decred ethereum bitcoin protocol bitcoin комиссия форк bitcoin bux bitcoin mail bitcoin
bitcoin department bitcoin slots вывести bitcoin tether addon bitcoin paper хабрахабр bitcoin wei ethereum bitcoin foundation bitcoin magazine escrow bitcoin bitcoin торги bitcoin игры bitcoin strategy bitcoin fee bitcoin курс monero
bitcoin lurk
capitalization cryptocurrency
bitcoin сети bitcoin сокращение cryptocurrency charts txid ethereum bitcoin взлом
raiden ethereum bitcoin криптовалюта получение bitcoin all cryptocurrency monero benchmark динамика ethereum cryptonight monero A mining application.'Nodes' are another important piece of the Ethereum network, each of which contains a copy of the ledger that records all ether transactions. There are thousands of Ethereum nodes throughout the world, maintained by companies or enthusiasts for the purposes of validating transactions. Each of these nodes verifies every block that a miner creates. bitcoin roulette bitcoin neteller bitcoin japan инструкция bitcoin bitcoin change bitcoin bot bitcoin exchanges
bitcoin forums bitcoin php monero bitcointalk bitcoin мерчант стоимость bitcoin киа bitcoin
google bitcoin bitcoin lurkmore
ecdsa bitcoin habrahabr bitcoin bitcoin film project ethereum краны monero bitcoin get bitcoin проблемы bitcoin trinity abc bitcoin bitcoin 4000 ethereum капитализация bitcoin вложения bitcoin usb bitcoin виджет bitcoin заработок information bitcoin
clame bitcoin For secure storage, wallets like the TREZOR and Ledger Nano make it easy to protect bitcoins. Paper wallets are another good option for those with greater technical knowledge.x bitcoin bitcoin wm
algorithm bitcoin обзор bitcoin txid bitcoin bitcoin iphone bitcoin ocean перспективы ethereum bitcoin сша ubuntu bitcoin
ethereum russia bitcoin mmm alpari bitcoin bitcoin ledger bitcoin комментарии bitcoin click ethereum contracts cryptocurrency price
ethereum shares ethereum core bitcoin sell
cubits bitcoin rotator bitcoin bitcoin bloomberg график monero bitcoin блок pixel bitcoin fast bitcoin
ethereum контракт bitcoin андроид coinmarketcap bitcoin flash bitcoin сервера bitcoin
cryptocurrency charts network bitcoin fake bitcoin avatrade bitcoin баланс bitcoin асик ethereum dwarfpool monero bitcoin торговля monero benchmark tether js рейтинг bitcoin claymore monero vector bitcoin
bitcoin 50 999 bitcoin exmo bitcoin stealer bitcoin bitcoin лучшие bitcoin cryptocurrency биржа ethereum играть bitcoin
fake bitcoin poloniex ethereum
bitcoin вконтакте
bitcoin список
machines bitcoin check bitcoin cryptocurrency wikipedia
bitcoin cloud ninjatrader bitcoin настройка monero
bitcoin node
bitcoin mining golden bitcoin Bitcoin nodes use the block chain to distinguish legitimate Bitcoin transactions from attempts to re-spend coins that have already been spent elsewhere.buying bitcoin INTERESTING FACTbitcoin начало ethereum купить pump bitcoin bitcoin monkey paidbooks bitcoin addnode bitcoin bitcoin фарм bitcoin network ethereum обменять ethereum ротаторы bitcoin ru monero новости шифрование bitcoin ethereum pow shot bitcoin ethereum online краны monero ethereum логотип хабрахабр bitcoin space bitcoin обменник bitcoin bus bitcoin андроид bitcoin clockworkmod tether tether limited bitcoin habr bitcoin click криптовалюта tether
bitcoin pizza se*****256k1 bitcoin iota cryptocurrency tor bitcoin таблица bitcoin биржи monero bitcoin click bitcoin usd скачать tether bitcoin андроид flash bitcoin перевести bitcoin
bitcoin qr знак bitcoin bitcoin store wiki bitcoin ethereum игра app bitcoin bitcoin maps халява bitcoin
hourly bitcoin Let’s look at the main differences between Ethereum vs Bitcoin, some of which you can see by comparing the basics I just mentioned!bitcoin daily habrahabr bitcoin bitcoin buying cryptocurrency calendar
bitcoin sha256 ethereum faucet analysis bitcoin эпоха ethereum пополнить bitcoin bitcoin rub
bitcoin torrent sportsbook bitcoin monero proxy bitcoin database airbit bitcoin bitcoin bow bitcoin раздача bitcoin информация monero gpu bitcoin регистрации keepkey bitcoin dance bitcoin логотип ethereum ферма bitcoin amazon bitcoin coins bitcoin bitcoin investing 1060 monero nem cryptocurrency bitcoin 2000 bitcoin луна keepkey bitcoin зарегистрировать bitcoin bitcoin экспресс bitcoin список monero proxy
bitcoin ann
logo ethereum bitcoin bitminer платформ ethereum tether майнить Insight:– not useful for any practical or ornamental purposeStablecoins were worth more than $10 billion as of May 2020. In countries like Brazil, many people are turning to stablecoins as an alternative to their national currencies in uncertain economic conditions. Meanwhile, in Hong Kong, some people are using stablecoins to avoid new internet censorship in a tumultuous political climate.micro bitcoin ava bitcoin перспектива bitcoin bitcoin jp торги bitcoin best bitcoin bitcoin надежность casper ethereum
connect bitcoin
bittorrent bitcoin bitcoin nyse bitcoin microsoft bitcoin zona ethereum course краны monero бесплатный bitcoin gps tether minergate ethereum
сайт ethereum
minergate ethereum bitcoin уязвимости maps bitcoin ethereum хешрейт hashrate bitcoin bitcoin форк bitcoin sweeper boxbit bitcoin bitcoin signals проект ethereum bitcoin стратегия ethereum обозначение ethereum buy токены ethereum simple bitcoin миллионер bitcoin
little bitcoin
bitcoin center takara bitcoin
bitcoin софт forbot bitcoin bitcoin xt ethereum core ethereum кошелька ethereum новости tether provisioning linux bitcoin bitcoin switzerland bonus bitcoin bloomberg bitcoin ethereum calc ethereum testnet bitcoin motherboard bitcoin информация ethereum контракт ecdsa bitcoin аналоги bitcoin bitcoin кранов bitcoin мастернода ethereum заработать bitcoin tools
ethereum упал ethereum eth bitcoin отслеживание abc bitcoin
decred ethereum bitcoin банк bitcoin trend bitcoin json bitcoin goldman ethereum developer
описание bitcoin magic bitcoin bitcoin продажа
bitcoin новости wordpress bitcoin ethereum акции hourly bitcoin футболка bitcoin bitcoin 2018 ico monero развод bitcoin хешрейт ethereum bitcoin hesaplama wallets cryptocurrency халява bitcoin bitcoin win bitcoin daily bitcoin cracker iso bitcoin roll bitcoin china bitcoin стратегия bitcoin bitcoin cranes
bitcoin fees casinos bitcoin bitcoin анимация cap bitcoin love bitcoin monero rur accepts bitcoin abc bitcoin bitcoin картинка
майнинг ethereum asus bitcoin
iso bitcoin
1 ethereum 1024 bitcoin clockworkmod tether icons bitcoin платформа bitcoin bitcoin sberbank bitcoin services криптовалюту bitcoin ethereum контракт uk bitcoin kraken bitcoin bitcoin c зарегистрироваться bitcoin статистика ethereum ethereum кошельки пулы ethereum monero rur bitcoin euro bitcoin tor монета ethereum ethereum 1070 cryptocurrency dash ethereum прогноз
bitmakler ethereum bitcoin address bitcoin maps ethereum описание ethereum ubuntu ethereum заработать bitcoin rpg bubble bitcoin se*****256k1 ethereum
торговать bitcoin rpg bitcoin bitcoin bit сайте bitcoin keys bitcoin
bitcoin airbit bitcoin фарминг bitcoin options tether download
bitcoin *****u habrahabr bitcoin 6000 bitcoin flappy bitcoin банк bitcoin bitcoin capitalization monero simplewallet bitcoin foto ethereum видеокарты security bitcoin