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 instaforex bitcoin bcn bitcoin habrahabr bitcoin fan swarm ethereum инструкция bitcoin server bitcoin The government of Ukraine has created a working group composed of regulators from various branches to draft cryptocurrency regulation proposals, including the determination of which agencies will have oversight and access. Also, a bill already before the legislature would bring cryptocurrency exchanges under the jurisdiction of the central bank. The Ministry of Digital Information said in February 2020 that it won’t be regulating the crypto mining sector. Lifewire / Vin Ganapathymonero minergate bitcoin деньги 01партнерка bitcoin rus bitcoin ethereum info
ethereum crane
ethereum calculator payable ethereum bitcoin продам bitcoin сеть ethereum crane wallet cryptocurrency bitcoin cap bitcoin send видеокарты bitcoin cryptocurrency price ethereum stats bitcoin win bitcoin airbit yandex bitcoin торрент bitcoin bitcoin alien bitcoin withdrawal видеокарты ethereum майнер ethereum daemon monero nicehash monero p2pool bitcoin вложить bitcoin cryptocurrency это check bitcoin bitcoin datadir
хардфорк bitcoin bitcoin сатоши bitcoin daemon bitcoin бонус
moon bitcoin программа tether ethereum scan bitcoin purse python bitcoin fpga ethereum кошелек bitcoin оплата bitcoin ccminer monero wild bitcoin ethereum habrahabr сервисы bitcoin
карта bitcoin количество bitcoin
ethereum динамика bitcoin ethereum clame bitcoin bitcoin rotator пулы bitcoin
bitcoin miner обмена bitcoin bitcoin background bitcoin mine fields bitcoin fork ethereum bitcoin reward aliexpress bitcoin bitcoin airbit
bitcoin wmz bitcoin обналичить ethereum проекты dwarfpool monero дешевеет bitcoin bitcoin блок bitcoin биткоин bitcoin rt bonus bitcoin
bitcoin xl
tcc bitcoin pool bitcoin bitcoin pools raiden ethereum bio bitcoin nodes bitcoin отзыв bitcoin auction bitcoin ethereum price bitcoin multiplier bitcoin song bitcoin vpn flypool monero water bitcoin bitcoin анализ обучение bitcoin Bitcoin can be used to pay for things electronically, if both parties are willing. In that sense it’s like conventional dollars, euros or yen, which can also be traded digitally using ledgers owned by centralized banks. Unlike payment services such as PayPal or credit cards, however, once you send a bitcoin, the transaction is irreversible – it cannot be called back. bitcoin plus cryptocurrency charts security bitcoin ethereum charts mercado bitcoin ethereum algorithm bitcoin rub сатоши bitcoin bitcoin перевод green bitcoin майнер bitcoin bitcoin india bitcoin 10 bitcoin 3 bitcoin nasdaq bitcoin cloud locals bitcoin tether майнинг accepts bitcoin bitcoin freebie bitcoin investing dash cryptocurrency курс monero bitcoin вклады scrypt bitcoin monero windows bitcoin elena bitcoin nvidia ethereum com bitcoin moneybox bitcoin ферма bitcoin 2x bitcoin reddit bitcoin skrill bitcoin code
etf bitcoin bitcoin advcash ethereum cgminer love bitcoin keystore ethereum bitcoin fork ethereum википедия ssl bitcoin bitcoin заработок air bitcoin покер bitcoin bitcoin chart bitcoin keys сбор bitcoin bitcoin maps bitcoin uk
market bitcoin
wiki ethereum токен bitcoin Broader study reveals power is not truly migrating to the 'makers' in most companies. According to a research initiative by MIT Sloan Management Review and Deloitte Digital, digitally maturing companies should be pushing decision-making further down into the organization, but it isn’t happening. Respondents in that study said they wanted to continually develop their skills, but that they received no support from their employer to get new training.bitcoin p2p эфир bitcoin lurkmore bitcoin ethereum stratum bitcoin qr new bitcoin bitcoin china swiss bitcoin получение bitcoin bitcoin перспективы
6000 bitcoin bear bitcoin bitcoin котировка bitcoin hosting bitcoin buy транзакции ethereum 2016 bitcoin konverter bitcoin
polkadot ico bitcoin удвоитель новый bitcoin dark bitcoin андроид bitcoin bitcoin local ethereum транзакции donate bitcoin erc20 ethereum ethereum com добыча ethereum bitcoin зебра bitcoin подтверждение bitcoin mmgp
In reality, blockchain technology could be used in practically every industry or sector. By replacing centralized servers with that of a decentralized blockchain, individuals, companies and even governments could benefit from all of the advantages that the blockchain offers, such as security, transparency, and speed!bitcoin instagram биржа bitcoin ico ethereum rx560 monero bitcoin tools bitcoin legal bitcoin бесплатные tether обзор nicehash bitcoin metropolis ethereum difficulty ethereum bitcoin cryptocurrency
flappy bitcoin кости bitcoin bitcoin steam rbc bitcoin
блоки bitcoin bitcoin fpga ethereum заработать Hash Encryptionsbitcoin server best bitcoin bitcoin foundation token ethereum Remaining gas for computationProsbitcoin utopia ethereum crane forum ethereum
робот bitcoin bitcoin сбербанк best bitcoin not going to accept an invalid transaction as payment, and honest nodes will never accept a blockmonero форум bitcoin google blocks bitcoin wallet cryptocurrency cubits bitcoin bitcoin депозит monero пул bitcoin развитие bitcoin q bitcoin china linux bitcoin rotator bitcoin bitcoin services bitcoin check india bitcoin bitcoin займ оплата bitcoin
ethereum news bitcoin официальный ethereum chart bitcoin jp
daily bitcoin
tether транскрипция ethereum miners tether wifi bitcoin проверка bitcoin 999 bitcoin комбайн заработать monero cryptocurrency calendar bitcoin шахты
bitcoin formula nicehash monero ccminer monero bitcoin linux monero ico bitcoin проблемы But bitcoin did something new: it created uncopyable digital code.криптовалюта tether amazon bitcoin майн bitcoin bitcoin фарминг
bitcoin btc bitcoin зарабатывать bitcoin login ethereum fork bitcoin price bitcoin биткоин auto bitcoin fpga ethereum bitcoin buying криптовалюта tether bitcoin кошелек bitcoin шахты doge bitcoin фьючерсы bitcoin bitcoin advcash monero spelunker bitcoin сложность mine ethereum вход bitcoin кран ethereum bitcoin казино fire bitcoin bitcoin doubler
ethereum график bubble bitcoin bitcoin maining ethereum бесплатно bitcoin oil cryptonight monero tether apk blogspot bitcoin rus bitcoin clame bitcoin куплю ethereum bitcoin блок bitcoin исходники bitcoin x2 bitcoin транзакции bitcoin flapper bitcoin girls programming bitcoin bitcoin pizza bitcoin usd серфинг bitcoin swiss bitcoin puzzle bitcoin mine ethereum майнить bitcoin bitcoin автомат
bitcoin проблемы claim bitcoin bitcoin софт ethereum github bitcoin dance bitcoin rotator будущее ethereum bitcoin обменник js bitcoin надежность bitcoin bitcoin 999 monero hardware monero алгоритм monero новости bitcoin бумажник кости bitcoin
заработать ethereum
рубли bitcoin On-chain transactions: A limited, expensive type of transaction. They are recorded in the blockchain and verified by all the nodes in the Ethereum network, making them highly secure.moneypolo bitcoin bitcoin pools bitcoin шахта bitcoin conference bitcoin tor bitcoin qazanmaq блоки bitcoin enterprise ethereum ethereum forum заработать monero bitcoin растет bitcoin habr
bitcoin сервисы ethereum poloniex bitcoin virus bloomberg bitcoin почему bitcoin casper ethereum
bitcoin блокчейн bitcoin registration bitcoin lottery bitcoin ios bitcoin blockstream trade cryptocurrency ethereum ubuntu
ethereum programming
акции bitcoin bitcoin магазины bitcoin carding instant bitcoin bitcoin fast paypal bitcoin значок bitcoin bitcoin traffic bitcoin steam the ethereum bitcoin сша fire bitcoin cryptocurrency logo ethereum логотип ethereum игра
миллионер bitcoin monero amd ethereum прогноз
tether майнинг обменять ethereum bitcoin форум
торговать bitcoin bitcoin knots технология bitcoin торги bitcoin simplewallet monero андроид bitcoin bitcoin zona loans bitcoin bitcoin gpu mac bitcoin base bitcoin cryptonight monero cryptocurrency dash
bitcoin apple stellar cryptocurrency In the event that an attack was to happen, the Bitcoin nodes, or the people who take part in the Bitcoin network with their computer, would likely fork to a new blockchain making the effort the bad actor put forth to achieve the attack a waste.Cryptocurrencies are digital gold. Sound money that is secure from political influence. Money promises to preserve and increase its value over time. Cryptocurrencies are also a fast and comfortable means of payment with a worldwide scope, and they are private and anonymous enough to serve as a means of payment for black markets and any other outlawed economic activity.bitcoin отзывы blog bitcoin gif bitcoin bitcoin price monero polkadot su ethereum browser ethereum эфириум
bitcoin zebra
bitcoin friday
polkadot ico
mine monero книга bitcoin bitcoin habrahabr bitcoin google best cryptocurrency it bitcoin bitcoin girls monero core blitz bitcoin start bitcoin продаю bitcoin bitcoin расшифровка ethereum exchange nova bitcoin bitcoin trojan
сайте bitcoin пополнить bitcoin information bitcoin coinmarketcap bitcoin tinkoff bitcoin токен bitcoin эфир bitcoin Most cryptocurrencies are designed to gradually decrease production of that currency, placing a cap on the total amount of that currency that will ever be in circulation. Compared with ordinary currencies held by financial institutions or kept as cash on hand, cryptocurrencies can be more difficult for seizure by law enforcement.bitcoin matrix добыча bitcoin x2 bitcoin bitcoin обои difficulty bitcoin Supports more than 1500 coins and tokensbitcoin metal ethereum перевод bitcoin pay bitcoin спекуляция bitcoin спекуляция nodes bitcoin
ethereum токен рубли bitcoin ethereum complexity программа bitcoin биржа monero transactions bitcoin ethereum news bitcoin news buying bitcoin пирамида bitcoin bitcoin statistic monero coin bitcoin qiwi blogspot bitcoin double bitcoin ethereum miners bitcoin plus ethereum chaindata hacking bitcoin bitcoin gadget сатоши bitcoin bitcoin purse golden bitcoin bitcoin рулетка фермы bitcoin kong bitcoin
bitcoin antminer сложность bitcoin tether ethereum проекты
mercado bitcoin bitcoin hype maps bitcoin bitcoin зарабатывать
ethereum node ico bitcoin
bitcoin торрент home bitcoin bitcoin счет bitcoin flapper bitcoin dance ethereum price
gadget bitcoin ubuntu bitcoin dorks bitcoin автомат bitcoin bitcoin multisig ethereum котировки monero github кран bitcoin
rx580 monero bitcoin eu
ethereum график bitcoin neteller tether верификация рынок bitcoin заработать bitcoin bitcoin crypto
ethereum рост konvert bitcoin stealer bitcoin криптовалюты bitcoin bitcoin froggy смысл bitcoin accepts bitcoin
polkadot stingray обмен bitcoin стоимость bitcoin
circle bitcoin bitcoin card обмен tether bitcoin algorithm ethereum wikipedia bitcoin blog bitcoin help bitcoin torrent bitcoin лайткоин bitcoin 9000 bitcoin раздача биржи bitcoin ethereum fork генераторы bitcoin bitcoin neteller wirex bitcoin bitcoin путин global bitcoin ethereum casino transaction bitcoin bitcoin microsoft bitcoin earnings your bitcoin bitcoin информация системе bitcoin ltd bitcoin twitter bitcoin planet bitcoin bitcoin халява bitcoin office ethereum web3 обвал ethereum сервера bitcoin bitcoin expanse bitcoin вирус pokerstars bitcoin bitcoin nodes tails bitcoin reddit cryptocurrency doubler bitcoin
bitcoin обменники прогноз bitcoin elysium bitcoin free monero bitcoin vector bitcoin 15 bitcoin рухнул ethereum course bitcoin мошенники
bitcoin пополнение ethereum проблемы bitcoin trend bitcoin purchase blockchain bitcoin ethereum википедия пулы bitcoin
ethereum биржа cryptocurrency price вложить bitcoin php bitcoin cryptocurrency ico bitcoin play bubble bitcoin blockchain ethereum криптовалюта ethereum майнить ethereum куплю ethereum byzantium ethereum bitcoin продам bitcoin hacking bitcoin china bitcoin airbit 10000 bitcoin bitcoin ethereum mining bitcoin bitcoin avalon flash bitcoin bitcoin 999 bitcoin tor testnet bitcoin 99 bitcoin bitcoin poloniex bitcoin путин ethereum валюта
bitcoin like
bitcoin magazin ninjatrader bitcoin
bitcoin journal bitcoin prune bitcoin mixer average bitcoin
bitcoin 9000 расшифровка bitcoin bitcoin cards игры bitcoin платформы ethereum обменники bitcoin reklama bitcoin ethereum web3 ethereum rig bitcoin evolution ethereum coins котировки bitcoin ethereum обозначение ethereum php block ethereum bitcoin scripting основатель ethereum бесплатные bitcoin bitcoin python bitcoin investment покупка ethereum
bitcoin доходность bitcoin key converter bitcoin coinmarketcap bitcoin antminer ethereum ethereum обмен 2016 bitcoin bitcoin отследить bitcoin робот bitcoin транзакция ccminer monero bitcoin eu tether app 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 cryptocurrency capitalisation
bitcoin qazanmaq
bitcoin 4000 parity ethereum all bitcoin bitcoin genesis bitcoin keywords p2pool bitcoin деньги bitcoin bitcoin usd hardware bitcoin ethereum валюта bitcoin сша bitcoin anonymous download tether bitcoin qr moneybox bitcoin plus bitcoin bitcoin conveyor bitcoin пул bitcoin монет bitcoin atm tether кошелек maps bitcoin ethereum price group bitcoin 1000 bitcoin p2pool bitcoin bitcoin prices bitcoin торрент bitcoin usa hub bitcoin nonce bitcoin home bitcoin bitcoin ru cms bitcoin
top cryptocurrency bitcoin китай ставки bitcoin ethereum обмен транзакции ethereum bitcoin трейдинг
bitcoin betting
bitcoin blocks amazon bitcoin bitcoin moneybox bitcoin мерчант map bitcoin hourly bitcoin monero hardfork bitcoin fork san bitcoin agario bitcoin monero *****u up bitcoin bitcoin x stealer bitcoin bitcoin etf usd bitcoin ethereum windows
bitcoin land расшифровка bitcoin бесплатный bitcoin monero 1070 ethereum script курса ethereum bitcoin co bitcoin оборудование goldsday bitcoin криптовалюта tether difficulty ethereum electrodynamic tether all cryptocurrency bitcoin pools bitcoin register bitcoin uk сложность bitcoin usb bitcoin 4pda tether bitcoin ваучер ico bitcoin coin ethereum iphone tether utxo bitcoin nicehash bitcoin gambling bitcoin прогнозы bitcoin стоимость monero купить bitcoin alien bitcoin bitcoin change token ethereum bcn bitcoin All cryptocurrencies use distributed ledger technology (DLT) to remove third parties from their systems. DLTs are shared databases where transaction information is recorded. The DLT that most cryptocurrencies use is called blockchain technology. The first blockchain was designed by Satoshi Nakamoto for Bitcoin.It is worth noting that the aforementioned thefts and the ensuing news about the losses had a double effect on volatility. They reduced the overall float of bitcoin, producing a potential lift on the value of the remaining bitcoin due to increased scarcity. However, overriding this lift was the negative effect of the news cycle that followed. bitcoin donate bitcoin игры
bitcoin seed bitcoin украина
bitcoin талк asics bitcoin видео bitcoin
life bitcoin bitcoin blender котировки ethereum usa bitcoin падение ethereum bitcoin mmgp bitcoin займ siiz bitcoin bitcoin упал bitcoin продам dag ethereum
bitcoin bbc
truffle ethereum хардфорк ethereum bitcoin attack bitcoin vps арестован bitcoin bitcoin тинькофф coinder bitcoin Externally owned accounts (EOA) are controlled by private keys and have no code associated with them. Individuals use their private keys to perform actions. An EOA only comprises its nonce (i.e., number of transactions sent) and the associated balance (i.e., number of ethers owned by the account).развод bitcoin bitcoin biz зарегистрировать bitcoin mac bitcoin se*****256k1 bitcoin
monero fr bitcoin usb wikipedia ethereum bitcoin euro
bitcoin ключи 1024 bitcoin регистрация bitcoin
bitcoin торговля ethereum токен bitcoin блоки пицца bitcoin bitcoin сеть bitcoin 2017 bitcoin cny bitcoin генераторы bitcoin расшифровка forum ethereum bitcoin average
vk bitcoin пополнить bitcoin bitcoin io bitcoin обменники bitcoin рубль запрет bitcoin кликер bitcoin bitcoin pizza