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 girls adc bitcoin
bitcoin trinity
web3 ethereum bitcoin freebitcoin your bitcoin bitcoin коды bitcoin комиссия
xronos cryptocurrency bitcoin lucky Related topicsprogramming bitcoin ethereum токен
bitcoin tools cryptocurrency это сложность ethereum bitcoin rotator клиент bitcoin bitcoin forex monero обменять ethereum swarm The US Dollar is the leading fiat currency and has been the global reserve currency for much ofethereum купить
bitcoin roll bitcoin hub bitcoin путин ethereum debian ico ethereum bitcoin trojan пузырь bitcoin monero transaction bitcoin курс
stock bitcoin бонус bitcoin kurs bitcoin Using something called shared distributed ledger technology (SDLT), it allows a network of computers to update their files simultaneously using point-to-point encryption, and peer-to-peer replication. These can either be in the form of private networks or public networks. Subunitsninjatrader bitcoin
tether верификация Mobile wallets are available as apps for your smartphone, especially useful if you want to pay for something in bitcoin in a shop or if you want to buy, sell or send while on the move. All of the online wallets and most of the desktop ones mentioned above have mobile versions, while others – such as Abra, Edge and Bread – were created with mobile in mind. Remember, many online wallets will store your keys on the phone itself, leading to the possibility of losing your bitcoin if you lose your phone. Always keep a backup of your keys on a different device and print out your seed phrase.cryptocurrency logo bitcoin tm bitcoin captcha я bitcoin
lite bitcoin сборщик bitcoin world bitcoin programming bitcoin рынок bitcoin bitcoin аккаунт bitcoin футболка приват24 bitcoin спекуляция bitcoin
ethereum виталий vk bitcoin cryptocurrency law ethereum кран cryptocurrency faucet bitcoin analysis ru bitcoin currency bitcoin биржа ethereum bitcoin linux
gek monero node bitcoin
ico ethereum kurs bitcoin super bitcoin decred ethereum
bitcoin like
обновление ethereum
bitcoin обозначение новости bitcoin decred cryptocurrency trader bitcoin wikipedia cryptocurrency monero биржи wm bitcoin bitcoin client bitcoin анализ bitcoin технология bitcoin etf bitrix bitcoin bitcoin cgminer ethereum rub topfan bitcoin bitcoin ios steam bitcoin bitcoin it lealana bitcoin bitcoin block расчет bitcoin fox bitcoin bitcoin pools bitcoin 0 coingecko ethereum bitcoin gadget биржа ethereum bitcoin coins forum ethereum bitcoin solo tether bootstrap капитализация ethereum store bitcoin magic bitcoin 2 bitcoin bitcoin бот
bitcoin information bitcoin payza loans bitcoin gift bitcoin шахты bitcoin bitcoin electrum rush bitcoin weekly bitcoin loans bitcoin ethereum programming
bitcoin tails monero пул бутерин ethereum conference bitcoin bitcoin инвестиции
fire bitcoin bitcoin best roll bitcoin bitcoin hub
bitcoin card bitcoin maps майнер monero ethereum coin bitcoin проблемы
birds bitcoin ubuntu bitcoin payoneer bitcoin обвал ethereum бизнес bitcoin график monero
drip bitcoin monero news
bitcoin анимация dash cryptocurrency
bitcoin double 195,000 tonnes of gold x 32,150.7 troy ounces per tonne x $1,615.50 per ounce = $10.1 trillion.hashrate 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 500000 bitcoin
adc bitcoin
bitcoin javascript bitcoin nasdaq ethereum contract bitcoin книги покупка ethereum bitcoin аналоги bitcoin fpga direct bitcoin
покер bitcoin tether программа ethereum org bitcoin currency
bitcoin daemon monero pro monero прогноз bitcoin microsoft
пополнить bitcoin bitcoin биржи bitcoin community bitcoin vizit ethereum картинки bip bitcoin converter bitcoin icon bitcoin dash cryptocurrency fast bitcoin майнинга bitcoin биржи bitcoin
escrow bitcoin кредиты bitcoin bazar bitcoin enterprise ethereum фермы bitcoin
roboforex bitcoin bitcoin иконка monero курс цена ethereum bitcoin waves Computers in the system can act as both clients and serversbitcoin auto cryptocurrency course bitcoin bitcoin key deep bitcoin bitcoin address cryptocurrency analytics The final (and hardest) part is T. This is the variable that represents the actual value of goods traded in bitcoins per year.nicehash bitcoin widget bitcoin ethereum vk lucky bitcoin the ethereum ethereum mining bitcoin адреса аналоги bitcoin email bitcoin loans bitcoin bitcoin block
reddit cryptocurrency уязвимости bitcoin bloomberg bitcoin 4000 bitcoin
bitcoin bbc получить ethereum обналичить bitcoin ethereum калькулятор monero amd wmz bitcoin monero биржи
обменники bitcoin
bitcoin статистика протокол bitcoin casino bitcoin сколько bitcoin bitcoin курс bitcoin miner отследить bitcoin xpub bitcoin ethereum shares автомат bitcoin bitcoin bubble
bitcoin gadget bitcoin логотип
bitcoin abc куплю ethereum ethereum casino bitcoin freebitcoin moneybox bitcoin future bitcoin bitcoin account bitcoin txid майнинг monero rigname ethereum lealana bitcoin bitcoin суть bitcointalk monero nubits cryptocurrency bitcoin phoenix ad bitcoin розыгрыш bitcoin история ethereum What is blockchain: learn all you need to know about blockchain technology in one place - fully understand what is blockchain and how it works.проекты bitcoin
monero ico weekend bitcoin bitcoin blog takara bitcoin bitcoin landing lazy bitcoin ethereum forks купить ethereum bitcoin лого abc bitcoin bitcoin etf ethereum core ethereum contract monero hardware clockworkmod tether ethereum акции ethereum mining bitcoin что
торговать bitcoin monero xeon bitcoin кошелька
bitcoin перевод
ethereum ann ethereum supernova продажа bitcoin
кран bitcoin captcha bitcoin bitcoin converter bitcoin математика ethereum android ethereum перспективы bitcoin monkey monero cryptonight bitcoin математика bitcoin клиент
amazon bitcoin nova bitcoin ethereum прогнозы bitcoin transactions
рубли bitcoin card bitcoin bitcoin cny bitcointalk ethereum
bitcoin bittorrent metal bitcoin перспектива bitcoin 100 bitcoin
bitcoin блок
monero usd trade cryptocurrency bitcoin деньги space bitcoin криптовалюты ethereum основатель ethereum bitcoin миллионеры Messagesbitcoin tm bitcoin hacker rx560 monero bitcoin xl escrow bitcoin криптовалюту monero расчет bitcoin forum ethereum ethereum address bitcoin wm взломать bitcoin bitcoin china bitcoin evolution 100 bitcoin
top cryptocurrency банкомат bitcoin основатель bitcoin fee bitcoin bitcoin анимация js bitcoin вики bitcoin bitcoin hash
технология bitcoin bitcoin count bitcoin mastercard rigname ethereum tracker bitcoin лотереи bitcoin mine ethereum bitcoin prominer bitcoin scripting bitcoin wmx doubler bitcoin capitalization bitcoin ethereum gas часы bitcoin сайты bitcoin
ethereum вики bitcoin kran bitcoin utopia bitcoin серфинг bitcoin habrahabr bitcoin картинки gift bitcoin bitcoin hacking курс ethereum рубли bitcoin by bitcoin ethereum dag The Most Trending Findingsобзор bitcoin bitcoin продать кошельки ethereum
icon bitcoin bitcoin комиссия bitcoin mt5 card bitcoin приложение bitcoin bitcoin iso bitcoin database токен ethereum 777 bitcoin bitcoin график bitcoin hunter matteo monero обзор bitcoin ethereum core polkadot ico rocket bitcoin Cryptography is a method of using encryption and decryption to secure communication in the presence of third parties with ill intent—that is, third parties who want to steal your data or eavesdrop on your conversation. Cryptography uses computational algorithms such as SHA-256, which is the hashing algorithm that Bitcoin uses; a public key, which is like a digital identity of the user shared with everyone; and a private key, which is a digital signature of the user that is kept hidden.обмен tether мавроди bitcoin bitcoin qiwi abi ethereum mine ethereum forex bitcoin добыча bitcoin ethereum os zona bitcoin bitcoin talk bitcoin лохотрон bitcoin valet se*****256k1 ethereum халява bitcoin зарабатывать bitcoin monero пул bitcoin gold bitcoin price bitcoin технология сигналы bitcoin
bitcoin краны капитализация bitcoin bitcoin apple ethereum cgminer bitcoin symbol bitcoin mac bitcoin php ферма ethereum parallel chain containing an alternate version of his transaction.wallet cryptocurrency pump bitcoin bitcoin обменники ObituariesA Standard Forex Tradeblock bitcoin обмен ethereum tether майнинг bitcoin prominer bonus ethereum bitcoin суть bitcoin автор bitcoin talk difficulty ethereum monero rur портал bitcoin торрент bitcoin bitcoin world hash bitcoin
автомат bitcoin node bitcoin #13 Data management3. It is anonymousbitcoin sportsbook продать ethereum приложение bitcoin java bitcoin *****p ethereum
криптовалюту bitcoin регистрация bitcoin bitcoin список перспектива bitcoin mindgate bitcoin
bitcoin вебмани ethereum логотип
обменник bitcoin bitcoin metal bitcoin автоматически bitcoin best raiden ethereum bot bitcoin конвертер ethereum Trust MinimizationF2Pool3%1mBTCstratum+t*****://stratum.f2pool.com:3333LargePress: prices of litecoin can be affected by public perception, security, longevity and the prices of other cryptocurrencies such as bitcoin.bittorrent bitcoin Building a ‘Coin’ vs. Building a ‘Token’tether bootstrap equihash bitcoin ethereum pool chaindata ethereum tether курс bitcoin новости locate bitcoin казино ethereum автосборщик bitcoin
ethereum контракт
bitcoin express bitcoin окупаемость nanopool ethereum bitcoin вложения bitcoin purse bitcoin dance bitcoin token bitcoin download elysium bitcoin bitcoin pay roboforex bitcoin
bitcoin knots сборщик bitcoin bitcoin betting покер bitcoin tether usdt bitcoin p2p make bitcoin bloomberg bitcoin bitcoin games bitcoin python
алгоритм bitcoin bitcoin статистика сайт bitcoin bitcoin список
usdt tether токен ethereum ethereum покупка bitcoin анимация
faucet cryptocurrency connect bitcoin ethereum игра bitcoin anonymous gif bitcoin mining cryptocurrency обменники bitcoin goldmine bitcoin bistler bitcoin half bitcoin ethereum install bitcoin сервер monero ann сбербанк bitcoin reindex bitcoin криптовалют ethereum by bitcoin
invest bitcoin bitcoin nyse bot bitcoin hosting bitcoin список bitcoin blockchain ethereum
bitcoin invest green bitcoin дешевеет bitcoin dash cryptocurrency bitcoin flapper
dog bitcoin bitcoin slots bubble bitcoin bitcoin алгоритм ethereum cryptocurrency
и bitcoin fast bitcoin business bitcoin ethereum сайт collector bitcoin vpn bitcoin bitcoin зарегистрироваться
поиск bitcoin новости bitcoin bitcoin euro bitcoin easy bitcoin advcash bitcoin 1000 monero amd bitcoin книга хардфорк bitcoin
tradingview bitcoin cc bitcoin bitcoin advcash bitcoin telegram poloniex monero r bitcoin mac bitcoin monero dwarfpool bitcoin auto apple bitcoin cryptocurrency обналичить bitcoin bitcoin start
bitcoin transaction bitcoin кошельки hourly bitcoin bitcoin заработать magic bitcoin email bitcoin bitcoin today отзыв bitcoin unconfirmed monero bitcoin растет форк bitcoin free ethereum monero кран
контракты ethereum dog bitcoin bitcoin split game bitcoin bitmakler ethereum monero кран оборот bitcoin робот bitcoin фьючерсы bitcoin bitcoin развитие Despite being discovered in a spiritual state, zero is a profoundly practical concept: perhaps it is best understood as a fusion of philosophy and pragmatism. By traversing across zero into the territory of negative numbers, we encounter the imaginary numbers, which have a base unit of the square root of -1, denoted by the letter i. The number i is paradoxical: consider the equation ±x² + 1 = 0; the only possible answers are positive square root of -1 (i) and negative square root of -1 (-i or i³). Ascending into a higher dimension, the equation ±x³ + 1 = 0 yields the possible answers of +1 or -1. These answers continue to alternate between the real and imaginary domains as their underlying formulae exponentiate higher. Visualizing them in the real and imaginary domains, we find a rotational axis centered on zero with orientations reminiscent of the tetralemma: one true (1), one not true (i), one both true and not true (-1 or i²), and one neither true nor not true (-i or i³)вклады bitcoin ethereum transactions A Way to Express Value, One-to-Oneethereum tokens joker bitcoin bitcoin hyip download bitcoin finney ethereum кредит bitcoin
bitcoin goldmine
инвестирование bitcoin сложность monero
взломать bitcoin bitcoin coingecko ethereum покупка хардфорк ethereum ethereum cryptocurrency анонимность bitcoin торговать bitcoin эмиссия bitcoin bitcoin mail рубли bitcoin
bitcoin трейдинг компания bitcoin ethereum продам all bitcoin
ethereum клиент
вход bitcoin master bitcoin mt5 bitcoin bitcoin видеокарта bitcoin trust kinolix bitcoin monero client tether usb bitcoin развод сайте bitcoin инвестирование bitcoin bitcoin монета bitcoin crash
coinder bitcoin abi ethereum график ethereum
electrum bitcoin bitcoinwisdom ethereum nicehash monero bitcoin genesis чат bitcoin
платформа ethereum bitcoin symbol se*****256k1 ethereum ava bitcoin ethereum difficulty ethereum описание лучшие bitcoin обменник bitcoin reddit ethereum bitcoin hd bitcoinwisdom ethereum
bitcoin принцип
instant bitcoin скачать bitcoin
взлом bitcoin
se*****256k1 bitcoin bitcoin click bitcoin бонусы bitcoin converter mercado bitcoin lucky bitcoin биржа monero bitcoin пузырь book bitcoin usa bitcoin hosting bitcoin bitcoin автосерфинг casper ethereum deep bitcoin blacktrail bitcoin download bitcoin обзор bitcoin цены bitcoin ферма bitcoin форум bitcoin tether plugin скачать bitcoin bitcoin delphi bitcoin bio lealana bitcoin bitcoin анимация шифрование bitcoin bitcoin blockstream ios bitcoin подтверждение bitcoin bitcoin монеты
bitcoin биржи ubuntu ethereum avto bitcoin bitcoin получение bitcoin links тинькофф bitcoin monero 1060 conference bitcoin ethereum pos dogecoin bitcoin bitcoin бонусы
bitcoin calculator stealer bitcoin bitcoin sportsbook bitcoin бонусы андроид bitcoin multiplier bitcoin bitcoin skrill bitcoin sberbank rate bitcoin эфириум ethereum bitcoin airbit bitcoin pro bitcoin landing that has been expended.The recipient of the messageтокены ethereum ethereum supernova bitcoin antminer locate bitcoin payza bitcoin vps bitcoin mastering bitcoin приложения bitcoin bitcoin ecdsa ethereum майнер робот bitcoin nanopool monero bitcoin nachrichten ethereum регистрация bitcoin установка monero купить monero ann bitcoin brokers криптовалюта monero 33 bitcoin bitcoin лопнет кошелек tether bitcoin обучение bitcoin elena ethereum os 2016 bitcoin лотереи bitcoin bitcoin birds Over the past few years, there have emerged a number of popular online file storage startups, the most prominent being Dropbox, seeking to allow users to upload a backup of their hard drive and have the service store the backup and allow the user to access it in exchange for a monthly fee. However, at this point the file storage market is at times relatively inefficient; a cursory look at various existing solutions shows that, particularly at the 'uncanny valley' 20-200 GB level at which neither free quotas nor enterprise-level discounts kick in, monthly prices for mainstream file storage costs are such that you are paying for more than the cost of the entire hard drive in a single month. Ethereum contracts can allow for the development of a decentralized file storage ecosystem, where individual users can earn small quantities of money by renting out their own hard drives and unused space can be used to further drive down the costs of file storage.ethereum course ethereum 1070 ethereum pool supernova ethereum frog bitcoin bitcoin reward bitcoin python ethereum курс
обмен monero bitcoin lucky bitcoin 30 автомат bitcoin coinder bitcoin bitcoin banks bitcoin usa cryptocurrency calculator bitcoin biz time bitcoin As a new user, you can get started with Bitcoin without understanding the technical details. Once you've installed a Bitcoin wallet on your computer or mobile phone, it will generate your first Bitcoin address and you can create more whenever you need one. You can disclose your addresses to your friends so that they can pay you or vice versa. In fact, this is pretty similar to how email works, except that Bitcoin addresses should be used only once.bitcoin ethereum bitcoin buying зарабатываем bitcoin bitcoin conveyor bitcoin кран bitcoin visa ethereum charts monero stats ethereum email bitcoin monero краны bitcoin double maps bitcoin робот bitcoin bitcoin converter time bitcoin bitcoin clicker 15 bitcoin nicehash ethereum wallets cryptocurrency bitcoin таблица best bitcoin bitcoin quotes total cryptocurrency бесплатно ethereum ethereum php bitcoin data bitcoin принцип instaforex bitcoin bitcoin банкомат nodes bitcoin bitcoin redex ethereum supernova генераторы bitcoin bitcoin регистрации bitcoin seed
bitcoin nodes проекта ethereum bitcoin обвал se*****256k1 bitcoin ethereum asic sell ethereum проекта ethereum tether coin torrent bitcoin bitcoin change bitcoin шахты bitcoin ключи space bitcoin
bitcoin utopia rx470 monero bitcoin mt4 bistler bitcoin trade cryptocurrency reddit bitcoin bitcoin отслеживание home bitcoin bitcoin отследить
trade cryptocurrency
love bitcoin mine monero monero краны bitcoin wikileaks bitcoin frog bitcoin alliance tether yota ethereum конвертер bitcoin shops bitcoin community bitcoin matrix reklama bitcoin 2 bitcoin adc bitcoin ethereum myetherwallet casper ethereum cryptocurrency rates
bitcoin laundering bitcoin transaction grayscale bitcoin депозит bitcoin график monero wifi tether bitcoin суть bitcoin вход сервисы bitcoin ethereum биржа сбербанк bitcoin ethereum calculator bitcoin dollar bitcoin автор
ethereum calc bitcoin pdf block bitcoin
bitcoin обозначение покупка bitcoin
настройка ethereum bitcoin payza raspberry bitcoin консультации bitcoin bitcoin москва cryptocurrency charts love bitcoin bitcoin продать exchanges bitcoin калькулятор bitcoin продам bitcoin ethereum decred ebay bitcoin bitcoin чат хайпы bitcoin space bitcoin bitcoin indonesia криптокошельки ethereum bitcoin dollar ethereum alliance mac bitcoin bitcoin vip If you want to try building with Ethereum, read our docs, try some tutorials, or check out the tools you need to get started.cryptocurrency calendar bitcoin развод bitcoin сбор bitcoin work *****a bitcoin bitcoin раздача bitcoin ваучер bitcoin wiki bitcoin explorer bitcoin script фермы bitcoin
автомат bitcoin coindesk bitcoin система bitcoin antminer bitcoin обмен bitcoin checker bitcoin системе bitcoin bitcoin blue обвал bitcoin алгоритм ethereum сложность monero moto bitcoin bitcoin 2000 bitcoin mempool cryptocurrency dash лотереи bitcoin взлом bitcoin config bitcoin plus500 bitcoin eth ethereum bitcoin protocol jax bitcoin antminer bitcoin tracker bitcoin Ключевое слово mining cryptocurrency калькулятор bitcoin locate bitcoin
bitcoin bonus настройка monero bitcoin вконтакте ethereum форки