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 сатоши bitcoin bubble bitcoin poker On 11 August 2013, the Bitcoin Foundation announced that a bug in a pseudorandom number generator within the Android operating system had been exploited to steal from wallets generated by Android apps; fixes were provided 13 August 2013.bitcoin ethereum ethereum токен bitcoin co
bitcoin weekly
bootstrap tether monero blockchain bitcointalk bitcoin криптовалюты bitcoin master bitcoin количество bitcoin
кошельки ethereum se*****256k1 bitcoin bitcoin blockstream india bitcoin x2 bitcoin 1000 bitcoin ethereum node пример bitcoin
tx bitcoin ann ethereum
charts bitcoin биржи monero bitcoin earning bitcoin click кошель bitcoin monero обмен bitcoin accelerator bitcoin take asics bitcoin сборщик bitcoin se*****256k1 ethereum ethereum dao
bitcoin миксеры why cryptocurrency токен bitcoin использование bitcoin bitcoin аналоги map bitcoin ethereum аналитика bitcoin шахты динамика ethereum se*****256k1 ethereum Zero is Specialnvidia bitcoin ethereum testnet bitcoin сервисы видео bitcoin bitcoin shop bitcoin cash ферма bitcoin bitcoin деньги bitcoin видеокарта bitcoin server collector bitcoin окупаемость bitcoin adbc bitcoin cryptocurrency price dark bitcoin token ethereum bitcoin explorer bitcoin org ethereum хешрейт зарабатывать bitcoin bitcoin github bitcoin etf bitcoin signals currency bitcoin ethereum price invest bitcoin bcc bitcoin solidity ethereum ethereum stats ethereum news bitcoin trojan bitcoin сегодня bitcoin бесплатно bitcoin покер apple bitcoin ethereum сайт bitcoin в raiden ethereum технология bitcoin команды bitcoin лото bitcoin future bitcoin Forcing risk taking on practically all individuals within an economic system is not natural nor is it fundamental to the functioning of an economy. It is the opposite and it is detrimental to the stability of the system as a whole. As an economic function, risk taking itself is productive, necessary, and inevitable. The unhealthy part is specifically when individuals are forced into taking risk as a byproduct of central banks manufacturing money to lose value, whether those taking risk are conscious of the cause and effect or not. Risk taking is productive when it is intentional, voluntary and undertaken in the pursuit of accumulating capital. While deciphering between productive investment and that which is induced by monetary inflation is inherently grey, you know it when you see it. Productive investment occurs naturally as market participants work to improve their own lives and the lives of those around them. The incentives to take risk in a free market already exist. There is nothing to be gained, and a lot to lose, through central bank intervention.rx470 monero
bitcoin drip bitcoin экспресс
bitmakler ethereum котировка bitcoin bitcoin hacker ethereum metropolis kurs bitcoin
genesis bitcoin monero xmr car bitcoin seed bitcoin китай bitcoin bitcoin sec book bitcoin теханализ bitcoin bitcoin alliance новости ethereum bitcoin ферма bitcoin сбор wallpaper bitcoin truffle ethereum ethereum алгоритмы homestead ethereum accept bitcoin
nanopool ethereum
исходники bitcoin bitcoin аналоги future bitcoin
вклады bitcoin bitcoin home лото bitcoin bitcoin cms 3. Five Industries that Blockchain will DisruptDACs, or decentralized autonomous companies, are an attempt at overcoming this problem using the usual corporate carrots—resource planning, a salary and stable employment—but without the dreaded human managers. This may enable project velocity to increase without the introduction of undesirable qualities, but the efficacy of this approach remains to be seen.minergate bitcoin перевести bitcoin
bitcoin balance bitcoin портал bitcoin datadir ninjatrader bitcoin 60 bitcoin blake bitcoin tcc bitcoin bitcoin bcc добыча bitcoin satoshi bitcoin bitcoin бонусы bitcoin change bitcoin legal bitcoin спекуляция
best bitcoin trade cryptocurrency bitcoin transaction stealer bitcoin сайте bitcoin
ethereum форум difficulty monero bitcoin login zebra bitcoin monero windows cubits bitcoin bitcoin cap bitcoin neteller bitcoin заработок bitcoin save bitcoin location bitcoin заработать faucet bitcoin bitcoin блок bitcoin pay
bitcoin analysis bitcoin goldmine ethereum windows кошельки ethereum
bitcoin indonesia bitcoin курсы monero настройка See All Coupons of Best Walletsnya bitcoin торги bitcoin блокчейна ethereum frontier ethereum ethereum gas email bitcoin car bitcoin reverse tether количество bitcoin ethereum 2017 bitcoin fan nonce bitcoin 2016 bitcoin bitcoin okpay monero dwarfpool bitcoin word bitcoin fund bitcoin миллионеры bitcoin hype system bitcoin tp tether cryptocurrency bitcoin bitcoin пул сервисы bitcoin bitcoin комментарии ethereum addresses bitcoin nachrichten bitcoin hardfork ethereum акции trade cryptocurrency currency bitcoin usa bitcoin bitcoin facebook
bitcoin etf bitcoin millionaire 1000 bitcoin tether apk aml bitcoin pay bitcoin cryptocurrency prices dance bitcoin calculator bitcoin ninjatrader bitcoin forum cryptocurrency bitcoin girls autobot bitcoin bitcoin pizza ethereum рубль dark bitcoin ethereum asic bitcoin fasttech bitcoin qiwi криптовалюты bitcoin bitcoin symbol ethereum calc bitcoin 100 second bitcoin monero ico bitcoin adress
bitcoin приложения *****a bitcoin bitcoin блоки
tether обзор bitcoin ann proxy bitcoin poker bitcoin
bitcoin allstars bitcoin рулетка
apple bitcoin
bitcoin 2020 конвертер ethereum generator bitcoin cms bitcoin cryptocurrency law ethereum developer будущее bitcoin форумы bitcoin bitcoin de
monero windows bitcoin мастернода ethereum bitcoin spin bitcoin магазин bitcoin картинки bitcoin
nicehash bitcoin пополнить bitcoin token ethereum spots cryptocurrency The way that traditional (non-blockchain) ledgers work is very similar to the way you would share a Microsoft Word document with your friend:key bitcoin To understand how this works, imagine Alice wants to pay Bob 10 bitcoin (BTC). To make this payment, Bitcoin requires that Alice publish a written promise to pay Bob the agreed amount. This promise is called a transaction. Bitcoin knows nothing about real-world identities, so addresses are used as a proxy.bitcoin torrent bitcoin рейтинг new cryptocurrency видеокарты ethereum кредит bitcoin monero logo gambling bitcoin gas ethereum bitcoin bloomberg подтверждение bitcoin monero курс майнинга bitcoin bitcoin token криптовалюту bitcoin бесплатный bitcoin взлом bitcoin кости bitcoin bitcoin получение bitcoin 50 nicehash bitcoin microsoft bitcoin mempool bitcoin ethereum конвертер bitcoin desk bitcoin traffic the ethereum падение ethereum монет bitcoin bitcoin daily habrahabr bitcoin bitcoin buying cryptocurrency calendar
bitcoin sha256 ethereum faucet analysis bitcoin эпоха ethereum пополнить bitcoin bitcoin rub
bitcoin torrent sportsbook bitcoin monero proxy bitcoin database airbit bitcoin bitcoin bow bitcoin раздача bitcoin fan High hash rate - You can think of hash rate as the processing power of the hardware.tails bitcoin oil bitcoin криптовалюта tether bitcoin государство майнинга bitcoin bitcoin converter gek monero логотип ethereum site bitcoin bitcoin c adbc bitcoin code bitcoin bitcoin talk app bitcoin poker bitcoin cudaminer bitcoin
биржа ethereum
forbes bitcoin кликер bitcoin bitcoin foto siiz bitcoin bitcoin miner bitcoin etf
polkadot store продам bitcoin окупаемость bitcoin bitcoin puzzle tether перевод bitcoin gpu ethereum os bitcoin продам demo bitcoin
bitcoin faucet bitcoin фарм titan bitcoin zcash bitcoin life bitcoin tether курс ethereum mist ethereum кошелька майнинга bitcoin акции bitcoin bitcoin бесплатные bitcoin goldmine cryptocurrency prices se*****256k1 bitcoin bitcoin халява locate bitcoin депозит bitcoin global bitcoin x2 bitcoin trade cryptocurrency asics bitcoin bitcoin trend bitcoin make siiz bitcoin форк bitcoin ethereum кошелька ethereum miner
plasma ethereum валюта tether майнинга bitcoin ethereum получить инвестирование bitcoin карты bitcoin cryptocurrency market bitcoin оборудование лучшие bitcoin нода ethereum системе bitcoin When Alice clicks a button to send the money to Bob, the transfer is encoded in a chunk of text that includes the amount and Bob’s address. Investing in cryptocurrencies and other Initial Coin Offerings ('ICOs') is highly risky and speculative, and this article is not a recommendation by Investopedia or the writer to invest in cryptocurrencies or other ICOs. Since each individual's situation is unique, a qualified professional should always be consulted before making any financial decisions. Investopedia makes no representations or warranties as to the accuracy or timeliness of the information contained herein. As of the date, this article was written, the author has no position in litecoin or any other cryptocurrency.ethereum контракт Bitcoin is the first scarce digital asset. Until bitcoin, anything digital could be easily copied. Satoshi Nakamoto's solution to this 'double spending problem' and related issues around distributing the initial money supply fairly, was a breakthrough in computer science.bitcoin auto cryptocurrency magazine видеокарта bitcoin bitcoin reindex bitcoin airbitclub uk bitcoin ethereum script ethereum bonus If two different instructions for changing the ownership of the same cryptographic units are simultaneously entered, the system performs at most one of them.bitcoin баланс bitcoin расчет bitcoin 2010 locate bitcoin
bounty bitcoin bitcoin автоматический bitcoin перевод bitcoin обои вики bitcoin bitcoin даром счет bitcoin fpga bitcoin bitcoin stock bitcoin описание bubble bitcoin ethereum stats transactions bitcoin super bitcoin андроид bitcoin добыча bitcoin bitcoin escrow etf bitcoin bitcoin hyip казино ethereum bitcoin настройка валюта tether bitcointalk bitcoin развод bitcoin invest bitcoin 4pda tether запрет bitcoin
bitcoin wordpress ninjatrader bitcoin scrypt bitcoin взлом bitcoin multiplier bitcoin sell bitcoin bitcoin passphrase 4pda tether mikrotik bitcoin ethereum ubuntu future bitcoin kong bitcoin ethereum токены bitcoin ads bitcoin подтверждение blockchain ethereum
bitcoin лопнет bitcoin novosti
bitcoin обсуждение
ethereum addresses
bitcoin rbc bitcoin elena ethereum пул
анимация bitcoin Digital: Cryptocurrency is digital money (or digital currency, it means the same thing). This means that it only exists in computers. Cryptocurrencies don’t have coins with a picture of a Queen’s head on them, or paper notes with ‘In God We Trust’ written on them, either.Implementationsbitcoin data cryptocurrency market bitcoin png новости bitcoin ann monero bitcoin cranes fire bitcoin equihash bitcoin trade bitcoin autobot bitcoin nova bitcoin
nicehash 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 Fraud concernsbuy tether ethereum com
cryptocurrency ethereum bitcoin foto bitcoin php магазин bitcoin sell bitcoin что bitcoin мавроди bitcoin bitcoin testnet bestexchange bitcoin
video bitcoin курс ethereum asus bitcoin water bitcoin кошелек bitcoin bitcoin автоматически bitcoin комиссия ethereum geth tp tether бесплатные bitcoin ethereum cryptocurrency and most recently, by large cap companies such as Google, Qualcomm, Newdog bitcoin rigname ethereum bitcoin sha256 bitcoin cgminer ethereum майнить ethereum farm system bitcoin bitcoin hardware ethereum supernova bitcoin alliance bitcoin ocean bitcoin motherboard bitcoin суть краны monero вклады bitcoin bitcoin escrow bitcoin knots bitcoin деньги bitcoin wallpaper bitcoin россия ethereum wallet exchange ethereum ethereum classic bitcoin коллектор bitcoin блокчейн пул ethereum
и bitcoin bitcoin баланс usa bitcoin
ethereum клиент rush bitcoin bitcoin бумажник заработка bitcoin bitcoin betting ethereum видеокарты bitcoin фермы
spin bitcoin bitcoin p2p bitcoin center 3d bitcoin decred ethereum Type of wallet: Cold walletmonero ico bitcoin fpga ethereum swarm обмен monero bitcoin софт сколько bitcoin usb bitcoin tether приложение арбитраж bitcoin invest bitcoin bitcoin usd отзывы ethereum amd bitcoin bitcoin apple хардфорк bitcoin bot bitcoin курс tether tether app bitcoin advcash
plasma ethereum dice bitcoin bitcoin accelerator bitcoin favicon форк bitcoin
hourly bitcoin difficulty ethereum bitcoin компьютер ethereum обозначение bitcoin banks airbitclub bitcoin x2 bitcoin bitcoin xapo bitcoin click bitcoin пул bitcoin оборот ethereum fork express bitcoin bitcoin сборщик сложность ethereum bitcoin blockstream bitcoin конверт bitcoin бонусы ethereum dao bitcoin rotator инвестиции bitcoin widget bitcoin asus bitcoin ethereum хешрейт ethereum install bitcoin purse monero hashrate bitcoin hesaplama ethereum история 5 bitcoin flypool monero
wisdom bitcoin bitcoin упал monero hashrate bitcoin ishlash favicon bitcoin bitcoin анонимность 22 bitcoin bitcoin упал mindgate bitcoin е bitcoin
bitcoin гарант system bitcoin bitcoin rotators antminer bitcoin
putin bitcoin bitcoin развод bitcoin сервера
работа bitcoin bitcoin лопнет half bitcoin пожертвование bitcoin ethereum free ethereum dao tcc bitcoin carding bitcoin freeman bitcoin bitcoin халява blockchain ethereum платформа bitcoin bitcoin sha256 plus bitcoin moneybox bitcoin ethereum windows *****p ethereum wordpress bitcoin buying bitcoin up bitcoin bitcoin исходники node bitcoin ethereum usd bitcoin double keepkey bitcoin новости monero bitcoin руб bitcoin freebie bitcoin sha256 rotator bitcoin ethereum alliance bitcoin x2 bitcoin market bitcoin pools bitcoin статья
antminer ethereum bitcoin зарегистрироваться bitcoin разделился vpn bitcoin дешевеет bitcoin zona bitcoin tether обменник
TransfersThe software supports 'cross-network' protocols like SOAP or XML-RPCThe smallest unit is a wei and there are 1,000,000,000,000,000,000 of them per ETH. There are also some other intermediate names: Finney, Szabo, Shannon, Babbage, Ada – all named after people who made significant contributions to fields related to cryptocurrencies or networks.ethereum логотип trade cryptocurrency
tether coin average bitcoin
bitcoin telegram сети ethereum steam bitcoin invest bitcoin tether android blue bitcoin ethereum gas bitcoin steam addnode bitcoin запросы bitcoin перспектива bitcoin blogspot bitcoin bitcoin de *****uminer monero car bitcoin 2016 bitcoin bitcoin check bitcoin криптовалюта tether yota chvrches tether покер bitcoin bitcoin database bitcoin analysis cryptocurrency wikipedia matrix bitcoin ethereum decred zcash bitcoin bitcoin 999
bitcoin окупаемость bitcoin компьютер monaco cryptocurrency bitcoin kazanma chain bitcoin bitcoin calculator golang bitcoin bitcoin brokers bitcoin avalon bitcoin motherboard car bitcoin анализ bitcoin bitcoin c neo cryptocurrency bitcoin spinner
san bitcoin андроид bitcoin wild bitcoin bitcoin work ethereum info ethereum asic
отслеживание bitcoin bitcoin playstation продажа bitcoin
mikrotik bitcoin keystore ethereum
кошелька ethereum ethereum crane
халява bitcoin code bitcoin bitcoin analysis перевести bitcoin bitcoin tx ethereum видеокарты alpari bitcoin bitcoin проблемы ru bitcoin
eth ethereum bitcoin bitcoin trading
bitcoin миллионеры bitcoin artikel bitcoin satoshi dag ethereum weekend bitcoin bitcoin biz ethereum пулы
ethereum io bitcoin прогнозы bitcoin weekly ethereum chaindata bitcoin info bitcoin пожертвование frontier ethereum
ethereum перспективы ethereum кошелька