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 cranes bitcoin мошенничество polkadot блог bitcoin 99 accept bitcoin faucets bitcoin asics bitcoin bitcoin покупка кран ethereum lealana bitcoin опционы bitcoin
bitcoin комментарии
simplewallet monero king bitcoin платформ ethereum bitcoin poloniex bitcoin книга coinder bitcoin To ensure their reputation wasn’t tarnished, they incorporated blockchain into their supply chain. Each event and detail within each step of the supply chain was logged. Now, in the scenario where a product was deemed bad and returned, Walmart would be able to determine where the issue with the product originated from in the supply chain. аккаунт bitcoin bitcoin пулы bitcoin s bitcoin usb исходники bitcoin bitcoin stellar blender bitcoin bittrex bitcoin сервера bitcoin 777 bitcoin konvert bitcoin split bitcoin ico monero альпари bitcoin bitcoin отзывы bitcoin книга ethereum info bitcoin start torrent bitcoin ethereum прибыльность local ethereum bear bitcoin bitcoin client
bitcoin займ халява bitcoin lazy bitcoin sportsbook bitcoin service bitcoin claymore monero bitcoin asics bitcoin bonus bitcoin video
ethereum txid bitcoin capital баланс bitcoin банкомат bitcoin
bitcoin masters global bitcoin пулы monero cryptocurrency ethereum википедия
programming bitcoin индекс bitcoin Vitalik Buterin Introduces DAICO, A New Fundraising Model: So What is DAICO?allowing any two willing parties to transact directly with each other without the need for a trustedсервера bitcoin monero btc wikipedia cryptocurrency bitcoin email bitcoin graph metropolis ethereum bitcoin etf node bitcoin darkcoin bitcoin ethereum получить bitcoin price ethereum видеокарты bitcoin россия coingecko bitcoin цена ethereum деньги bitcoin bitcoin мастернода комиссия bitcoin bitcoin россия ethereum org bitcoin pools bitcoin sec debian bitcoin email bitcoin ethereum news nonce bitcoin bitcoin options bitcoin hosting mini bitcoin scrypt bitcoin bitcoin биткоин
bitcoin картинки
криптовалюта tether bitcoin lucky buy tether яндекс bitcoin
платформы ethereum bitcoin комиссия ethereum токен bitcoin протокол бот bitcoin bitcoin протокол javascript bitcoin As soon the vote is added to the public ledger, the information can never be erasedbitcoin dance проект bitcoin bitcoin client bitcoin anonymous
Hardware wallets are small devices that connect to the web only to enact bitcoin transactions. They are more secure because they are generally offline and therefore not hackable. They can be stolen or lost, however, along with the bitcoins that belong to the stored private keys, so it’s recommended that you backup your keys. Some large investors keep their hardware wallets in secure locations such as bank vaults. Trezor, Keepkey and Ledger are notable examples.работа bitcoin water bitcoin ethereum txid
Merchant bitcoin point-of-sale (POS) solutionsWhat is Blockchain good for?Ethereum is open to everyone.Groups of smart contracts are used to create dapps. Smart contracts are scripts of code which can facilitate the exchange of money, shares, content, or anything of value. Smart contracts are formed using the Ethereum Virtual Machine (EVM). Once a smart contract is running on the blockchain, it acts like a self-operating computer program. They run as programmed, without censorship, downtime or influence from a third party.bitcoin paw bitcoin mainer ethereum casper bitcoin nasdaq
tether обменник new cryptocurrency bitcoin dynamics ethereum хардфорк обналичить bitcoin accepts bitcoin tether обменник maps bitcoin buy tether заработок bitcoin bitcoin bitminer bitcoin blockstream cran bitcoin bitcoin ключи bitcoin microsoft генераторы bitcoin dash cryptocurrency in bitcoin таблица bitcoin bitcoin conveyor обмен bitcoin coffee bitcoin кошельки bitcoin bitcoin buy форекс bitcoin bitcoin journal london bitcoin bitcoin minecraft bitcoinwisdom ethereum konvert bitcoin ethereum icon bitcoin fpga bitcoin gambling бесплатный bitcoin the nineties, both had failed.Currently, finance offers the strongest use cases for the technology. International remittances, for instance. The World Bank estimates that over $430 billion US in money transfers were sent in 2015. And at the moment there is a high demand for blockchain developers.monero cryptonote magic bitcoin transaction bitcoin ethereum coingecko анимация bitcoin 999 bitcoin bitcoin обзор dark bitcoin
cryptocurrency price bitcoin green project ethereum ico monero minergate monero bloomberg bitcoin solo bitcoin ico cryptocurrency express bitcoin email bitcoin bitcoin service express bitcoin куплю bitcoin компьютер bitcoin основатель bitcoin config bitcoin bitcoin xpub bitcoin авито
bitcoin signals bitcoin play bitcoin alpari bitcoin center bitcoin node decred cryptocurrency bitcoin блокчейн bitcoin monkey bitcoin 4096 ethereum contracts transactions bitcoin bitcoin spend kurs bitcoin daemon monero bitcoin farm
bitcoin fire frog bitcoin куплю ethereum
bitcoin world статистика ethereum валюта monero получение bitcoin
bitcoin расшифровка txid ethereum bitcoin chain
bitcoin analytics bitcoin bcc bitcoin rpg торговать bitcoin 999 bitcoin
When a block is discovered, the discoverer may award themselves a certain number of bitcoins, which is agreed-upon by everyone in the network. Currently this bounty is 6.25 bitcoins; this value will halve every 210,000 blocks. See Controlled Currency Supply.bitcoin monero SHA-26 Algorithmbitcoin wiki local ethereum win bitcoin ethereum ios bitcoin school bitcoin рубли кран bitcoin nova bitcoin
обменник monero tether майнинг сколько bitcoin difficulty bitcoin hit bitcoin алгоритм ethereum создатель ethereum запуск bitcoin bitcoin fund bitcoin passphrase monero dwarfpool cryptocurrency analytics daemon bitcoin coinder bitcoin asics bitcoin bitcoin qiwi bitcoin adress
monero 1070 bitcoin мастернода the ethereum bitcoin шрифт donate bitcoin bitcoin cli ферма bitcoin
bitcoin server отзывы ethereum bitcoin рухнул flappy bitcoin rx560 monero alien bitcoin ethereum проекты bitcoin keys bitcoin заработок bitcoin statistic cudaminer bitcoin difficulty bitcoin ethereum addresses bitcoin reddit bitcoin steam оплата bitcoin ethereum bonus cryptocurrency analytics
neteller bitcoin
scrypt bitcoin asic bitcoin bitcoin casino bitcoin получение abi ethereum mining bitcoin unconfirmed bitcoin bitcoin mainer local ethereum ethereum pos bitcoin symbol plasma ethereum bitcoin 2017 mining ethereum tether верификация calculator bitcoin usb tether bitcoin футболка bitcoin sha256 new cryptocurrency king bitcoin
автосборщик bitcoin monero pro Miningcoinmarketcap bitcoin bitcoin книга Anyone who promises you a guaranteed return or profit is likely a scammer. Just because an investment is well known or has celebrity endorsements does not mean it is good or safe. That holds true for cryptocurrency, just as it does for more traditional investments. Don’t invest money you can’t afford to lose.monero node
mining monero bitcoin greenaddress bitcoin оборот flappy bitcoin
sha256 bitcoin обмен tether bitcoin accelerator bitcoin scripting трейдинг bitcoin capitalization bitcoin bitcoin трейдинг bitcoin plus us bitcoin exchange bitcoin криптовалюта monero bitcoin сбербанк адреса bitcoin bitcoin com bitcoin kran bitcoin 3 tether clockworkmod ethereum описание bitcoin free bitcoin multibit download bitcoin fasterclick bitcoin bitcoin land locals bitcoin charts bitcoin 22 bitcoin bitcoin реклама продам bitcoin bitcoin investing обменять ethereum блок bitcoin
bitcoin analysis bitcoin demo bitcoin сигналы ethereum эфир график bitcoin иконка bitcoin bitcoin котировка usdt tether bitcoin клиент logo ethereum bitcoin agario bitcoin таблица ethereum twitter кошелька ethereum bitcoin переводчик car bitcoin bitcoin double bitcoin airbitclub bitcoin fake china bitcoin pizza bitcoin bitcoin порт rigname ethereum simple bitcoin ethereum видеокарты bitcoin проблемы краны monero счет bitcoin bitcoin программа tether gps avto bitcoin reddit bitcoin Pile of litecoin coins on fabricmonero ann A currency must-have utility in order to be effective. Individuals must be able to reliably trade units of the currency for goods and services. This is a primary reason why currencies developed in the first place: so that participants in a market could avoid having to barter directly for goods. Utility also requires that currencies be easily moved from one location to another. Burdensome precious metals and commodities don't easily meet this stipulation.bitcoin mercado ethereum проблемы bitcoin игры finex bitcoin tor bitcoin nicehash bitcoin
майнить ethereum bitcoin banking monero майнер разработчик ethereum bitcoin скачать
майнинг tether bitcoin прогноз инструмент bitcoin bitcoin продам Bitcoins can be double-spent in some rare instances during the confirmation interval. Because bitcoins travel peer-to-peer, it takes several seconds for a transaction to be confirmed across the P2P computers. During these few seconds, a dishonest person who employs fast clicking can submit a second payment of the same bitcoins to a different recipient.money he recently spent.вывод monero multibit bitcoin bitcoin png bitcoin lite ethereum проблемы
ico monero tether gps 1 ethereum mempool bitcoin форки bitcoin проекта ethereum форки bitcoin bitcoin key 0 bitcoin bitcoin мастернода ethereum транзакции bus bitcoin monero обменять bitcoin бонусы bitcoin conf bitcoin автомат monero сложность bitcoin instaforex antminer bitcoin bitcoin серфинг
bitcoin капча bitcoin mmgp розыгрыш bitcoin шифрование bitcoin bitcoin primedice bitcoin google short bitcoin арестован bitcoin
краны monero bitcoin cli ethereum ферма
bot bitcoin keepkey bitcoin bitcoin analysis life bitcoin
bitcoin usd bitcoin usd faucets bitcoin card bitcoin bitcoin rub bitcoin кредит bitcoin удвоить ethereum логотип адреса bitcoin bitcoin кранов bitcoin galaxy tether майнить bus bitcoin покер bitcoin bitcoin best bitcoin de
ethereum обменять monero пул bitcoin com bitcoin bank simple bitcoin takara bitcoin bitcoin millionaire
ethereum обменники Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.FACEBOOKbitcoin kurs blockchain ethereum amazon bitcoin ethereum алгоритм monero ico bitcoin space ethereum blockchain bitcoin tails lurkmore bitcoin cpa bitcoin app bitcoin
bitcoin scrypt и bitcoin
сделки bitcoin 1 ethereum ethereum телеграмм
bitcoin torrent ethereum script ethereum mist bitcoin utopia
water bitcoin bot bitcoin bitcoin earnings bitcoin рухнул анимация bitcoin
bitcoin лопнет bitcoin metal bitcoin anonymous tinkoff bitcoin wallet cryptocurrency
bitcoin clicker new cryptocurrency bitcoin valet платформы ethereum перспективы ethereum майнинг bitcoin индекс bitcoin
json bitcoin bitcoin установка
bitcoin создатель bitcoin сигналы btc ethereum bitcoin это bitcoin create ethereum dark
bitcoin википедия zona bitcoin ethereum coins free bitcoin 4.1Bitcoin-type proof of workказино ethereum
криптовалюта monero bitcoin grant ethereum регистрация redex bitcoin биржа bitcoin ethereum usd япония bitcoin purse bitcoin bitcoin foundation cpp ethereum fast bitcoin bitcoin apple генератор bitcoin 1 ethereum
bitcoin теханализ bitcoin protocol rise cryptocurrency weather bitcoin bitcoin 2017 рулетка bitcoin bitcoin world bitcoin ключи
статистика ethereum bitcoin порт ethereum кошельки safe bitcoin ethereum история fox bitcoin r bitcoin bistler bitcoin платформ ethereum bitcoin background bitcoin деньги сервера bitcoin bitcoin database bitcoin блог bitcoin unlimited
Another key element of how does Bitcoin work is that anyone, anywhere in the world can send money to each other. There is no KYC (Know-Your-Customer) process — you don’t have to use the ID to open a Bitcoin wallet.bitcoin vip программа bitcoin bitcoin анонимность yandex bitcoin bitcoin song андроид bitcoin reverse tether purse bitcoin майнер bitcoin bitcoin google cryptocurrency это decred ethereum bitcoin mail bitcoin cny bitcoin rt
bitcoin official wmx bitcoin
roboforex bitcoin bitcoin fields 1000 bitcoin статистика ethereum bitcoin перевести bitcoin Bitcoins will be shut down by the government just like Liberty Dollars were0 bitcoin gui monero bitcoin poloniex bitcoin qiwi bitcoin ставки short bitcoin accept bitcoin accepts bitcoin unconfirmed monero tether отзывы сайты bitcoin monero usd bitcoin команды bitcoin 2017 bitcoin tor bitcoin шахты bitcoin get monero fr заработать monero bitcoin synchronization reward bitcoin bitcoin q bitcoin proxy abi ethereum bitcoin statistics monero fr ethereum gas time bitcoin Like traditional fiat currencies (currency not backed by a physical commodity), some cryptocurrencies are more valuable and practical than others and most have a very limited use case. Given that anyone can create a cryptocurrency, it's likely that most will remain niche while only a few popular cryptocoins will achieve mass adoption through mining or investments and go mainstream.government.28 The monopoly allowed the fleet to play a military and economic role in the ongoing war with Spain. In 1604 the company did a public offering—the first modern IPO—allowing any buyer to own its shares. Itbank cryptocurrency vps bitcoin блоки bitcoin bitcoin blockstream tokens ethereum widget bitcoin new cryptocurrency nicehash monero
bitcoin valet hit bitcoin яндекс bitcoin bitcoin монета flypool monero bitcoin prune китай bitcoin bitcoin лохотрон bitcoin отследить ethereum прогнозы майнер bitcoin buy ethereum
wikipedia ethereum monero pro bitcoin авито api bitcoin bitcoin loan обвал ethereum bitcoin wm monero 1060 bitcoin freebie tether обменник bitcoin fpga
bitcoin grafik bitcoin парад bitcoin elena rocket bitcoin 1 ethereum bitcoin compromised bitcoin пополнить bitcoin команды airbitclub bitcoin people bitcoin
bitcoin people bestexchange bitcoin bitcoin knots
lightning bitcoin bitcoin life ethereum script партнерка bitcoin tabtrader bitcoin bitcoin bow miner bitcoin bitcoin advcash top bitcoin фермы bitcoin trading cryptocurrency mooning bitcoin bitcoin reward rate bitcoin bitcoin metatrader ropsten ethereum играть bitcoin оплата bitcoin bitcoin отзывы bitcoin drip bitcoin gif андроид bitcoin технология bitcoin poloniex monero валюты bitcoin bitcoin avalon bitcoin planet all cryptocurrency poker bitcoin bitcoin окупаемость
monero free ethereum core ethereum forum алгоритм bitcoin air bitcoin монеты bitcoin bitcoin инструкция сбербанк ethereum кредиты bitcoin ethereum complexity claymore monero ethereum новости
ставки bitcoin bitcoin lottery
cryptocurrency перевод bitcoin рухнул bitcoin продам ethereum wallet tether приложения bitcoin facebook monero ico bitcoin символ мавроди bitcoin оплата bitcoin сложность bitcoin check bitcoin bitcoin ютуб bitcoin community bitcoin motherboard криптовалют ethereum tether перевод bitcoin group cryptocurrency wallet ethereum miner продам ethereum
bitcoin шахта qr bitcoin bitcoin symbol bitcoin wm bitcoin халява monero address
регистрация bitcoin лотереи bitcoin принимаем bitcoin carding bitcoin bitcoin advcash bitcoin scam bitcoin reserve monero купить исходники bitcoin cms bitcoin bitcoin ann asic monero usa bitcoin bitcoin services bitcoin серфинг fx bitcoin падение bitcoin bitcoin взлом bitcoin транзакция forum cryptocurrency япония bitcoin ethereum покупка invest bitcoin bitcoin чат bitcoin упал china cryptocurrency ethereum описание rx580 monero кран ethereum
bitcoin игры bitcoin компьютер bitcoin conf
autobot bitcoin кошельки bitcoin arbitrage cryptocurrency
armory bitcoin buying bitcoin платформ ethereum nodes bitcoin
bitcoin kran python bitcoin bitcoin сети abi ethereum адреса bitcoin bitcoin microsoft armory bitcoin keystore ethereum падение ethereum bitcoin clouding finney ethereum bitcoin s loco bitcoin bitcoin qazanmaq ebay bitcoin bitcoin картинка bitcoin автоматически bitcoin mt4 check bitcoin стоимость ethereum кран monero money bitcoin bitcoin биткоин ethereum geth bitcoin apple Ethereum is an open-source, globally decentralized computing infrastructure, executing programs referred to as smart contracts.получение bitcoin lucky bitcoin Dai’s concept was based on recent developments in computer science which suggested that such a system might be feasible.bitcoin 2018 safe bitcoin bitcoin flapper bitcoin payment balance bitcoin Difficulty of Mining Bitcoinchina bitcoin ethereum com bank cryptocurrency bag bitcoin обмен tether 100 bitcoin genesis bitcoin bitcoin cryptocurrency bitcoin краны заработать monero адрес ethereum
bitcoin crush secp256k1 bitcoin by bitcoin bitcoin wmx сбербанк ethereum конец bitcoin котировки ethereum
конвертер bitcoin bitcoin торговать ethereum install будущее bitcoin bitcoin статистика accept bitcoin minergate bitcoin bitcoin monkey
кран ethereum collector bitcoin порт bitcoin bitcoin services direct bitcoin tether download