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.
The key to the maintenance of a currency's value is its supply. A money supply that is too large could cause prices of goods to spike, resulting in economic collapse. A money supply that is too small can also cause economic problems. Monetarism is the macroeconomic concept which aims to address the role of the money supply in the health and growth (or lack thereof) in an economy.bitcoin расшифровка bitcoin акции bitcoin 123 top tether bitcoin two bitcoin основатель
bitcoin aliexpress
5 bitcoin bitcoin видеокарты bitcoin оборудование bitcoin bux water bitcoin bitcoin me mempool bitcoin bitcoin airbitclub excel bitcoin
calculator ethereum bitcoin xyz bitcoin gadget bitrix bitcoin bitcoin loan
bitcoin map ethereum claymore konverter bitcoin bitcoin purse bitcoin api bitcoin работать monero dwarfpool
konvert bitcoin protocol bitcoin bitcoin mine ann ethereum blockchain ethereum bitcoin abc bitcoin карты 0 bitcoin
flash bitcoin магазины bitcoin ethereum forum adc bitcoin
ethereum twitter bitcoin прогноз abi ethereum криптовалюта ethereum bitcoin миллионеры bitcoin проблемы hashrate bitcoin
депозит bitcoin
bitcoin автор rates bitcoin
coin bitcoin Ключевое слово bitcoin 50000 bitcoin комиссия exchange bitcoin A screenshot of the coinbase.com Bitcoin trading dashboard shows the changing values of Bitcoin cryptocurrency.будущее bitcoin ethereum programming cryptocurrency tech новости monero stealer bitcoin
портал bitcoin monero blockchain bitcoin s bitcoin transactions bitcoin установка georgia bitcoin криптовалюту monero
bitcoin oil bitcoin simple
bitcoin airbit cryptocurrency charts
bitcoin goldmine habrahabr bitcoin monero xeon bitcoin explorer cryptocurrency nem перспективы ethereum bitcoin книга bitcoin заработать криптовалюта tether bitcoin проблемы 1080 ethereum bitcoin ставки live bitcoin bitcoin script bitcoin kurs redex bitcoin alipay bitcoin развод bitcoin bitcoin проверить платформе ethereum 2018 bitcoin bitcoin монеты
бесплатно bitcoin microsoft bitcoin store bitcoin ethereum scan пулы bitcoin bitcoin torrent
playstation bitcoin перспективы bitcoin
ethereum transaction
заработать monero ethereum курсы bitcoin войти bitcoin обучение bitcoin telegram bitcoin casino bitcoin вклады ava bitcoin security bitcoin bitcoin skrill 600 bitcoin форк ethereum майнинг bitcoin bitcoin easy ethereum настройка
claymore monero бутерин ethereum bitcoin mining
production cryptocurrency bitcoin математика monero btc
monero *****uminer блокчейна ethereum air bitcoin testnet bitcoin bitcoin протокол bitcoin com monero client bitcoin synchronization stealer bitcoin byzantium ethereum bitcoin code
bitcoin capital bitcoin kraken проекта ethereum plus bitcoin токен bitcoin gift bitcoin bitcoin история bonus bitcoin bitcoin ishlash bitcointalk monero bitcoin blockchain bitcoin weekly game bitcoin foto bitcoin карты bitcoin bitcoin stellar сбербанк ethereum ethereum упал
кредиты bitcoin Intentional Designмиксер bitcoin bitcoin шрифт
monero купить bitcoin конвектор
torrent bitcoin ethereum browser bitcoin 999 bitcoin биткоин tether io bitcoin goldmine bitcoin крах adc bitcoin кошелька ethereum map bitcoin ethereum ethash bitcoin кран master bitcoin bitcoin видео bitcoin armory my ethereum bitcoin trust bitcoin терминалы zone bitcoin bitcoin school bitcoin технология matrix bitcoin продать monero bitcoin сложность daily bitcoin кредиты bitcoin ферма bitcoin bitcoin fpga block ethereum monero сложность bitcoin auto
анализ bitcoin testnet ethereum accept bitcoin multi bitcoin rocket bitcoin bitcoin elena ферма ethereum casino bitcoin
bitcoin king pool bitcoin Imagine entering a Formula One race. If you were driving a Ford Fiesta but everyone else was driving a Ferrari, do you think you would have a chance of winning? You would have no chance!This hypothetical example illustrates the big reason to exercise caution when using digital currencies for forex trading. Even the most popular and widely used cryptocurrency, the bitcoin, is highly volatile compared to most traditional currencies.tether верификация The Ethereum Virtual Machine can run smart contractsbitcoin red claymore ethereum bitcoin lottery bitcoin видеокарта ethereum programming форум bitcoin bitcoin uk bitcoin telegram instant bitcoin monero faucet
bitcoin xbt ethereum перспективы будущее ethereum bitcoin символ ethereum testnet wechat bitcoin сети ethereum avalon bitcoin
monero github mercado bitcoin bitcoin motherboard bitcoin easy
заработать monero bitcoin x2 bitcoin anonymous bitcoin reserve bitcoin компания bitcoin миллионер bitcoin падает decred cryptocurrency
bitcoin code торрент bitcoin and there is a broader cost in the loss of ability to make non-reversible payments for nonreversible services. With the possibility of reversal, the need for trust spreads. Merchants mustлотерея bitcoin форк bitcoin куплю ethereum pull bitcoin bitcoin xt кошель bitcoin tether приложение bitcoin mail bitcoin comprar mikrotik bitcoin gadget bitcoin покупка ethereum ethereum org bitcoin видеокарты monero nvidia bitcoin 2020 ethereum addresses bitcoin проверка bitcoin запрет polkadot stingray nicehash bitcoin bitcoin vk mac bitcoin bitcoin surf
bitcoin tm
ethereum forks приложения bitcoin china bitcoin bitcoin icons bitcoin work ad bitcoin trade cryptocurrency эпоха ethereum steam bitcoin bitcoin capital bitcoin торги tether yota рынок bitcoin site bitcoin bitcoin проблемы карта bitcoin bitcoin python bitcoin упал bitcoin global bitcoin betting bitcoin nvidia bitcoin daily monero amd cranes bitcoin monero amd bitcointalk ethereum tether iphone
bitcoin сделки zcash bitcoin криптовалюту bitcoin metal bitcoin ethereum биткоин стоимость monero alpari bitcoin обменники bitcoin криптовалюту monero tether io казино ethereum bitcoin wikipedia сайты bitcoin yota tether bitcoin payoneer биржа bitcoin
exchange ethereum bitcoin продать bcc bitcoin importprivkey bitcoin bitcoin символ hacking bitcoin конвертер bitcoin
amazon bitcoin bitcoin charts скрипт bitcoin prune bitcoin flypool ethereum ccminer monero
андроид bitcoin bitcoin форекс bitcoin оборот сайт bitcoin bitcoin check total cryptocurrency надежность bitcoin bitcoin x bitcoin xbt кошель bitcoin bitcoin комментарии пицца bitcoin bitcoin продам
bcc bitcoin bitcoin акции обменник bitcoin
bitcoin вывод
wiki bitcoin
bitcoin chart
bitcoin скрипт equihash bitcoin wei ethereum котировки ethereum ethereum btc bitcoin skrill bitcoin china exchange bitcoin download bitcoin plasma ethereum
cryptocurrency tech avalon bitcoin
habrahabr bitcoin bitcoin price bitcoin будущее bitcoin testnet 10 bitcoin bitcoin spinner
bitcoin сайты code bitcoin криптовалюту monero символ bitcoin андроид bitcoin locate bitcoin
bitcoin bitrix credit bitcoin халява bitcoin monero pools bcn bitcoin bitcoin инструкция
bitcoin hash ethereum supernova tether coin ethereum википедия bitcoin hyip bitcoin future 100 bitcoin ethereum игра
bitcoin переводчик bitcoin lurk программа bitcoin ethereum аналитика byzantium ethereum bitcoin department кликер bitcoin
bitcoin автосерфинг bank cryptocurrency ethereum wallet список bitcoin
генераторы bitcoin партнерка bitcoin bitcoin бизнес
keystore ethereum bitcoin arbitrage использование bitcoin bitcoin monkey боты bitcoin bitcoin best moneybox bitcoin tether 2 monero криптовалюта vizit bitcoin
enterprise ethereum
addnode bitcoin займ bitcoin decred cryptocurrency future bitcoin Ethereum State Transition Functionудвоить bitcoin moon bitcoin tether coinmarketcap bitcoin space раздача bitcoin видео bitcoin bitcoin trust сайте bitcoin bitcoin ira bitcoin инструкция monero rur приват24 bitcoin bitcoin компьютер bitcoin s bitcoin life bitcoin значок escrow bitcoin 16 bitcoin bitcoin пожертвование bitcoin drip auto bitcoin ethereum asics bitcoin форум bitcoin перевод продажа bitcoin ethereum code монета ethereum bitcoin теория ethereum платформа валюты bitcoin simple bitcoin bitcoin loans tether пополнение bitcoin переводчик bitcoin loto bitcoin мошенники
bitcoin trend bitcoin forbes hashrate bitcoin surf bitcoin wikileaks bitcoin pps bitcoin bitcoin shops
bitcoin habr приложение tether email bitcoin alipay bitcoin ethereum android mainer bitcoin bag bitcoin bitcoin masters
bitcoin artikel
bitcoin coins bitcoin миллионеры bitcoin dollar tether приложения bitcoin лого bitcoin bbc github ethereum bitcoin script ethereum github bitcoin хардфорк bitcoin сервисы
wordpress bitcoin bitcoin обменники bitcoin картинки bitcoin arbitrage wallets cryptocurrency mikrotik bitcoin bitcoin fan forbot bitcoin bitcoin проверить bitcoin trader bitcoin tm seed bitcoin bitcoin start bitcoin продам
bitcoin journal пулы ethereum bitcoin iq bitcoin ne игра ethereum bitcoin explorer cryptocurrency price monero новости bitcoin adress
bitcoin symbol bitcoin step bitcoin прогноз bitcoin спекуляция bitcoin doubler bitcoin information Anybody with access to the web and appropriate equipment can take an interest in mining. In the most punctual days of Bitcoin, mining was finished with *****Us from ordinary desktop PCs. Representation cards, or design handling units (GPUs), are more compelling at mining than *****Us and as Bitcoin picked up fame, GPUs wound up noticeably overwhelming.bitcoin прогноз ethereum прибыльность mempool bitcoin maps bitcoin bitcoin dark lurkmore bitcoin фарм bitcoin multiply bitcoin bitcoin hd earning bitcoin bitcoin анонимность british bitcoin rush bitcoin bitcoin qr bitcoin uk адрес ethereum bitcoin mail
monero кран monero coin сборщик bitcoin bitcoin авито
cryptocurrency logo bitcoin транзакции bitcoin информация cryptocurrency reddit bitcoin girls
ethereum markets обмен bitcoin
bitcoin icons
bitcoin автомат bitcoin clicker bitcoin x2 bitcoin funding panda bitcoin статистика ethereum nodes bitcoin bitcoin signals
ethereum debian boom bitcoin
earn bitcoin bitcoin 20 ico ethereum poloniex ethereum bitcoin background
бесплатно ethereum bitcoin анонимность
bitcoin проверка bitcoin cli bitcoin coinwarz ethereum платформа rocket bitcoin ninjatrader bitcoin bitcoin код bitcoin journal bitcoin analytics bitcoin gif cronox bitcoin deep bitcoin hash bitcoin
bitcoin segwit2x bitcoin lottery crypto bitcoin bitcoin unlimited tor bitcoin bitcoin перевод приложение bitcoin bitcoin программирование dark bitcoin eos cryptocurrency
freeman bitcoin se*****256k1 ethereum сложность ethereum cz bitcoin grayscale bitcoin coindesk bitcoin all cryptocurrency bitcoin динамика
ethereum io blog bitcoin Bob signs the transaction with his private key, and announces his public key for signature verification.эпоха ethereum bitcoin get bitcoin cap master bitcoin ethereum курсы альпари bitcoin
bitcoin statistics reverse tether bitcoin cny динамика ethereum обмена bitcoin bitcoin microsoft gift bitcoin bitcoin xt
раздача bitcoin trader bitcoin
bitcoin sphere ethereum chaindata ethereum cryptocurrency bitcoin установка matteo monero ethereum addresses bitcoin adress currency bitcoin
tinkoff bitcoin bitcoin кошелька
ethereum dark ethereum цена добыча bitcoin r bitcoin bitcoin instaforex bitcoin symbol
скачать bitcoin bitcoin eobot tether майнинг продать monero qr bitcoin приват24 bitcoin kinolix bitcoin preev bitcoin
криптовалюта tether bear bitcoin coin bitcoin bitcoin okpay bitcoin trade rigname ethereum monero валюта играть bitcoin форк bitcoin bitcoin уязвимости bitcoin гарант rus bitcoin ethereum бесплатно бумажник bitcoin bitcoin solo usdt tether bitcoin switzerland master bitcoin
bitcoin настройка Finally, we have shown the ways commercial software companies have tried to mimic the open allocation ways of working. With free and open source software, the hacker movement effectively destroyed the institutional monopoly on research and development. In the next section, we’ll learn how exactly their organizational patterns work, and how Bitcoin was built to improve them.Human Consensus In Cryptocurrency NetworksNow you know how blockchains and crypto mining work. Next, I’ll tell you how you can join a cryptocurrency network…bus bitcoin bitcoin прогноз ethereum вики bitcoin 4000 bitcoin минфин hashrate bitcoin pools bitcoin sberbank bitcoin вывод bitcoin куплю ethereum bitcoin vip bitcoin ann boom bitcoin bitcoin wallet fenix bitcoin bitcoin two rush bitcoin bitcoin bitrix mikrotik bitcoin bitcoin брокеры bitcoin frog zona bitcoin bitcoin компания bitcoin cnbc bitcoin novosti bitcoin trade кошельки bitcoin bitcoin обналичить bitcoin qr bitcoin scripting куплю bitcoin настройка bitcoin ethereum torrent bitcoin puzzle bitcoin landing The two catches are:app bitcoin
bitcoin ethereum казахстан bitcoin курс bitcoin
bitcoin invest delphi bitcoin портал bitcoin bitcoin рублях bitcoin wm ethereum course андроид bitcoin bitcoin scripting opencart bitcoin clicker bitcoin комиссия bitcoin bus bitcoin bitcoin weekend
time bitcoin bitcoin yen bitcoin ethereum ethereum бесплатно bitcoin talk tails bitcoin
ethereum logo
bitcoin эфир forex bitcoin bitcoin course cronox bitcoin casino bitcoin обмен tether генераторы bitcoin падение bitcoin вложения bitcoin форумы bitcoin автомат bitcoin btc bitcoin daily bitcoin iso bitcoin сайт ethereum reddit cryptocurrency abc bitcoin habrahabr bitcoin bitcoin favicon exchanges bitcoin raiden ethereum tether ico accepts bitcoin биржи bitcoin
bitcoin картинки Imagine, you give a friend $1. For it, he promises you an ice cream cone tomorrow.bitcoin multiply r bitcoin bitcoin status bitcoin rotator ad bitcoin The probability of an attacker catching up from a given deficit is analogous to a Gambler'secopayz bitcoin ethereum decred bitcoin boom bitcoin даром wired tether расширение bitcoin bip bitcoin icon bitcoin bitcoin ether bitcoin расшифровка bitcoin friday
cryptocurrency dash bitcoin venezuela использование bitcoin продать monero bitcoin scripting bitcoin demo сборщик bitcoin ethereum *****u x2 bitcoin bitcoin loan monero майнить покупка bitcoin token ethereum bitcoin инвестирование сбербанк bitcoin windows bitcoin bitcoin darkcoin bitcoin пожертвование explorer ethereum tether usdt зарегистрироваться bitcoin bitcoin новости 22 bitcoin 2016 bitcoin ethereum 4pda bitcoin faucet bitcoin cost
сборщик bitcoin bitcoin количество бесплатно ethereum bitcoin safe конвертер monero bitcoin коды алгоритм ethereum 15 bitcoin
проект ethereum polkadot ico json bitcoin запросы bitcoin
difficulty bitcoin bitcoin cap bitcoin png monero прогноз metal bitcoin reindex bitcoin bitcoin будущее эмиссия ethereum bitcoin comprar робот bitcoin bitcoin magazin новости monero bitcoin hesaplama bitcoin future txid ethereum bitcoin заработок ethereum gold anomayzer bitcoin tether bootstrap ads bitcoin bitcoin ethereum сигналы bitcoin Anonymous. Bitcoin does not require any ID to use making it suitable for the unbanked, the privacy-conscious, computers or people in areas with underdeveloped financial infrastructure.краны ethereum cryptocurrency trading
TWITTER• Bitcoin’s primary drivers will be in saving, lending and underwritingbitcoin trust доходность bitcoin love bitcoin ethereum транзакции ssl bitcoin bitcoin конец bitcoin пример course bitcoin конец bitcoin кошельки bitcoin statistics bitcoin
bitcoin монета monero amd виджет bitcoin lealana bitcoin monero майнинг bitcoin рубль reward bitcoin neteller bitcoin bitcoin price is bitcoin instant bitcoin bitcoin в bitcoin okpay биржа monero wikileaks bitcoin bitcoin перевод ethereum online
ethereum swarm bitcoin vector ubuntu ethereum ethereum пул circle bitcoin bitcoin tm ethereum fork япония bitcoin 22 bitcoin
bitcoin play
партнерка bitcoin
пулы bitcoin
monero dwarfpool carding bitcoin monero dwarfpool favicon bitcoin bitcoin valet bitcoin utopia register bitcoin billionaire bitcoin сокращение bitcoin сложность ethereum spots cryptocurrency dorks bitcoin bitcoin instagram greenaddress bitcoin bitcoin maps вики bitcoin bitcoin миксер fasterclick bitcoin ethereum parity bitcoin 999 bitcoin fan bitcoin clouding trade cryptocurrency bitcoin видео удвоитель bitcoin excel bitcoin bitcoin co bitcoin count bitcoin stealer monero ann eobot bitcoin ethereum markets динамика ethereum bitcoin fpga символ bitcoin buy tether bitcoin бонус forecast bitcoin ropsten ethereum bitcoin nedir ethereum прибыльность обмен tether
работа bitcoin
bitcoin life trade cryptocurrency bitcoin trezor bitcoin страна new cryptocurrency