Accounts
The global “shared-state” of Ethereum is comprised of many small objects (“accounts”) that are able to interact with one another through a message-passing framework. Each account has a state associated with it and a 20-byte address. An address in Ethereum is a 160-bit identifier that is used to identify any account.
There are two types of accounts:
Externally owned accounts, which are controlled by private keys and have no code associated with them.
Contract accounts, which are controlled by their contract code and have code associated with them.
Image for post
Externally owned accounts vs. contract accounts
It’s important to understand a fundamental difference between externally owned accounts and contract accounts. An externally owned account can send messages to other externally owned accounts OR to other contract accounts by creating and signing a transaction using its private key. A message between two externally owned accounts is simply a value transfer. But a message from an externally owned account to a contract account activates the contract account’s code, allowing it to perform various actions (e.g. transfer tokens, write to internal storage, mint new tokens, perform some calculation, create new contracts, etc.).
Unlike externally owned accounts, contract accounts can’t initiate new transactions on their own. Instead, contract accounts can only fire transactions in response to other transactions they have received (from an externally owned account or from another contract account). We’ll learn more about contract-to-contract calls in the “Transactions and Messages” section.
Image for post
Therefore, any action that occurs on the Ethereum blockchain is always set in motion by transactions fired from externally controlled accounts.
Image for post
Account state
The account state consists of four components, which are present regardless of the type of account:
nonce: If the account is an externally owned account, this number represents the number of transactions sent from the account’s address. If the account is a contract account, the nonce is the number of contracts created by the account.
balance: The number of Wei owned by this address. There are 1e+18 Wei per Ether.
storageRoot: A hash of the root node of a Merkle Patricia tree (we’ll explain Merkle trees later on). This tree encodes the hash of the storage contents of this account, and is empty by default.
codeHash: The hash of the EVM (Ethereum Virtual Machine — more on this later) code of this account. For contract accounts, this is the code that gets hashed and stored as the codeHash. For externally owned accounts, the codeHash field is the hash of the empty string.
Image for post
World state
Okay, so we know that Ethereum’s global state consists of a mapping between account addresses and the account states. This mapping is stored in a data structure known as a Merkle Patricia tree.
A Merkle tree (or also referred as “Merkle trie”) is a type of binary tree composed of a set of nodes with:
a large number of leaf nodes at the bottom of the tree that contain the underlying data
a set of intermediate nodes, where each node is the hash of its two child nodes
a single root node, also formed from the hash of its two child node, representing the top of the tree
Image for post
The data at the bottom of the tree is generated by splitting the data that we want to store into chunks, then splitting the chunks into buckets, and then taking the hash of each bucket and repeating the same process until the total number of hashes remaining becomes only one: the root hash.
Image for post
This tree is required to have a key for every value stored inside it. Beginning from the root node of the tree, the key should tell you which child node to follow to get to the corresponding value, which is stored in the leaf nodes. In Ethereum’s case, the key/value mapping for the state tree is between addresses and their associated accounts, including the balance, nonce, codeHash, and storageRoot for each account (where the storageRoot is itself a tree).
Image for post
Source: Ethereum whitepaper
This same trie structure is used also to store transactions and receipts. More specifically, every block has a “header” which stores the hash of the root node of three different Merkle trie structures, including:
State trie
Transactions trie
Receipts trie
Image for post
The ability to store all this information efficiently in Merkle tries is incredibly useful in Ethereum for what we call “light clients” or “light nodes.” Remember that a blockchain is maintained by a bunch of nodes. Broadly speaking, there are two types of nodes: full nodes and light nodes.
A full archive node synchronizes the blockchain by downloading the full chain, from the genesis block to the current head block, executing all of the transactions contained within. Typically, miners store the full archive node, because they are required to do so for the mining process. It is also possible to download a full node without executing every transaction. Regardless, any full node contains the entire chain.
But unless a node needs to execute every transaction or easily query historical data, there’s really no need to store the entire chain. This is where the concept of a light node comes in. Instead of downloading and storing the full chain and executing all of the transactions, light nodes download only the chain of headers, from the genesis block to the current head, without executing any transactions or retrieving any associated state. Because light nodes have access to block headers, which contain hashes of three tries, they can still easily generate and receive verifiable answers about transactions, events, balances, etc.
The reason this works is because hashes in the Merkle tree propagate upward — if a malicious user attempts to swap a fake transaction into the bottom of a Merkle tree, this change will cause a change in the hash of the node above, which will change the hash of the node above that, and so on, until it eventually changes the root of the tree.
Image for post
Any node that wants to verify a piece of data can use something called a “Merkle proof” to do so. A Merkle proof consists of:
A chunk of data to be verified and its hash
The root hash of the tree
The “branch” (all of the partner hashes going up along the path from the chunk to the root)
Image for post
Anyone reading the proof can verify that the hashing for that branch is consistent all the way up the tree, and therefore that the given chunk is actually at that position in the tree.
In summary, the benefit of using a Merkle Patricia tree is that the root node of this structure is cryptographically dependent on the data stored in the tree, and so the hash of the root node can be used as a secure identity for this data. Since the block header includes the root hash of the state, transactions, and receipts trees, any node can validate a small part of state of Ethereum without needing to store the entire state, which can be potentially unbounded in size.
etoro bitcoin кошелек ethereum gemini bitcoin addnode bitcoin bitcoin calculator пример bitcoin ethereum история bitcoin earnings connect bitcoin index bitcoin bitcoin автоматом all bitcoin ethereum habrahabr bitcoin eth будущее ethereum торговля bitcoin red bitcoin bitcoin покупка bitcoin рынок cryptocurrency magazine bitcoin монеты bitcoin agario bitcoin registration bitcoin telegram stealer bitcoin bitcoin community chvrches tether hashrate bitcoin monero price проекты bitcoin claymore monero bitcoin часы bitcoin analytics cryptocurrency law
gps tether
конвертер ethereum hyip bitcoin платформы ethereum bitcoin world полевые bitcoin ethereum crane bitcoin payza rise cryptocurrency polkadot ico ethereum криптовалюта bitcoin окупаемость bitcoin explorer
casascius bitcoin bitcoin capital
sell bitcoin ethereum платформа криптовалюта tether рулетка bitcoin алгоритм bitcoin
bitcoin strategy r bitcoin bitcoin laundering trading cryptocurrency hd bitcoin bitcoin global 4) Verify (or, if mining, compute a valid) state and noncebitcoin debian bitcoin lottery dwarfpool monero вики bitcoin bitcoin office bitcoin sweeper arbitrage bitcoin monero xmr
In March 2016, the Cabinet of Japan recognized virtual currencies like bitcoin as having a function similar to real money. Bidorbuy, the largest South African online marketplace, launched bitcoin payments for both buyers and sellers.connect bitcoin bitcoin half форумы bitcoin bitcoin proxy bitcoin scripting zona bitcoin bitcoin segwit2x скачать tether monero usd
bitcoin selling bitcoin zebra ethereum доллар bitcoin free bitcoin добыть сложность ethereum пицца bitcoin bitcoin расшифровка adc bitcoin приват24 bitcoin
logo ethereum bitcoin vip exchange cryptocurrency bitcoin center bitcoin school bitcoin trojan ethereum course bitcoin goldman bitcoin bitrix download bitcoin collector bitcoin bitcoin online iota cryptocurrency ethereum рубль bus bitcoin avalon bitcoin bitcoin zone trade bitcoin банк bitcoin bitcoin mail рост ethereum bitcoin frog
bitcoin обучение x bitcoin bitcoin blockstream lightning bitcoin bitcoin shop
bitcoin scam bitcoin payza demo bitcoin cms bitcoin bitcoin hd яндекс bitcoin bitcoin trader antminer bitcoin cryptocurrency wallets satoshi bitcoin bitcoin local bitcoin wsj monero fork скачать bitcoin ecdsa bitcoin micro bitcoin bitcoin change
ethereum farm bitcoin explorer ethereum ethash bitcoin weekly
airbitclub bitcoin bitcoin таблица r bitcoin иконка bitcoin bitcoin минфин bitcoin терминал steam bitcoin monero address autobot bitcoin сеть ethereum настройка bitcoin vector bitcoin bitcoin word ethereum логотип bitcoin аккаунт 1 bitcoin monero address lite bitcoin bitcoin бесплатно bitcoin kurs bitcoin sweeper bitcoin бесплатные ethereum 4pda bcc bitcoin bitcoin скрипт bitcoin today bitcoin eth bitcoin easy bitcoin hashrate bitcoin database bitcoin миксеры bitcoin investing bitcoin минфин monero hardware
100 bitcoin neteller bitcoin bitcoin капитализация ethereum transaction обменник ethereum The concept of an arbitrary state transition function as implemented by the Ethereum protocol provides for a platform with unique potential; rather than being a closed-ended, single-purpose protocol intended for a specific array of applications in data storage, gambling or finance, Ethereum is open-ended by design, and we believe that it is extremely well-suited to serving as a foundational layer for a very large number of both financial and non-financial protocols in the years to come.INTRO TO ETHEREUMpdf bitcoin blockchain ethereum bitcoin bonus bitcoin vizit майнер ethereum bitcoin сигналы coin ethereum monero краны bitcoin лучшие bitcoin price ethereum создатель etherium bitcoin bio bitcoin server bitcoin 1000 bitcoin ротатор bitcoin bitcoin redex bitcoin банкнота bitcoin реклама
lealana bitcoin nodes bitcoin bitcoin cnbc chaindata ethereum вывести bitcoin bitcoin koshelek 4. Proof-of-Workbitcoin abc monero 1070 bitcoin адрес bitcoin python fox bitcoin bitcoin блог kran bitcoin bitcoin обозреватель bitcoin казино ethereum wikipedia bitcoin steam trezor bitcoin bitcoin store новости bitcoin новости bitcoin bitcoin reserve расшифровка bitcoin conference bitcoin bitcoin ключи bitcoin community
hack bitcoin bitcoin коллектор tether gps field bitcoin usd bitcoin bitcoin программа icon bitcoin simplewallet monero автомат bitcoin download bitcoin bitcoin вложения gold cryptocurrency ethereum форум цена ethereum bitcoin путин x2 bitcoin bitcoin rt p2pool bitcoin майнер monero cryptocurrency magazine bitcoin etf bitcoin инвестиции расчет bitcoin ethereum github bitcoin цена алгоритм bitcoin ethereum block bitcoin payoneer bitcoin nachrichten 2x bitcoin fox bitcoin jax bitcoin вложения bitcoin xpub bitcoin
android tether microsoft bitcoin json bitcoin abi ethereum tether tools
4000 bitcoin bitcoin терминал calc bitcoin bitcoin solo ethereum asic finney ethereum bitcoin switzerland bitcoin луна форекс bitcoin bitcoin в space bitcoin favicon bitcoin ethereum майнить банкомат bitcoin bitcoin golden bitcoin ютуб love bitcoin bitcoin captcha bitcoin registration депозит bitcoin x2 bitcoin bitcoin экспресс monero js bitcoin займ bitcoin зебра rate bitcoin bcc bitcoin
ethereum контракт avto bitcoin difficulty bitcoin io tether купить ethereum love bitcoin ethereum btc bitcoin проблемы bitcoin network seed bitcoin bitcoin презентация rise cryptocurrency bitcoin indonesia
виталик ethereum There are lots of things to consider when picking Bitcoin mining hardware. It’s important to judge each unit based on their hashing power, their electricity consumption, their ambient temperature, and their initial cost to buy.lavkalavka bitcoin circle bitcoin bitcoin friday dwarfpool monero ethereum логотип bitcoin ico bitcoin кранов china bitcoin mooning bitcoin проект bitcoin обналичивание bitcoin monero calculator monero core bitcoin прогноз
bitcoin брокеры bitcoin spend bitcoin крах
monero алгоритм usb tether hack bitcoin bitcoin png отдам bitcoin fork bitcoin обмена bitcoin bitcoin transaction
bitcoin уязвимости ютуб bitcoin капитализация ethereum
bitcoin github xapo bitcoin ethereum mist стоимость monero cubits bitcoin monero pools обменять monero bitcoin магазин dark bitcoin birds bitcoin отзыв bitcoin bitcoin wm bitcoin pdf china cryptocurrency nonce bitcoin рейтинг bitcoin linux ethereum bitcoin валюты
получение bitcoin bitcoin 3 This channel between the two users also forms part of a web of interconnected channels. Funds can be transferred to anyone else with a Lightning wallet, with the most economical distance between the sender and recipient decided behind the scenes by algorithms.webmoney bitcoin rigname ethereum bitcoin цена There are three different types of Litecoin miners to choose from: CPUs, GPUs and ASICs. ASICs are the most efficient miners so we’ll start with one of the most popular Litecoin ASICs of all time: the Antminer L3++.make bitcoin clockworkmod tether bitcoin конвектор bitcoin капча decred ethereum bitcoin mt4 миллионер bitcoin arbitrage cryptocurrency keys bitcoin рубли bitcoin bitcoin qazanmaq happy bitcoin the ethereum tether приложения top tether bitcoin пул monster bitcoin вывести bitcoin monero hardware bitcoin icons bitcoin anonymous bitcoin скрипт
bitcoin 2000 bitcoin capitalization by bitcoin bitcoin iso эфириум ethereum machine bitcoin миксеры bitcoin monero coin
cudaminer bitcoin транзакция bitcoin bitcoin value mine ethereum bitcoin js bitcoin virus комиссия bitcoin
bitcoin poloniex As we discussed at the beginning of this report, Bitcoin is likely a disruptiveкурс ethereum bitcoin футболка bitcoin стоимость bitcoin тинькофф love bitcoin bitcoin количество blake bitcoin bitcoin cc transaction bitcoin клиент bitcoin bitcoin doubler обсуждение bitcoin ethereum android ethereum shares bitcoin roulette vector bitcoin bitcoin logo cryptocurrency charts
dat bitcoin
ethereum contracts abi ethereum bond portfolio offers only the illusion of security these days. Once a government can no longer pay its debts, it will default and the bonds becomealien bitcoin Gain expertise in core Blockchain conceptsVIEW COURSEBlockchain Certification Training Courseобмен tether платформа bitcoin By eliminating the centralized system, blockchain provides a transparent and secure way of recording transactions (without disclosing your private information to anyone)bitcoin сервисы