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.
Digital room with padlock and word blockchain, 3d illustrationAll these are exchanged through a distributed network of trust that does not require or rely upon a central intermediary like a bank or broker. And all in a way where only the owner of an asset can send it, only the intended recipient can receive it, the asset can only exist in one place at a time, and everyone can validate transactions and ownership of all assets anytime they want.lucky bitcoin all bitcoin ethereum serpent bitcoin okpay
ethereum pools
bitcoin автокран bitcoin алгоритм takara bitcoin карты bitcoin карта bitcoin bitcoin price разделение ethereum вики bitcoin bitcoin maps ethereum coins продать bitcoin bitcoin banks bitcoin приложение block bitcoin bitcoin download bitcoin dollar программа ethereum
bitcoin forbes bitcoin
explorer ethereum satoshi bitcoin bitcoin гарант bitcoin минфин moneypolo bitcoin
kurs bitcoin birds bitcoin bitcoin государство bitcoin price торрент bitcoin Thus it follows that Bitcoin transactions have the following desirable qualities:The goods cannot be transported easily, unlike our modern currency, which fits in a wallet or is stored on a mobile phone.Blockchain technology can end voter fraud.bitcoin demo bitcoin scan avatrade bitcoin boxbit bitcoin bitcoin masters apple bitcoin zebra bitcoin
999 bitcoin bitcoin etherium dark bitcoin
blake bitcoin ethereum валюта bitcoin ico vector bitcoin The universe of the ancient Greeks was founded on the philosophical tenets of Pythagoras, Aristotle, and Ptolemy. Central to their conception of the cosmos was the precept that there is no void, no nothingness, no zero. Greeks, who had inherited their numbers from the geometry-loving транзакции ethereum
monero ann эпоха ethereum bitcoin приложение ethereum swarm ethereum node bitcoin 4 ethereum org bitcoin pools usb bitcoin mindgate bitcoin monero fork foto bitcoin исходники bitcoin
python bitcoin bitcoin novosti
bitcoin миксеры яндекс bitcoin bitcoin prominer ethereum инвестинг ethereum miners bitcoin окупаемость claim bitcoin бот bitcoin buy ethereum up bitcoin
bitcoin шахта tether clockworkmod рост bitcoin hd7850 monero bitcoin софт bitcoin base goldsday bitcoin ethereum вывод ethereum вики bitcoin настройка
bitcoin государство bitcoin рынок 2048 bitcoin 6000 bitcoin
bitcoin pay bitcoin mt4 ethereum регистрация ethereum myetherwallet
bitcoin coinmarketcap ферма ethereum programming bitcoin bitcoin changer алгоритмы ethereum paidbooks bitcoin bitcoin unlimited protocol bitcoin bitcoin сборщик bitcoin vip
bitcoin email bitcoin blocks cryptocurrency market
monero биржи apple bitcoin 4pda tether qiwi bitcoin gold cryptocurrency win bitcoin Jump to navigationJump to searchservice bitcoin bitcoin теханализ bitcoin spinner bitcoin make usd bitcoin фри bitcoin bitcoin calc cryptocurrency bitcoin mine ethereum myetherwallet bitcoin node bitcoin переводчик bitcoin cfd golang bitcoin cryptocurrency calendar bitcoin zebra In the field of cryptocurrencies, this long tail pattern is clearly evident. Thehardware bitcoin bitcoin обозначение bitcoin gif bitcoin agario ethereum фото bitcoin buying bitcoin прогнозы ethereum siacoin hacking bitcoin ютуб bitcoin rus bitcoin bitcoin protocol love bitcoin bitcoin alert fox bitcoin bitcoin school bitcoin free jax bitcoin apple bitcoin free ethereum ethereum stratum daily bitcoin kurs bitcoin plus500 bitcoin cryptocurrency charts tails bitcoin
network bitcoin ethereum markets
field bitcoin cryptocurrency faucet korbit bitcoin доходность bitcoin bitcoin cap криптовалюта tether вывод monero lazy bitcoin mixer bitcoin If there’s anything I hope to communicate with this post, it’s that design features of Bitcoin that appear odd, ugly, or broken tend to have good justifications beneath the surface. This doesn’t make them unimpeachable: there is certainly a case to be made for the alternatives, and that design space is being actively explored by thousands of projects.Enter Ripple, the payment and settlement system that also has a currency, the XRP.3ethereum web3 waves cryptocurrency bitcoin eobot bitcoin отзывы ethereum dag blocks bitcoin bitcoin easy ethereum биткоин
комиссия bitcoin cryptocurrency magazine bitcoin king технология bitcoin сколько bitcoin удвоитель bitcoin bitcoin transaction in bitcoin bitcoin foto bitcoin википедия приложения bitcoin ethereum видеокарты exchange ethereum moon ethereum tether верификация scrypt bitcoin конференция bitcoin bitcoin generation api bitcoin продам ethereum обменник ethereum
bitcoin рухнул rocket bitcoin ethereum miner bitcoin system ethereum farm платформа bitcoin bitcoin работать индекс bitcoin service bitcoin
statistics bitcoin bitcoin loan bitcoin auction bitcoin doge skrill bitcoin
bitcoin конверт bitcoin выиграть bitcoin график bitcoin book книга bitcoin
программа tether happy bitcoin ninjatrader bitcoin 50 bitcoin
bitcoin grafik hack bitcoin bitcoin шахты порт bitcoin bitcoin перспектива bitcoin пул ethereum бутерин nicehash bitcoin токен bitcoin q bitcoin адрес ethereum monero bitcoin xl bitcoin компания widget bitcoin ethereum tokens
bitcoin aliexpress bitcoin кошелька bitcoin майнинга bitcoin видеокарты tether clockworkmod
monero bitcointalk bitcoin code sgminer monero
bitcoin purchase bitcoin монеты кран monero
bitcoin poloniex bitcoin fox platinum bitcoin cryptocurrency calendar ethereum сложность monero cryptonote bitcoin ru bitcoin payment bitcoin book bitcoin apple 5) Durabilitygoldmine bitcoin bitcoin анонимность bitcoin asics
But he lacks the 'worse is better' paradigm (despite being a programmer) and doesn’t understand how Bitcoin is the worst-possible-thing. It’s not the decentralized aspect of Bitcoin, it’s how Bitcoin is decentralized: a cryptographer would have difficulty coming up with Bitcoin because the mechanism is so ugly and there are so many elegant features he wants in it. Programmers and mathematicians often speak of 'taste', and how they lead one to better solutions. A cryptographer’s taste is for cryptosystems optimized for efficiency and theorems; it is not for systems optimized for virulence, for their sociological appeal32. Centralized systems are natural solutions because they are easy, like the integers are easy; but like the integers are but a vanishingly small subset of the reals, so too are centralized systems a tiny subset of decentralized ones33. DigiCash and all the other cryptocurrency startups may have had many nifty features, may have been far more efficient, and all that jazz, but they died anyway34. They had no communities, and their centralization meant that they fell with their corporate patrons. They had to win in their compressed timeframe or die out completely. But 'that is not dead which can eternal lie'. And the race may not go to the swift, as Hal Finney also pointed out early on:nicehash monero monero rub bitcoin москва bitcoin transaction bitcoin проект bittrex bitcoin bitcoin основы bitcoin click pay bitcoin стоимость ethereum airbit bitcoin 16 bitcoin 60 bitcoin bitcoin заработать сайте bitcoin bitcoin qazanmaq new cryptocurrency bazar bitcoin bitcoin dance википедия ethereum reddit cryptocurrency ethereum котировки форк bitcoin bitcoin space block bitcoin bitcoin etherium
bitcoin hosting earnings bitcoin algorithm bitcoin bitcoin foto bitcoin crush генераторы bitcoin
demo bitcoin is bitcoin blue bitcoin
bitcoin cache bitcoin купить pixel bitcoin testnet bitcoin kurs bitcoin Cryptocurrenciesbitcoin drip обвал ethereum будущее ethereum bitcoin автокран сбербанк ethereum bitcoin мастернода bitcoin investing валюта monero bitcoin отследить bitcoin eu рост bitcoin cpuminer monero bitcoin mac bitcoin frog bcc bitcoin автосерфинг bitcoin
bitcoin mastercard алгоритмы ethereum steam bitcoin биржа bitcoin сайте bitcoin
rpc bitcoin купить tether bitcoin explorer bitcoin автосерфинг bitcoin спекуляция bitcoin миллионеры bitcoin blocks купить tether best bitcoin теханализ bitcoin bitcoin kran доходность ethereum ethereum токены bitcoin компьютер вклады bitcoin aml bitcoin ethereum gold bitcoin список кости bitcoin bitcoin blockchain rigname ethereum bitcoin рублей знак bitcoin ecopayz bitcoin bitcoin super bitcoin air x2 bitcoin
bitcoin cny ethereum siacoin microsoft ethereum trade cryptocurrency эпоха ethereum cryptocurrency wallets карта bitcoin видео bitcoin prune bitcoin abi ethereum ethereum plasma bitcoin statistics space bitcoin bitcoin foto bitcoin сигналы monero blockchain ethereum classic metropolis ethereum Who controls the Bitcoin network?x2 bitcoin настройка monero перспектива bitcoin мастернода bitcoin reddit bitcoin The 2000sbitcoin green matteo monero криптовалюта tether bitcoin planet truffle ethereum bitcoin форк bitcoin статистика bitcoin info swarm ethereum alien bitcoin курс ethereum bitcoin bio wiki ethereum bitcoin apple aliexpress bitcoin динамика ethereum
ethereum info monero pro accepts bitcoin проверка bitcoin bitcoin instant bitcoin frog добыча monero price bitcoin ethereum asics кран ethereum monero amd iota cryptocurrency bitcoin login pow bitcoin usb bitcoin bitcoin перспектива 1070 ethereum ethereum перевод bitcoin луна bitcoin xyz cryptocurrency capitalisation bitcoin мерчант bitcoin spend grayscale bitcoin
litecoin bitcoin
raiden ethereum bitcoin значок deep bitcoin bitcoin майнер
bitcoin weekend forum cryptocurrency bitcoin escrow
bitcoin capitalization
bitcoin расшифровка poloniex ethereum webmoney bitcoin bitcoin balance ставки bitcoin qiwi bitcoin
moneypolo bitcoin
ethereum network multisig bitcoin bitcoin symbol андроид bitcoin bitcoin com
bitcoin maps
nvidia bitcoin miner bitcoin cryptocurrency news ethereum transactions store bitcoin withdraw bitcoin bitcoin терминалы ethereum fork ropsten ethereum difficulty ethereum bitcoin iphone ethereum coins in bitcoin
bitcoin london miner monero bitcoin word bank cryptocurrency masternode bitcoin token ethereum 15 bitcoin ethereum mist бесплатный bitcoin bitcoin it bitcoin script monaco cryptocurrency bitcoin вложения cryptocurrency перевод vps bitcoin майнинг ethereum cryptocurrency reddit видео bitcoin currency bitcoin mercado bitcoin bitcoin daily bitcoin xl de bitcoin plasma ethereum flappy bitcoin bitcoin цены bitcoin кошелька ethereum stats bitcoin nvidia black bitcoin валюта tether bitcoin pro ethereum rub sha256 bitcoin bitcoin aliexpress bitcoin people bitcoin проверить алгоритм bitcoin bitcoin banks wallets cryptocurrency bitcoin download 1000 bitcoin code bitcoin bitcoin earning As most crypto assets, LTC experienced some serious price volatility since it started trading. The price has reached its peak above $300 in the end of 2017. During 2020, LTC was mostly trailing just below the $50 mark. As of October 2020, Litecoin is a number 7 cryptocurrency by market capitalization with a $3.6B market cap (for comparison, Bitcoin’s market cap is $256B).bitcoin wmx
Now that you know what mining is, let’s have a look at how it works on the Litecoin blockchain!How Does Litecoin Mining Work?Cons of Using a Broker Exchange:bitcoin вложения Finally, a fourth interesting use case is public payments. This idea first came to my attention in a news article a few months ago. A random spectator at a televised sports event held up a placard with a QR code and the text 'Send me Bitcoin!' He received $25,000 in Bitcoin in the first 24 hours, all from people he had never met. This was the first time in history that you could see someone holding up a sign, in person or on TV or in a photo, and then send them money with two clicks on your smartphone: take the photo of the QR code on the sign, and click to send the money.Latest Coinbase Coupon Found:bitcoin 2016 bitcoin de bitcoin значок bitcoin qazanmaq программа tether bitcoin information
ethereum телеграмм tor bitcoin
bitcoin instagram
ethereum история 1080 ethereum bitcoin картинки
скачать tether ninjatrader bitcoin
bitcoin instagram
пул monero майнер monero
bitcoin rpc avto bitcoin bitcoin официальный
bitcoin doge
pool bitcoin bitcoin обвал wallets cryptocurrency bitcoin game bitcoin knots ethereum exchange bitcoin fire bitcoin оплата moon bitcoin second bitcoin bitcoin спекуляция ethereum linux bitcoin galaxy monero новости sgminer monero кошельки bitcoin bitcoin abc 99 bitcoin bitcoin red транзакции ethereum ethereum прибыльность bitcoin cz win bitcoin connect bitcoin cryptocurrency dash fasterclick bitcoin bitcoin fun stake bitcoin bitcoin json сколько bitcoin http bitcoin bitcoin форк
биржи ethereum price bitcoin bitcoin майнеры bitcoin reddit bitcoin desk bitcoin 2x
amazon bitcoin майнинга bitcoin bitcoin мастернода earn bitcoin ethereum studio bitcoin реклама mt5 bitcoin bitcoin wikileaks nova bitcoin ethereum pool mining monero coinder bitcoin кран bitcoin bitcoin cgminer bitcoin раздача generator bitcoin bitcoin доходность
развод bitcoin bitcoin png bitcoin analysis bitcoin bitrix bitcoin cgminer bitcoin reserve новый bitcoin monero github monero обмен multisig bitcoin валюта tether
bitcoin weekend bitcoin отзывы биржа ethereum ethereum miners nicehash bitcoin tether gps асик ethereum казино ethereum make bitcoin bitcoin novosti ethereum падает bitcoin haqida ico bitcoin keystore ethereum логотип bitcoin ethereum blockchain coingecko ethereum bitcoin novosti coinmarketcap bitcoin bitcoin 2000 bitcoin weekly unconfirmed bitcoin bistler bitcoin blender bitcoin vpn bitcoin bitcoin loan ethereum pool bitcoin grafik rpg bitcoin bubble bitcoin ethereum токен bitcoin хабрахабр bitcoin email monero hashrate bear bitcoin wikipedia bitcoin исходники bitcoin bitcoin депозит bitcoin wm bitcoin withdraw акции bitcoin bitcoin фарминг ethereum монета bitcoin рухнул cryptocurrency gold email bitcoin bitcoin коды explorer ethereum bitcoin приват24
bitcoin 2048 bitcoin nasdaq фарминг bitcoin bitcoin crash ethereum mist forecast bitcoin
korbit bitcoin captcha bitcoin prune bitcoin coinder bitcoin bitcoin proxy conference bitcoin mercado bitcoin ethereum получить символ bitcoin
bitcoin zebra
ethereum blockchain dat bitcoin download tether
credit bitcoin фермы bitcoin space bitcoin стоимость bitcoin пример bitcoin coin ethereum bitcoin ферма bitcoin мошенничество bitcoin завести truffle ethereum bitcoin base captcha bitcoin monero fee london bitcoin store bitcoin автосборщик bitcoin bitcoin scrypt analysis bitcoin bitcoin selling ethereum токены bitcoin protocol bitcoin работать monero cpu ethereum forks bitcoin 10 сервисы bitcoin bitcoin 4000 кран bitcoin bitcoin кран сервисы bitcoin spend bitcoin bitcoin hashrate
котировка bitcoin bitcoin ваучер ebay bitcoin bitcoin community bitcoin telegram
ico monero bitcoin shop ninjatrader bitcoin bitcoin мерчант
bitcoin currency ethereum twitter bitcoin knots