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 ***** nodes
a single root node, also formed from the hash of its two ***** 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 ***** 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.
poloniex monero динамика ethereum регистрация bitcoin зарегистрировать bitcoin bitcoin trading bitcoin anonymous ethereum контракты monero proxy bitcoin биткоин отзывы ethereum bitcoin пирамиды bitcoin reklama live bitcoin tether limited invest bitcoin ethereum контракт график ethereum кошелек tether tether обменник bitcoin rotators bitcoin boxbit bitcoin это blue bitcoin bitcoin 100 рост bitcoin bitcoin review bitcoin вконтакте bitcoin 1000 sec bitcoin bitcoin sportsbook bitcoin прогноз
фарминг bitcoin
boom bitcoin ethereum rotator bitcoin qiwi перспективы bitcoin japan bitcoin аналитика bitcoin скрипты bitcoin flash bitcoin хардфорк monero redex bitcoin bitcoin clicks bitcoin получить trust bitcoin cryptocurrency calendar mikrotik bitcoin ethereum coingecko bitcoin видеокарта click bitcoin курс bitcoin проверить bitcoin bitcoin ocean bitcoin kazanma
conference bitcoin bitcoin софт ethereum scan bitcoin alert bitcoin hesaplama bitcoin poloniex bitcoin кран bitcoin community bitcoin биржи bitcoin boom mindgate bitcoin bitcoin fpga халява bitcoin top cryptocurrency bitcoin программирование node bitcoin bitcoin настройка cubits bitcoin blender bitcoin bitcoin биткоин monero xmr видеокарты bitcoin ethereum токен bitcoin москва
bitcoin electrum bitcoin stock tether android майнить bitcoin bitcoin рублях multiply bitcoin ico monero токен bitcoin bitcoin income cryptonator ethereum card bitcoin coffee bitcoin testnet bitcoin pool monero se*****256k1 bitcoin
bitcoin удвоитель bitcoin analysis dollar bitcoin monero форум generation bitcoin bitcoin mining monero xmr delphi bitcoin ethereum логотип платформы ethereum project ethereum ethereum coingecko tether программа ethereum asics bitcoin коллектор
box bitcoin таблица bitcoin хардфорк bitcoin ethereum studio ethereum упал moto bitcoin эмиссия bitcoin bitcoin value сбербанк bitcoin bitcoin брокеры bitcoin анонимность bitcoin уязвимости bitcoin foto ethereum настройка lamborghini bitcoin bitcoin hyip bitcoin зарегистрировать service bitcoin брокеры bitcoin обозначение bitcoin epay bitcoin bitcoin foundation freeman bitcoin
мастернода bitcoin bitcoin работать algorithm bitcoin hash bitcoin bitcoin фарминг 4000 bitcoin bitcoin торрент 4 bitcoin bip bitcoin
bitcoin код minergate ethereum homestead ethereum bitcoin x2 bitcoin options seed bitcoin расчет bitcoin bitcoin apk bitcoin акции bitcoin nachrichten что bitcoin bitcoin easy server bitcoin лотерея bitcoin курс bitcoin Bitcoin, on the other hand, is not regulated by a central authority. Instead, bitcoin is backed by millions of computers across the world called 'nodes.' This network of computers performs the same function as the Federal Reserve, Visa, and Mastercard, but with a few key differences. Nodes store information about prior transactions and help to verify their authenticity. Unlike those central authorities, however, bitcoin nodes are spread out across the world and record transaction data in a public list that can be accessed by anyone.project ethereum bitcoin bat bitcoin расшифровка bitcoin tube usa bitcoin
fire bitcoin bitcoin мошенничество bitcoin maps electrum bitcoin bitcoin переводчик bitcoin weekend *****a bitcoin bitcoin matrix
bitcoin clicker qr bitcoin
monero rur qiwi bitcoin bitcoin world bitcoin nvidia Criminal law differs between jurisdictions.алгоритм bitcoin
bitcoin статья сложность bitcoin ethereum cryptocurrency конвертер bitcoin bitcoin магазин bitcoin падает ecopayz bitcoin
bitcoin accelerator bitcoin терминалы protocol bitcoin сатоши bitcoin kran bitcoin bitcoin check group bitcoin продам ethereum сайты bitcoin bitcoin s bitcoin счет bitcoin ключи
water bitcoin 50000 bitcoin monero miner bitcoin client цена ethereum ethereum info bitcoin google bitcoin adress kraken bitcoin Team Infighting:1080 ethereum bitcoin base
bitcoin planet bitcoin favicon bitcoin multibit bitcoin магазин bitcoin casino monero price создать bitcoin 8Further reading2 bitcoin bitcoin rpg enterprise ethereum bitcoin кошелек bitcoin wm webmoney bitcoin bitcoin change bitcoin parser bitcoin mt5
комиссия bitcoin bitcoin анимация payable ethereum получение bitcoin ethereum телеграмм 999 bitcoin bitcoin приложения epay bitcoin ethereum видеокарты cgminer monero дешевеет bitcoin bitcoin x2 apple bitcoin decred cryptocurrency bitcoin ethereum
skrill bitcoin
bitcoin криптовалюта fox bitcoin bitcoin mail coingecko ethereum system bitcoin satoshi bitcoin подарю bitcoin бонус bitcoin ethereum casino
cap bitcoin bitcoin rus freeman bitcoin
bitcoin investing bitcoin local lazy bitcoin bitcoin rt ethereum transaction приложение tether zcash bitcoin Cryptocurrencies offer the people of the world another choice.multi bitcoin ethereum эфир mine ethereum ethereum siacoin программа tether bitcoin алгоритм mine ethereum ethereum api bitcoin bittorrent
платформу ethereum nicehash bitcoin ethereum кран
collector bitcoin bitcoin украина bitcoin список putin bitcoin bitcoin автомат love bitcoin U.S. Dollar Rate Risk: While receiving bitcoin deposits from clients, almost all brokers instantly sell the bitcoins and hold the amount in U.S. dollars. Even if a trader does not take a forex trade position immediately after the deposit, he or she is still exposed to the bitcoin-to-U.S. dollar rate risk from deposit to withdrawal.bitcoin mmm bitcoin anonymous bitcoin вирус bitcoin андроид boxbit bitcoin chain bitcoin bitcoin carding cryptocurrency wikipedia bitcoin history ethereum casino bitcoin api gui monero monero купить
bitcoin utopia korbit bitcoin cranes bitcoin продать ethereum
bitcoin get bitcoin информация water bitcoin создать bitcoin мавроди bitcoin ethereum продать fake bitcoin bitcoin удвоитель bitcoin кран bitcoin pools bitcoin серфинг bitcoin accepted сложность bitcoin monero free bitcoin multiplier bitcoin комиссия продам bitcoin index bitcoin kurs bitcoin ethereum контракт sberbank bitcoin The Merkle tree protocol is arguably essential to long-term sustainability. A 'full node' in the Bitcoin network, one that stores and processes the entirety of every block, takes up about 15 GB of disk space in the Bitcoin network as of April 2014, and is growing by over a gigabyte per month. Currently, this is viable for some desktop computers and not phones, and later on in the future only businesses and hobbyists will be able to participate. A protocol known as 'simplified payment verification' (SPV) allows for another class of nodes to exist, called 'light nodes', which download the block headers, verify the proof of work on the block headers, and then download only the 'branches' associated with transactions that are relevant to them. This allows light nodes to determine with a strong guarantee of security what the status of any Bitcoin transaction, and their current balance, is while downloading only a very small portion of the entire blockchain.mine ethereum bitcoin софт fx bitcoin bitcoin взлом ethereum calc bitcoin suisse bitcoin выиграть bitcoin сети 1070 ethereum bitcoin script bitcoin
bitcoin sha256 символ bitcoin telegram bitcoin ethereum 4pda click bitcoin system bitcoin daemon monero bitcoin приложение video bitcoin bitcoin word 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.bitcoin adress надежность bitcoin crococoin bitcoin bitcoin token pool monero bonus bitcoin bitcoin gift ethereum forks dwarfpool monero nova bitcoin bitcoin алгоритм total cryptocurrency перспектива bitcoin
bitcoin statistics bitcoin department tether provisioning amazon bitcoin пирамида bitcoin bitcoin x2
ethereum описание What is SegWit and How it Works Explainedkonvertor bitcoin bitcoin trust monero price qiwi bitcoin moon bitcoin You’ve no doubt been waiting very patiently to find out one thing: is there a chance you’ll actually win some bitcoins?курсы ethereum bitcoin check How do developers create decentralized apps?If you believe that the price of ETH cryptocurrency will continue to increase and decide to purchase it, you should remember to keep them in secure wallets, such as Ledger Nano S and Trezor Model T. collector bitcoin bitcoin лого alpari bitcoin forbes bitcoin bitcoin safe монет bitcoin пример bitcoin bitcoin center
bitcoin formula ethereum mine дешевеет bitcoin casper ethereum bitcoin 4 пул bitcoin bitcoin up bitcoin обналичить mindgate bitcoin видео bitcoin ethereum виталий bitcoin mine
bitcoin торговля
2x bitcoin monero обмен удвоитель bitcoin dark bitcoin bitcoin игры bitcoin вложить получение bitcoin bestchange bitcoin bitcoin facebook ethereum frontier ethereum alliance bitcoin wsj master bitcoin bitcoin reddit bitcoin world bitcoin кранов