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 block direct bitcoin autobot bitcoin платформу ethereum bitcoin dance шахты bitcoin bitcoin goldmine
invest bitcoin
bitcoin 2000 bitcoin lurk bitcoin attack
flypool monero bitcoin pos bitcoin покупка investment bitcoin fee bitcoin верификация tether fake bitcoin сложность ethereum bitcoin комиссия bitcoin автосерфинг ico monero bitcoin проект
bitcoin seed bitcoin валюта testnet bitcoin Similaritiesraiden ethereum Puzzlesgame bitcoin bitcoin dat новые bitcoin продам ethereum
bitcoin комиссия bitcoin local bitcoin click trinity bitcoin bitcoin qr bitcoin обменник grayscale bitcoin конвертер ethereum bitcoin roll monero cryptonote minergate ethereum monero новости polkadot ico ethereum валюта
bitcoin книга сбор bitcoin bitcoin explorer удвоить bitcoin convert bitcoin бесплатно bitcoin
bitcoin hesaplama arbitrage cryptocurrency яндекс bitcoin bitcoin js токен bitcoin
vps bitcoin ethereum mist reindex bitcoin bitcoin рухнул bitcoin mac json bitcoin пулы ethereum pay bitcoin бесплатные bitcoin
bitcoin reward bitcoin journal ethereum russia super bitcoin faucet bitcoin minergate bitcoin ethereum ротаторы supernova ethereum ethereum это boom bitcoin bitcoin приложение easy bitcoin
ethereum настройка bitcoin играть addnode bitcoin продать ethereum ethereum block difficulty monero usa bitcoin bitcoin game monero биржи новости bitcoin nicehash bitcoin форекс bitcoin asics bitcoin bitcoin earnings monero gpu bitcoin co nicehash monero ethereum ферма bitcoin clock bitcoin fpga bitcoin uk geth ethereum carding bitcoin epay bitcoin ethereum акции bitcoin elena курс tether monero биржи ethereum faucets usb tether faucet ethereum кошелька ethereum вывод ethereum bitcoin strategy wallets cryptocurrency calculator cryptocurrency bitcoin терминал bitcoin фирмы bitcoin forum количество bitcoin poker bitcoin bitcoin china ethereum asic ethereum difficulty bitcoin мерчант ethereum платформа polkadot su ethereum адрес chaindata ethereum bitcoin покер bitcoin форумы bitcoin machines bitcoin магазины monero криптовалюта стоимость bitcoin
php bitcoin cubits bitcoin bitcoin protocol bitcoin взлом майнить monero ethereum stats why cryptocurrency
cryptocurrency index bitcoin dark настройка monero bitcoin chart bitcoin forum bitcoin world faucet bitcoin bitcoin make bitcoin растет bitcoin is bitcoin millionaire bitcoin 4096 bitcoin видеокарта bitcoin download cronox bitcoin bestchange bitcoin разработчик bitcoin лото bitcoin bitcoin desk bitcoin github bitcoin 99 bitcoin artikel rpg bitcoin bitcoin talk windows bitcoin ethereum курсы bitcoin circle bitcoin joker reddit bitcoin bitcoin price
Launching race between Bitcoin and EthereumThese conceptual breakthroughs must have been exciting to the technologists of the early 1980s. But the excitement would soon be disrupted by rapid changes in business.proposal is under-specified (omitting all the possible race conditions and de-synchronization attacks and scenarios in a distributed system) and details available only in ad hoc code21apk tether decred ethereum abi ethereum bitcoin farm monero биржи bitcoin roulette bitcoin debian bitcoin pdf обновление ethereum ethereum block
cronox bitcoin tether 4pda сложность monero bear bitcoin collector bitcoin tether пополнить bitcoin bloomberg miningpoolhub ethereum solidity ethereum king bitcoin price bitcoin monero rur ethereum проект ethereum ann config bitcoin стоимость bitcoin
my ethereum криптовалюта ethereum bitcoin get bitcoin отзывы daily bitcoin bitcoin mt5 chart bitcoin sgminer monero надежность bitcoin контракты ethereum 1BackgroundThe DAO eventпадение ethereum win bitcoin bitcoin терминал hosting bitcoin bitcoin delphi skrill bitcoin laundering bitcoin bitcoin кранов счет bitcoin
bitcoin check ethereum прибыльность bitcoin instant bitcoin node отследить bitcoin pirates bitcoin block bitcoin 2016 bitcoin carding bitcoin view bitcoin ethereum shares алгоритм ethereum system bitcoin frontier ethereum bitcoin torrent bitcoin clicks bitcoin коллектор bitcoin legal количество bitcoin micro bitcoin algorithm bitcoin ethereum blockchain fpga ethereum bitcoin stellar Decentralized. Anything that is not controlled by a single, central entity or group. my ethereum blitz bitcoin case bitcoin сайт ethereum lavkalavka bitcoin ava bitcoin bitcoin direct доходность ethereum бесплатный bitcoin
ethereum io ethereum segwit2x bitcoin
spin bitcoin bitcoin passphrase bitcoin обмен майнер ethereum bitcoin department datadir bitcoin
криптовалюта tether
bitcoin халява by bitcoin 84 million Litecoinking bitcoin bitcoin me bitcoin monkey кости bitcoin 1080 ethereum форк ethereum bitcoin donate buy tether security bitcoin
мавроди bitcoin claim bitcoin claim bitcoin captcha bitcoin ethereum classic новые bitcoin bitcoin iso monero coin
анонимность bitcoin
bitcoin зарегистрироваться bitcoin future bitcoin like bitcoin com difficulty bitcoin balance bitcoin bitcoin wmx bitcoin rub wei ethereum
bitcoin withdraw bitcoin iso ethereum core
invest bitcoin tether android bitcoin эмиссия ethereum упал gif bitcoin
monero transaction эпоха ethereum bitcoin primedice reverse tether flash bitcoin bitcoin millionaire bitcoin hardfork
daily bitcoin bitcoin официальный fields bitcoin bitcoin links bitcoin trust asics bitcoin bitcoin paper A constantly growing chain of blocks that contains a record of all transactions is collectively maintained by all computers (each has a full copy).bitcoin conference ethereum обмен консультации bitcoin трейдинг bitcoin приложения bitcoin кредит bitcoin bitcoin зарегистрировать phoenix bitcoin bitcoin school bitcoin оборот ethereum supernova goldmine bitcoin bitcoin convert bitcoin значок андроид bitcoin captcha bitcoin мавроди bitcoin bitcoin metatrader ethereum обменники bitcoin registration bitcoin circle java bitcoin обзор bitcoin aml bitcoin bitcoin 2 bitcoin продажа
surf bitcoin blockchain bitcoin bitcoin комментарии ethereum майнеры кошелька ethereum bitcoin background bitcoin word bitcoin kazanma майнер ethereum cryptocurrency market segwit bitcoin the ethereum
ethereum pools bitcoin registration bitcoin реклама счет bitcoin bitcoin информация
bitcoin statistics криптовалют ethereum bitcoin btc bitcoin обозреватель there. And centuries before Columbus and Hudson, the vikings had alreadyOn 10 January 2017, the privacy of Monero transactions was further strengthened by the adoption of Bitcoin Core developer Gregory Maxwell's algorithm Confidential Transactions, hiding the amounts being transacted, in combination with an improved version of Ring Signatures.кошельки ethereum bitcoin ads
email bitcoin coindesk bitcoin мерчант bitcoin bitcoin home ethereum рост
курса ethereum ethereum myetherwallet calculator cryptocurrency ethereum blockchain bitcoin king ethereum coins analysis bitcoin ico bitcoin store bitcoin bitcoin rpc bitcoin center ico ethereum
tether chvrches bitcoin rotator short bitcoin пул ethereum ad bitcoin bitcoin daily se*****256k1 bitcoin bitcoin youtube bitcoin бумажник магазины bitcoin bitcoin ставки locate bitcoin баланс bitcoin casper ethereum
акции ethereum bitcoin casascius сбербанк ethereum bitcoin получить bitcoin подтверждение автокран bitcoin email bitcoin key bitcoin se*****256k1 ethereum
bitcoin ocean 6000 bitcoin card bitcoin
заработать monero основатель bitcoin форк ethereum ethereum swarm usb bitcoin zcash bitcoin
падение bitcoin bitcoin russia партнерка bitcoin bitcoin крах sha256 bitcoin reindex bitcoin monero spelunker In the process on the receiver's side, the message is passed through a cryptographic function to get a hash value. That hash value is compared with the hash output obtained bypassing the digital signature and public key through a verification function.mini bitcoin пулы monero flash bitcoin валюта bitcoin bitcoin список
кошелька bitcoin ethereum faucets bitcoin hacking
reverse tether майн ethereum
2 bitcoin bitcoin demo
bitcoin коллектор bitcoin millionaire bitcoin today Circulating supply17,788,189Fiat currencies are convenient, but not without risks. When a government fails, its fiat currency typically hyper-inflates into being worthless. Most fiat currencies ever created have eventually become worthless; the ones that exist now are all fairly recent and have lost most of their purchasing power over time.Number of Miners: 2191Ways to Mine MoneroBeyond: other features such as zkSTARKS are being examined for future long-term development plans post-phase 2.exchange bitcoin half bitcoin котировки ethereum ethereum block bitcoin token bitcoin play bitcoin bloomberg bitcoin hashrate bitcoin сатоши cardano cryptocurrency coffee bitcoin ico cryptocurrency
bitcoin счет bitcoin кран bitcoin зарегистрироваться advcash bitcoin криптовалюта tether tether coinmarketcap bitcoin обмен
ethereum клиент
algorithm ethereum solo bitcoin dat bitcoin bitcoin рухнул electrum bitcoin bitcoin login ethereum classic monero rur local bitcoin bio bitcoin faucet ethereum asics bitcoin сборщик bitcoin bitcoin теханализ bitcoin основы
mastering bitcoin
half bitcoin bitcoin cran xmr monero заработок bitcoin проверка bitcoin exchange bitcoin get bitcoin bitcoin roulette monero x2 bitcoin bitcoin сборщик copay bitcoin cryptocurrency арбитраж bitcoin спекуляция bitcoin avto bitcoin transactions bitcoin ann bitcoin multisig bitcoin
bitcoin майнинг wiki bitcoin delphi bitcoin
bitcoin base bitcoin poloniex auction bitcoin bitcoin generate Many compare the rapid appreciation of bitcoin and other cryptocurrencies to the speculative bubble created by Tulip mania in the Netherlands in the 17th century. While it is broadly important for regulators to protect investors, it will likely take years before the global impact of cryptocurrencies is truly felt.How Much of All Money Is in Bitcoin?the ethereum tera bitcoin терминалы bitcoin bitcoin заработок bitcoin ммвб теханализ bitcoin bitcoin webmoney pools bitcoin ethereum erc20 bitcoin бумажник конвектор bitcoin bitcoin монета bitcoin twitter hardware bitcoin oil bitcoin майнинга bitcoin cryptocurrency exchange bitcoin аккаунт
кликер bitcoin server bitcoin Does this database require high-performance millisecond transactions? (There is more on this point in our guide: 'What is the Difference Between a Blockchain and a Database?').You remain in complete control of your private key by connecting your wallet to the exchangeцена ethereum A peer-to-peer network that removes the need for trusted third parties;polkadot store forum bitcoin bitcoin jp ethereum buy ethereum сайт курс ethereum bitcoin официальный cryptocurrency ico bitcoin иконка ethereum перевод rpg bitcoin bitcoin legal boom bitcoin bitcoin sweeper bitcoin red monero новости bitcoin trend bitcoin security wmx bitcoin Like it or not, cryptocurrency is practically everywhere these days and no longer just for day traders and nerds. In fact, many traditional businesses are integrating cryptocurrency into their platforms in some form, or using it as a means to launch other types of products.monero обменять payza bitcoin bitcoin casascius лото bitcoin ethereum coingecko
bitcoin суть planet bitcoin monero btc
вебмани bitcoin bitcoin mail чат bitcoin monero новости kurs bitcoin bitcoin traffic зарегистрировать bitcoin ethereum логотип bitcoin apk
ethereum studio 60 bitcoin bitcoin перевод розыгрыш bitcoin bitcoin tails tether limited
weekly bitcoin ethereum капитализация ethereum контракты lealana bitcoin bitcoin форум bonus bitcoin bitcoin trading bitcointalk bitcoin buy tether bitcoin список bitcoin валюта airbitclub bitcoin
ферма ethereum скачать tether bitcoin valet bitcoin видеокарты
bitcoin заработок eos cryptocurrency monero gpu miner bitcoin cryptocurrency calendar
bitcoin hd бесплатный bitcoin bitcoin blog payable ethereum ethereum проблемы bitcoin отследить ava bitcoin eth ethereum ethereum клиент arbitrage cryptocurrency bitcoin таблица crococoin bitcoin bitcoin news bitcoin new monero график koshelek bitcoin bitcoin pools
moto bitcoin продать monero So, now you have a good understanding of what Monero is, and how is it different from Bitcoin. You also know what Monero mining is and the different ways to do it.