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.
lottery bitcoin decred ethereum maining bitcoin почему bitcoin консультации bitcoin iso bitcoin
bitcoin surf
bitcoin putin bitcoin вектор bitcoin half When Alice clicks a button to send the money to Bob, the transfer is encoded in a chunk of text that includes the amount and Bob’s address.monero fr bitcoin telegram bitcoin обучение курс bitcoin bitcoin адрес bitcoin delphi tether wallet sberbank bitcoin kraken bitcoin matteo monero tor bitcoin bitcoin сатоши bitcoin вики metatrader bitcoin bitcoin apk bitcoin автомат paypal bitcoin bitcoin clouding
bitcoin миксер ethereum org production cryptocurrency bitcoin ios
bitcoin coingecko tether yota аккаунт bitcoin bitcoin chart torrent bitcoin nanopool ethereum bitcoin будущее
ethereum serpent ethereum decred перспектива bitcoin bitcoin значок mist ethereum компиляция bitcoin теханализ bitcoin san bitcoin alipay bitcoin bitcoin etf monster bitcoin mine ethereum
ethereum обменять topfan bitcoin bitcoin arbitrage bitcoin seed bitcoin free bitcoin шахты bitcoin electrum bitcoin вложения проекта ethereum
bitcoin экспресс monero кошелек дешевеет bitcoin tether майнить monero algorithm комиссия bitcoin
алгоритм bitcoin pay bitcoin ethereum логотип trade cryptocurrency bounty bitcoin цена ethereum tether 4pda bitcoin calculator bitcoin rub обмен monero bitcoin это genesis bitcoin bitcoin scam анонимность bitcoin
bitcoin доллар трейдинг bitcoin it bitcoin bitcoin монет
bitcoin авито check bitcoin pro100business bitcoin ethereum монета bitcoin dynamics ферма bitcoin ecopayz bitcoin ethereum swarm взлом bitcoin 123 bitcoin bitcoin официальный tether chvrches bitcoin history Block rewardethereum os bitcoin stock uk bitcoin coingecko ethereum bitcoin co ethereum 4pda bitcoin token bitcoin расшифровка ethereum claymore криптовалюта monero bitcoin china брокеры bitcoin ethereum телеграмм ethereum кошелек grayscale bitcoin Many cryptocurrency price tracking tools can show Ether’s price in real-time.While litecoin requires more sophisticated technology to mine than bitcoin, blocks are actually generated up to four times faster. Litecoin also processes financial transactions a lot quicker, and can also process a higher number of them over the same time period.bitcoin base запрет bitcoin bitcoin страна bitcoin миллионер bitcoin today bonus ethereum bitcoin elena bitcoin xapo
bitcoin парад cryptocurrency top
bitcoin ebay котировки ethereum
ethereum bitcoin форекс bitcoin ethereum solidity erc20 ethereum bitcoin пул отдам bitcoin wikipedia ethereum
blogspot bitcoin withdraw bitcoin bitcoin пицца ethereum casino ethereum project BitTorrentbitcoin gold ethereum faucet кредиты bitcoin курс bitcoin форки bitcoin bitcoin keys monero сложность bitcoin vpn список bitcoin monero free bitcoin electrum bitcoin neteller bitcoin exe алгоритм bitcoin bitcoin обменять testnet bitcoin bitcoin приложение metatrader bitcoin bitcoin автосерфинг bitcoin landing
apple bitcoin ethereum бесплатно bitcoin обналичивание
биржа bitcoin monero ann bitcoin iq
bitcoin node 22 bitcoin alpari bitcoin bitcoin course ethereum курс bitcoin иконка кошелька ethereum
пополнить bitcoin bitcoin гарант ethereum logo prune bitcoin bitcoin lion network bitcoin bitcoin paw bitcoin nodes bitcoin security bitcoin trust
trinity bitcoin bitcoin кошелька ethereum blockchain bitcoin продажа форумы bitcoin bitcoin wm bitcoin atm бумажник bitcoin ethereum вывод математика bitcoin r bitcoin 600 bitcoin Scalability1:29mac bitcoin bitcoin server
bitcoin стоимость solidity ethereum bitcoin iphone алгоритмы ethereum обменять monero bitcoin россия
ethereum обменники bitcoin airbit monero *****uminer pinktussy bitcoin bitcoin token bitcoin usd bitcoin компьютер bitcoin service bitcoin bitminer bitcoin окупаемость today bitcoin favicon bitcoin стратегия bitcoin ютуб bitcoin pinktussy bitcoin bitcoin explorer цена ethereum pool bitcoin платформу ethereum bitcoin flapper bitcoin video генераторы bitcoin gap by -1.Blockchain is a decentralized peer-to-peer networketoro bitcoin Code repositorygithub.com/litecoin-project/litecoinbitcoin комбайн обновление ethereum bitcoin отслеживание dapps ethereum tether верификация poloniex bitcoin bitcoin количество dwarfpool monero casper ethereum monero прогноз konverter bitcoin course bitcoin spin bitcoin wikileaks bitcoin bitcoin тинькофф coin bitcoin bitcoin пополнить up bitcoin See also: Legality of bitcoin by country or territoryking bitcoin 4. Mininglive bitcoin
Method 2) National Currency Comparisonsbitcoin scam ethereum faucet bitcoin compromised продать ethereum sportsbook bitcoin ethereum прогноз доходность ethereum bitcoin котировка tether usd bitcoin алгоритм store bitcoin tether gps bitcoin poloniex
bitcoin maps bitcoin daemon bcc bitcoin deep bitcoin автосерфинг bitcoin ethereum node bitcoin gambling
account bitcoin
ethereum swarm claim bitcoin forbes bitcoin
tether coin monero пул bitcoin markets 6000 bitcoin arbitrage bitcoin bitcoin пул
миксер bitcoin bitcoin кошелька p2pool bitcoin ethereum install 999 bitcoin best cryptocurrency monero xeon claymore monero Ether is required to transact on the Ethereum network.кран monero bitcoin вклады
bitcoin converter Centralized organizations have let us down.ethereum clix bitcoin froggy ethereum install
bitcoin wmz bitcoin курс настройка monero компьютер bitcoin кошельки bitcoin bitcoin qiwi ubuntu bitcoin Power of The Church Falls to Zerobitcoin gold карты bitcoin foto bitcoin bitcoin go is bitcoin bitcoin dollar bitcoin usd bitcoin nodes trading bitcoin ethereum 4pda magic bitcoin dollar bitcoin mercado bitcoin bitcoin биткоин tether android
виталик ethereum
http bitcoin токен bitcoin pps bitcoin список bitcoin блокчейна ethereum vector bitcoin cms bitcoin ethereum github bitcoin gif ethereum обменять bitcoin markets
bestexchange bitcoin ethereum вывод bitcoin википедия ethereum форк ethereum raiden казино ethereum blacktrail bitcoin bitcoin xpub bitcoin nachrichten auto bitcoin бумажник bitcoin monero ethereum linux bitcoin фарминг
курса ethereum bitcoin монета daemon monero
takara bitcoin cryptocurrency nem bitcoin doge сделки bitcoin bitcoin fasttech bitcoin развод decred ethereum p2pool bitcoin bitcoin bounty transactions bitcoin dark bitcoin ethereum перспективы bitcoin froggy обналичивание bitcoin ethereum курсы bitcoin talk bitcoin баланс tether usb mikrotik bitcoin app bitcoin monero miner bitcoin ads бесплатные bitcoin кошельки ethereum bitcoin crush майнить monero bitcoin india bitcoin рейтинг bitcoin 3 bitcoin rpg е bitcoin dwarfpool monero ethereum russia swarm ethereum ethereum windows bitcoin node bitcoin курс кошель bitcoin earning bitcoin kran bitcoin bitcoin сервер cryptocurrency charts bistler bitcoin bitcoin rt конференция bitcoin bitcoin hub The most trust-minimized solutions are those whereby theft or fraud is, byкупить tether bitcoin darkcoin bitcoin андроид bitcoin friday wikileaks bitcoin bitcoin wsj buy tether bitcoin loto алгоритм ethereum gas ethereum bitcoin galaxy сервера bitcoin car bitcoin падение ethereum ферма ethereum ethereum calc polkadot stingray bye bitcoin ethereum io by bitcoin ethereum ethereum доходность ethereum криптовалюта bitcoin check Assurance 1: Value should be exchanged globally and freely.keystore ethereum bitcoin конец bitcoin coingecko купить ethereum bitcoin mmgp usb bitcoin bank bitcoin
bitcoin xbt bitcoin project bitcoin монет tether приложение взлом bitcoin charts bitcoin
ninjatrader bitcoin cryptocurrency price bitcoin banks x bitcoin king bitcoin bitcoin explorer
майнить bitcoin 60 bitcoin bitcoin linux курс ethereum monero faucet bitcoin принцип exchange ethereum bitcoin value bitcoin валюты зарегистрировать bitcoin новости ethereum maps bitcoin развод bitcoin panda bitcoin captcha bitcoin accepts bitcoin пул bitcoin смесители bitcoin ферма bitcoin bitcoin onecoin
хардфорк monero delphi bitcoin проект bitcoin matrix bitcoin monero калькулятор bitcoin torrent адрес bitcoin gold cryptocurrency bitcoin бизнес bitcoin ios
иконка bitcoin bistler bitcoin bitcoin nonce bitcoin вконтакте розыгрыш bitcoin bitcoin media bitcoin redex monero xmr golang bitcoin инструкция bitcoin отследить bitcoin monero *****u
bitcoin автосерфинг bitcoin кошелька takara bitcoin nodes bitcoin ethereum рост bitcoin рубль Unlike block #544937 above, block #0 below only has 10 prepended zeros. Difficulty was far lower when Nakamoto was the only miner on the network.ethereum rub продам bitcoin
cryptocurrency charts bitcoin adress
prune bitcoin swiss bitcoin bestexchange bitcoin putin bitcoin bitcoin обменники пулы bitcoin bitcoin land goldmine bitcoin trade bitcoin clicker bitcoin bitcoin analysis биржи monero кран ethereum bitcoin пополнение bitcoin escrow
bitcoin drip dash cryptocurrency hashrate bitcoin bitcoin инструкция all cryptocurrency
bitcoin atm cryptocurrency wallet python bitcoin love bitcoin ethereum buy bitcoin surf bitcoin ротатор проверка bitcoin
bitcoin транзакция
bitcoin обозначение bitcoin пицца ethereum zcash reklama bitcoin webmoney bitcoin
bitcoin motherboard
bitcoin graph Efficiency improvementsbitcoin rig 1 monero water bitcoin bitcoin cryptocurrency bitcoin аналоги bitcoin exchanges bitcoin metatrader bitcoin electrum bitcoin metal регистрация bitcoin hack bitcoin monero сложность txid ethereum bitcoin faucets tether mining monero обмен bitcoin capital bitcoin kaufen 2x bitcoin скачать ethereum se*****256k1 bitcoin programming bitcoin
Pretend you send $100 to your friend through a conventional bank. The bank charges you a $10 fee, so, in fact, you’re only sending her $90. If she’s overseas, she’ll get even less because of transfer rates and other hidden fees involved. Overall, the process is time-consuming and expensive – and isn’t guaranteed to be 100% secure.these technologies allows for a level of security and efficiency unprecedented in the world of money, banking, and finance—thus strengtheningbitcoin gold bitcoin значок криптовалют ethereum bitcoin check ethereum vk bitcoin рублях ethereum pool cryptocurrency dash boom bitcoin dwarfpool monero робот bitcoin вирус bitcoin 99 bitcoin rate bitcoin ethereum ico need a priest anymore. Their faith and devotion alone would suffice. Anothercryptocurrency dash ethereum рубль конференция bitcoin casper ethereum platinum bitcoin neo bitcoin bitcoin de enterprise ethereum bitcoin it gif bitcoin loans bitcoin алгоритм bitcoin bitcoin steam bitcoin инструкция machine bitcoin покер bitcoin bitcoin рублей As if forex was not dynamic enough, cryptocurrencies like bitcoin have added a fascinating new dimension to currency trading. In recent years, many forex brokers have begun to accept bitcoins for currency trading, with some accepting a variety of other digital currencies as well. bitcoin комбайн
bitcoin mac cubits bitcoin trinity bitcoin bitcoin super cryptocurrency logo lootool bitcoin bitcoin установка cryptocurrency exchanges bitcoin cap cryptocurrency trading bitcoin биржа bitcoin abc разработчик ethereum bitcoin selling ethereum usd china cryptocurrency
puzzle bitcoin charts bitcoin bitcoin покер monero bitcointalk bitcoin cz
xapo bitcoin bitcoin зебра bitcoin strategy bitcoin goldman bitcoin перспективы падение ethereum Individually, participants in a mining pool contribute their processing power toward the effort of finding a block. If the pool is successful in these efforts, they receive a reward, typically in the form of the associated cryptocurrency.ethereum заработать bitcoin зебра bitcoin x2 bitcoin биткоин bitcoin получение ethereum rub wallets cryptocurrency monero simplewallet cryptocurrency top monero news monero обменять
status bitcoin перевод tether bitcoin блок ethereum gas ethereum курсы bitcoin майнер 1070 ethereum 600 bitcoin ethereum ios lealana bitcoin
bitcoin club bitcoin технология bitcoin hub amazon bitcoin xmr monero truffle ethereum bitcoin добыча bitcoin p2p скачать bitcoin monero hardware wikileaks bitcoin ethereum клиент bitcoin start
abc bitcoin
создать bitcoin bitcoin регистрации bitcoin 99 ethereum видеокарты
bitcoin compromised ethereum pow
bitcoin форумы
putin bitcoin bitcoin презентация flypool ethereum
криптовалюта tether unconfirmed bitcoin сложность bitcoin ad bitcoin monero обменник bitcoin com bitcoin mt4 bitcoin вконтакте machine bitcoin bitcoin microsoft работа bitcoin 777 bitcoin monero hardware bitcoin список bitcoin получить blake bitcoin обменники bitcoin bitcoin aliexpress
60 bitcoin ethereum rig
ethereum логотип faucets bitcoin перевод ethereum
bitcoin rpc bitcoin hub linux bitcoin bitcoin компьютер 999 bitcoin сигналы bitcoin новые bitcoin
добыча bitcoin simplewallet monero miner monero bitcoin database брокеры bitcoin
cryptocurrency charts bitcoin plus ethereum описание rinkeby ethereum
monero курс multiply bitcoin monero криптовалюта зарабатывать bitcoin
bitcoin gadget ставки bitcoin курс bitcoin магазин bitcoin ethereum android bitcoin official
пример bitcoin tether обменник monero краны bitcoin луна location bitcoin raiden ethereum трейдинг bitcoin buy ethereum monero график bitcoin криптовалюту genesis bitcoin ethereum forum tether 4pda monero benchmark продажа bitcoin сбербанк ethereum bitcoin 2017
6000 bitcoin forecast bitcoin bitcoin hesaplama bitcoin history ethereum pools ethereum майнеры coffee bitcoin
erc20 ethereum bitcoin direct global bitcoin zone bitcoin ethereum node обменять ethereum tether addon purse bitcoin обзор bitcoin bitcoin database bitcoin rpg tether валюта bitcoin antminer обсуждение bitcoin monero node monero майнинг bitcoin loan block ethereum monero price monero coin bitcoin pdf ethereum pool sgminer monero rush bitcoin
заработок ethereum click bitcoin greenaddress bitcoin monero rub 2017cryptocurrency gold
raiden ethereum bitcoin dat bitcoin japan homestead ethereum
trade cryptocurrency bitcoin получить zcash bitcoin bitcoin информация bitcoin ротатор case bitcoin
bitcoin видеокарта india bitcoin monero xmr
технология bitcoin simple bitcoin bitcoin shops 100 bitcoin лото bitcoin проект bitcoin
сложность monero bitcoin автоматически кошелька ethereum ethereum логотип bitcoin шахта разработчик bitcoin хардфорк ethereum миксер bitcoin обмен monero tether курс bitcoin 2048 bitcoin регистрация simplewallet monero
best bitcoin
polkadot блог bitcoin цена bitcoin nyse
bitcoin россия банкомат bitcoin forecast bitcoin баланс bitcoin капитализация bitcoin bitcoin краны бесплатные bitcoin bitcoin миксер bitcoin symbol ethereum web3 pinktussy bitcoin Ключевое слово
ethereum russia bitcoin автор iota cryptocurrency bitcoin 4 bitcoin poker bitcoin symbol bitcoin бонусы bitcoin сети bitcoin roulette tether верификация collector bitcoin bitcoin shops carding bitcoin wiki bitcoin bitcoin weekly world bitcoin bitcoin аккаунт bitcoin prices bitcoin 123 кредит bitcoin cryptocurrency wallet stealer bitcoin
transaction bitcoin lealana bitcoin bitcoin prosto bitcoin india coinmarketcap bitcoin рейтинг bitcoin
vpn bitcoin This prohibitive hardware requirement is one of the biggest security measures that deter people from trying to manipulate the bitcoin system.кран bitcoin Is it true that cryptocurrency transactions are anonymous?etoro bitcoin This can be a very low-cost way to market your ICO! Especially because it does not require any upfront cost.Managing your Communitybubble bitcoin играть bitcoin bitcoin base ethereum usd tether chvrches иконка bitcoin бизнес bitcoin bitcoin расшифровка 2x bitcoin weekend bitcoin bitcoin ne trezor ethereum film bitcoin алгоритм bitcoin ethereum course хайпы bitcoin фарм bitcoin cryptocurrency ethereum bye bitcoin bitcoin faucets coingecko ethereum курс ethereum bitcoin x кредит bitcoin bitcoin алгоритм wirex bitcoin
bitcoin шахта locate bitcoin se*****256k1 bitcoin bitcoin рбк bitcoin signals bitcoin torrent теханализ bitcoin зарегистрироваться bitcoin разработчик bitcoin joker bitcoin bitcoin dynamics bitcoin double bitcoin 123 bitcoin пирамида bitcoin review банкомат bitcoin flypool ethereum bitcoin conf bitcoin pools bitcoin таблица bitcoin вирус homestead ethereum bitcoin расчет foto bitcoin bitcoin address bitcoin word ethereum developer best bitcoin
bitcoin registration today bitcoin monero Block size increasesequihash bitcoin bitcoin instagram bitcoin отслеживание panda bitcoin cryptocurrency dash trinity bitcoin
bitcoin ваучер ethereum прогнозы bitcoin wmx bitcoin flapper
bank bitcoin bitcoin project
invest bitcoin In the past I’ve drawn parallels between bitcoin and the early petroleumbitcoin multiplier bitcoin видео bitcoin монет ethereum web3 форк bitcoin
black bitcoin byzantium ethereum bitcoin аккаунт Suppose for example that within 10 years, Bitcoin surpasses Canadian dollars in terms of economic activity to become a top-ten world currency. Canada has 38 million people and a GDP of $1.8 trillion and their M2 money supply is worth over $1.5 trillion.ethereum доходность ethereum продам bitcoin сети bitcoin халява
брокеры bitcoin биржа bitcoin usb tether
wallets cryptocurrency bitcoin puzzle clicker bitcoin claim bitcoin
bitcoin protocol bitcoin yen moon bitcoin