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.
A lot of altcoins are using staking. Staking is often marketed as a much more efficient alternative. Unfortunately staking has the potential to not be much different than politics. A good example is that it's easy for a big actor to take over the network by simply buying enough coins. This actually happened in 2020 when TRON's Justin Sun took over the Steem 'forum' network and then did some things that made some people unhappy.Bitcoin (₿) is a cryptocurrency invented in 2008 by an unknown person or group of people using the name Satoshi Nakamoto. The currency began use in 2009 when its implementation was released as open-source software.:ch. 1Cypherpunks believe that privacy is a fundamental human right, including privacy from governments. They understand that the weakening of a system’s security for any reason, including access by 'trusted authorities', makes the system insecure for everyone who uses it.bitcoin purse bitcoin обозреватель bitcoin bcc 600 bitcoin
bitcoin script
Explore Ethereum’s blockchainbitcoin talk
moto bitcoin
tether майнить ubuntu ethereum
monero обменять bitcoin statistics
bitcoin инструкция bitcoin покер bitcoin лохотрон bitcoin кранов bitcoin рейтинг оплата bitcoin eobot bitcoin bitcoin xbt captcha bitcoin kong bitcoin ethereum gas bitcoin gold bitcoin 999 bitcoin server выводить bitcoin bitcoin map bitcoin grant bitcoin rotator plasma ethereum bitcoin free bitcoin core bitcoin отзывы mine ethereum prune bitcoin ethereum клиент pay bitcoin ethereum контракты bitcoin php
testnet bitcoin bitcoin qazanmaq coingecko bitcoin qr bitcoin bitcoin авито fpga bitcoin
программа bitcoin bitcoin отследить bitcoin лопнет bitcoin значок продам bitcoin заработка bitcoin grayscale bitcoin site bitcoin платформ ethereum ethereum casino lamborghini bitcoin bitcoin mac инвестирование bitcoin bitcoin email bitcoin iphone bitcoin cz ethereum chart
chaindata ethereum ethereum contract carding bitcoin ethereum info bitcoin database bitcoin asic new cryptocurrency разработчик bitcoin ethereum investing microsoft bitcoin
bitcoin foto
freeman bitcoin cryptocurrency analytics monero курс bitcoin проблемы ethereum course bitcoin сегодня bitcoin java bitcoin конвектор bitcoin войти портал bitcoin бесплатно bitcoin системе bitcoin
зарегистрировать bitcoin bitcoin робот 1 ethereum бесплатный bitcoin bitcoin doge bitcoin timer monero калькулятор генераторы bitcoin bitcoin site bitcoin ocean bitcoin eu tether 2 bitcoin телефон bitcoin statistics In Bitcoin, transactions contain small amounts of data, and its blockchain grows slowly. This ensures the network’s ability to scale up its user base without requiring a drastic increase in hardware resources from 'entrepreneurial joiners' over time. As a peer to peer network, if Bitcoin generated data at a high rate, then requirements would increase for individual users, reducing hardware draw. This is bad for stability, and thus undermines the network’s ability to serve as a platform. Eventually as the system gained users, it would be usable by fewer and fewer people, making it unsuccessful by worse-is-better standards.bitcoin сша алгоритм ethereum
zcash bitcoin bitcoin drip faucets bitcoin inside bitcoin bitcoin блокчейн bitcoin телефон ethereum logo bitcoin today accepts bitcoin bitcoin wm r bitcoin bitcoin обменник bitcoin nvidia bitcoin conf кредит bitcoin bitcoin escrow flex bitcoin bitcoin account checker bitcoin electrum bitcoin bitcoin смесители bitcoin создать
ethereum pools monero algorithm day bitcoin cryptocurrency wallet bitcoin stellar bitcoin упал bitcoin yandex часы bitcoin
bitcoin начало pay bitcoin wikileaks bitcoin bitcoin платформа ethereum install carding bitcoin
робот bitcoin аккаунт bitcoin ubuntu ethereum monero btc buy tether bitcoin anonymous ethereum contract script bitcoin ethereum chart calculator bitcoin bitcoin перспектива продать ethereum putin bitcoin bitcoin goldmine bitcoin окупаемость trader bitcoin Let me explain this further:In 2014, several light-hearted songs celebrating bitcoin such as the 'Ode to Satoshi' have been released.bitcoin ios anonymous bitcoinethereum explorer статистика ethereum магазин bitcoin bitcoin dollar
boom bitcoin tor bitcoin bitcoin миллионеры monero hardware виталик ethereum monero обменник blockchain bitcoin кран ethereum New blocks will only be added to the block chain if their hash is at least as challenging as a difficulty value expected by the consensus protocol. Every 2,016 blocks, the network uses timestamps stored in each block header to calculate the number of seconds elapsed between generation of the first and last of those last 2,016 blocks. The ideal value is 1,209,600 seconds (two weeks).bitcoin forbes machine bitcoin
ethereum claymore bitcoin skrill As mentioned already, the Bitcoin protocol issues the Bitcoin 'token' as a reward to participants in the network. This creates the currency which is used in this 'Peer-to-Peer Electronic Cash' system.bitcoin protocol steam bitcoin bitcoin analysis bitcoin коды tcc bitcoin remix ethereum goldsday bitcoin bitcoin создатель
50 bitcoin bitcoin fasttech отзыв bitcoin bitcoin лохотрон mine monero bitcoin express регистрация bitcoin bitcoin мошенники ethereum news fenix bitcoin cryptocurrency charts monero windows порт bitcoin The 'New Jersey style' of hacking was originated by Unix engineers at AT%trump2%T in suburban New Jersey. AT%trump2%T had lost an antitrust settlement in 1956 which precluded it from entering the computer business; thus it was free to circulate the computer operating system it had built, called Unix, to other private companies and research institutions throughout the 1970s. The source code was included, and these institutions regularly modified it to run on their particular minicomputers. Hacking Unix became a cultural phenomenon within R%trump2%D departments around the US.logo bitcoin контракты ethereum bitcoin msigna bitcoin команды polkadot блог bitcoin google bitcoin xbt bittrex bitcoin ethereum course обмен tether bitcoin joker polkadot bitcoin компания
bitcoin journal доходность ethereum сервер bitcoin bitcoin кредиты paidbooks bitcoin json bitcoin ethereum кошелька tether перевод bitcoin land ethereum twitter bitcoin fork bitcoin it системе bitcoin dwarfpool monero clockworkmod tether bitcoin миллионер bitcoin instant
ethereum btc casper ethereum
bitcoin рублей bitcoin coingecko eth ethereum bitcoin cnbc инструмент bitcoin
bitcoin electrum ethereum crane bitcoin создатель
nodes bitcoin дешевеет bitcoin polkadot su monero xeon bitcoin 2000 cryptocurrency dash Controlling and monitoring the projectфорумы bitcoin nem cryptocurrency bitcoin регистрации bitcoin вебмани bitcoin фирмы ethereum swarm nanopool ethereum 2016 bitcoin стоимость bitcoin bitcoin block лото bitcoin кредит bitcoin bitcoin double разработчик bitcoin фермы bitcoin bitcoin ютуб
адрес bitcoin обновление ethereum ethereum zcash bitcoin упал bitcoin mainer mac bitcoin bitcoin ваучер bitcoin favicon magic bitcoin arbitrage cryptocurrency вебмани bitcoin live bitcoin bitcoin скрипт
bitcoin trojan card bitcoin Mining With an Nvidia GPUbitcoin greenaddress cryptocurrency mining win bitcoin биржа bitcoin ethereum биткоин
добыча ethereum bitcoin alert ethereum видеокарты ethereum википедия mini bitcoin трейдинг bitcoin yandex bitcoin nanopool ethereum bitcoin alien форк bitcoin monero купить cap bitcoin bitcoin ethereum grayscale bitcoin bitcoin прогноз world bitcoin
moneybox bitcoin
monero hardware s bitcoin обменники ethereum polkadot stingray bitcoin multiply bitcoin эмиссия bitcoin nedir
пул bitcoin
bitcoin apk ethereum price calculator ethereum minergate bitcoin депозит bitcoin
rbc bitcoin bitcoin 4096 транзакции ethereum карты bitcoin flappy bitcoin bitcoin суть cryptocurrency calendar wikileaks bitcoin tether clockworkmod mainer bitcoin проект ethereum apk tether кошель bitcoin bitcoin lion bitcoin zone
bitcoin вконтакте bitcoin выиграть protocol bitcoin cfd bitcoin генераторы bitcoin ethereum dag Processing paymentsmikrotik bitcoin bitcoin прогноз Digital signatures allow an individual to prove that they own a piece of encrypted information without revealing that information. With cryptocurrencies, this technology is used to sign monetary transactions. It proves to the network that an account owner has agreed to the transaction.mainer bitcoin стратегия bitcoin bubble bitcoin mikrotik bitcoin bitcoin metatrader бесплатные bitcoin аналоги bitcoin
bitcoin ne pool bitcoin будущее ethereum bitcoin часы bitcoin сбор lamborghini bitcoin майнеры bitcoin bitcoin capitalization bitcoin cms
динамика ethereum polkadot store сети bitcoin динамика ethereum капитализация ethereum explorer ethereum bitcoin market game bitcoin
ethereum проекты bitcoin history Ethereum is home to thousands of tokens – some more useful and valuable than others. Developers are constantly building new tokens that unlock new possibilities and open new markets.bitcoin 100 bitcoin x2 bitcoin автосборщик bitcoin банкнота платформы ethereum
bitcoin перевод
bitcoin investment gift bitcoin bitcoin таблица
poloniex ethereum bitcoin payeer total cryptocurrency vps bitcoin bitcoin алгоритм monero новости
bitcoin darkcoin bitcoin майнинг
bitcoin php hosting bitcoin торговать bitcoin game bitcoin
bitcoin bonus bitcoin wsj
bitcoin usd koshelek bitcoin bitcoin кран
stealer bitcoin ethereum chart bitcoin алгоритм Shareподтверждение bitcoin lurkmore bitcoin collector bitcoin
short bitcoin algorithm bitcoin x2 bitcoin ethereum сайт расчет bitcoin bitcoin таблица
ethereum faucet bitcoin видео
аналоги bitcoin bitcoin network fasterclick bitcoin bitcoin laundering ethereum txid платформу ethereum ethereum обменять
ethereum coin ethereum miner хайпы bitcoin розыгрыш bitcoin рубли bitcoin txid ethereum ethereum купить bitcoin ann scrypt bitcoin bitcoin комиссия cryptocurrency dash bitcoin daily
bitcoin delphi bitcoin valet cardano cryptocurrency bitcoin иконка пулы bitcoin bitcoin swiss bitcoin trading ethereum bitcoin
bitcoin traffic bitcoin capital bitcoin работа rigname ethereum
bitcoin mt4 rinkeby ethereum maps bitcoin
korbit bitcoin bitcoin кошелька ethereum claymore bitcoin count bitcoin phoenix
byzantium ethereum терминалы bitcoin de bitcoin gambling bitcoin frontier ethereum ethereum dag bitcoin eu ethereum script monero usd 5 bitcoin bitcoin markets cryptocurrency dash ethereum монета bitcoin fpga pos ethereum ethereum block
bitcoin оборот bitcoin пополнить 600 bitcoin currency bitcoin usb bitcoin ethereum install ethereum продать store bitcoin
bitcoin заработок bitcoin statistics китай bitcoin транзакции bitcoin bitcoin capitalization free monero bitcoin payment bitcoin nachrichten bitcoin обмен криптовалюта monero бесплатно bitcoin cryptocurrency это truffle ethereum topfan bitcoin bitcoin fake
bitcoin краны ethereum com bitcoin reindex analysis bitcoin cryptocurrency calendar обмен tether multiply bitcoin
bitcoin депозит
ethereum asic metal bitcoin bitcoin fasttech
bitcoin checker ethereum получить iso bitcoin neo bitcoin spots cryptocurrency polkadot store bitcoin generator обменять ethereum
super bitcoin
china bitcoin цены bitcoin bitcoin mac bitcoin официальный
bitcoin goldman advcash bitcoin lamborghini bitcoin
bitcoin бесплатный 50 bitcoin ethereum android
компиляция bitcoin ethereum windows лото bitcoin bitcoin ledger bitcoin обои buy tether bitcoin сокращение x bitcoin
tether пополнение bitcoin рубли биржа ethereum
value bitcoin mining bitcoin bitcoin cards faucet cryptocurrency bitcoin ферма love bitcoin ethereum news россия bitcoin книга bitcoin bitcoin red bitcoin tm bitcoin картинки bitcoin символ bitcoin china проекта ethereum
bitcoin python bitcoin usd зарабатывать bitcoin ethereum api nem cryptocurrency bitcoin etherium asics bitcoin bitcoin блок понятие bitcoin purchase bitcoin форки bitcoin bitcoin moneypolo bitcoin комментарии сложность monero buying bitcoin создать bitcoin bitcoin motherboard bitcoin значок
ethereum биткоин bitcoin masters ethereum токены pow bitcoin joker bitcoin bitcoin комиссия bitcoin деньги bitcoin символ unconfirmed bitcoin lealana bitcoin bitcoin сервер polkadot stingray
bitcoin wiki bitcoin ne bitcoin 2017 maining bitcoin обналичить bitcoin раздача bitcoin In general, there are a number of currencies in existence that are not official government-backed currencies. A currency is, after all, nothing more than a convenient unit of account. While national laws may vary from country to country, and you should certainly check the laws of your jurisdiction, in general trading in any commodity, including digital currency like Bitcoin, BerkShares, game currencies like WoW gold, or Linden dollars, is not illegal.In October 2013, the FBI seized roughly 26,000 BTC from website Silk Road during the arrest of alleged owner Ross William Ulbricht. Two companies, Robocoin and Bitcoiniacs launched the world's first bitcoin ATM on 29 October 2013 in Vancouver, BC, Canada, allowing clients to sell or purchase bitcoin currency at a downtown coffee shop. Chinese internet giant Baidu had allowed clients of website security services to pay with bitcoins.bitcoin antminer future bitcoin торрент bitcoin buy ethereum The Bitcoin Effecthacking bitcoin cryptocurrency market транзакции bitcoin ethereum 1070 pplns monero bitcoin signals bitcoin calc
bitcoin carding отследить bitcoin fx bitcoin ethereum перспективы bitcoin инструкция micro bitcoin tp tether сложность monero
ethereum dao bitcoin 2 machine bitcoin bitcoin ads bitcoin php
bitcoin maps bitcoin sec cryptocurrency nem 0 bitcoin When you buy bitcoin on an exchange, the price of one bitcoin is usually quoted against the US dollar (USD). In other words, you are selling USD in order to buy bitcoin. If the price of bitcoin rises you will be able to sell for a profit, because bitcoin is now worth more USD than when you bought it. If the price falls and you decide to sell, then you would make a loss.monero кран принимаем 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 покупка 5.0статистика ethereum 50 bitcoin купить monero bitcoin шахты bitcoin fees blake bitcoin bloomberg bitcoin time bitcoin monero hardware bitcoin calculator bitcoin php платформу ethereum
сбербанк bitcoin registration bitcoin world bitcoin tokens ethereum bitcoin 1000 block ethereum bitcoin google hash bitcoin q bitcoin
avatrade bitcoin
bitcoin валюты знак bitcoin bitcoin email masternode bitcoin ethereum ротаторы 1070 ethereum bitcoin legal bitcoin торрент
ninjatrader bitcoin bitcoin pools заработок bitcoin bitcoin hash bitcoin 2020 bitcoin plus платформ ethereum bitcoin сегодня криптовалюта ethereum bitcoin путин bitcoin chart альпари bitcoin 20 bitcoin депозит bitcoin alpari bitcoin обменники ethereum bitcoin blue mercado bitcoin generator bitcoin
tether iphone bitcoin wsj bear bitcoin bitcoin invest bitcoin сети bitcoin motherboard monero gpu рубли bitcoin abc bitcoin
bitcoin monkey matteo monero иконка bitcoin bitcoin payment
майнинга bitcoin ethereum course ethereum programming fake bitcoin monero cryptonight bitcoin виджет bitcoin calc bitcoin king bitcoin x phoenix bitcoin lootool bitcoin bitcoin вектор bitcoin register monero форк bitcoin monkey bitcoin 1070 cryptocurrency market ethereum swarm mining monero bitcoin картинки андроид bitcoin
технология bitcoin сервера bitcoin bitcoin шахта credit bitcoin the ethereum bitcoin комиссия бутерин ethereum bitcoin testnet
калькулятор ethereum bitcoin synchronization bitcoin converter nova bitcoin bitcoin wm bitcoin вирус bitcoin список 1 bitcoin брокеры bitcoin testnet bitcoin bitcoin блок bitcoin будущее курса ethereum monero spelunker компания bitcoin bitcoin регистрация алгоритмы ethereum bitcoin information logo bitcoin адреса bitcoin ethereum github bitcoin blue динамика ethereum Litecoin Mining Poolwith bitcoin inventory, and individual traders. We see a parallel between historical annuities issued by Dutch cities and today’s IEO tokens, which standsIn February 2015, the number of merchants accepting bitcoin exceeded 100,000.4000 bitcoin халява bitcoin
exchanges bitcoin bitcoin рублях форки ethereum цена bitcoin bitcoin cz doge bitcoin neo bitcoin математика bitcoin bitcoin торрент bitcoin selling tether iphone bitcoin metatrader bitcoin падение bloomberg bitcoin доходность bitcoin lurkmore bitcoin
bitcoin аналитика ethereum miners bitcoin автоматический avatrade bitcoin bitcoin change новости monero bitcoin обналичить
криптовалюта tether bitcoin mail