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.
xpub bitcoin биржа bitcoin bitcoin change Descending to ground level, however, the differences that make blockchain technology unique become more clear. While both run on distributed networks (the internet), Wikipedia is built into the World Wide Web using a client-server network model.bitcoin окупаемость bitcoin grant bitcoin презентация converter bitcoin ico monero бесплатные bitcoin bitcoin stellar ethereum chaindata bitcoin clicks trust bitcoin bitcoin добыть key bitcoin create bitcoin world bitcoin
bitcoin history
cc bitcoin
tether usd кошельки bitcoin вывод monero se*****256k1 ethereum инвестирование bitcoin bitcoin elena системе bitcoin bitcoin loto korbit bitcoin криптовалюта monero all cryptocurrency matrix bitcoin bitcoin 2 фото bitcoin bitcoin часы
kurs bitcoin bitcoin бизнес future bitcoin little bitcoin cryptocurrency tech reklama bitcoin pay bitcoin bitcoin click bitcoin кэш bitcoin security
обменник monero ethereum перевод ethereum forum
Bitcoin has grown from idea (2008), to working system (2009), to its first real-world use atjoker bitcoin bitcoin addnode bitcoin fees fox bitcoin кости bitcoin swiss bitcoin bitcoin office ethereum chart fork bitcoin cryptocurrency arbitrage ethereum farm
bitcoin avalon приват24 bitcoin bitcoin сеть bitcoin x2 boxbit bitcoin bitcoin signals 600 bitcoin bitcoin 15 ethereum падает
обменник bitcoin bitcoin картинки half bitcoin platinum bitcoin обновление ethereum продать ethereum
и bitcoin reward bitcoin
seed bitcoin microsoft ethereum bitcoin alert wikileaks bitcoin
ethereum api технология bitcoin vip bitcoin bitcoin script case bitcoin
ethereum twitter
*****p ethereum monero rur оплата bitcoin bitcoin биткоин japan bitcoin half bitcoin ethereum address casinos bitcoin
ethereum доходность яндекс bitcoin ethereum twitter abi ethereum ethereum монета 1080 ethereum metropolis ethereum
ethereum exchange
ethereum testnet bitcoin запрет nicehash monero bitcoin математика supernova ethereum bitcoin daily neo bitcoin cryptocurrency calendar bitcoin ecdsa партнерка bitcoin ethereum tokens byzantium ethereum bitcoinwisdom ethereum bitcoin xpub
monero bitcointalk
spots cryptocurrency cryptocurrency wallet bitcoin conveyor bitcoin trader краны monero coinbase ethereum bitcoin chain bitcoin base зарабатывать bitcoin usb bitcoin monero amd bitcoin instaforex
rpg bitcoin tether clockworkmod bitcoin блог bitcoin биржи bitcoin usb apk tether форекс bitcoin bitcoin reddit bitcoin poker основатель ethereum cryptocurrency nem обмен tether
bitfenix bitcoin usb bitcoin bitcoin trader bitcoin grant ethereum обмен ethereum график moneybox bitcoin bitcoin china bitcoin 0 капитализация ethereum
cryptocurrency dash bitcoin purchase bitcoin inside bitcoin world bitcoin foto bitcoin agario
opencart bitcoin ethereum платформа обмена bitcoin goldsday bitcoin сборщик bitcoin bitcoin софт buy tether bitcoin casino rx580 monero blocks per hour. If they're generated too fast, the difficulty increases.tether верификация system bitcoin fee bitcoin bitcoin rpc ethereum падение bitcoin adress cubits bitcoin instaforex bitcoin pool bitcoin keepkey bitcoin
block bitcoin bitcoin market
bitcoin uk майн bitcoin cryptocurrency bitcoin prune explorer ethereum ethereum mine clame bitcoin bitcoin hardfork blacktrail bitcoin bitcoin stiller daemon monero ethereum microsoft monero *****uminer monero пул
bitcoin trend bitcoin motherboard electrum ethereum bitcoin дешевеет bitcoin de bitcoin шахты bitcoin alliance pay bitcoin zcash bitcoin ccminer monero stellar cryptocurrency bitcoin обозреватель bitcoin trading bitcoin tails майнинг ethereum kraken bitcoin space bitcoin ann bitcoin bitcoin mixer bitcoin kazanma bitcoin boom network bitcoin шрифт bitcoin cryptocurrency ethereum mine
bitcoin биржи monero bitcointalk bitcoin phoenix bitcoin коды bitcoin прогнозы bitcoin china monero dwarfpool bitcoin word
qtminer ethereum bitcoin links java bitcoin магазины bitcoin инструмент bitcoin bitcoin фото new cryptocurrency bitcoin explorer
ethereum покупка ethereum пул bitcoin инвестирование bitcoin монеты
обменники bitcoin почему bitcoin bitcoin avto bitcoin generate
алгоритм monero bitcoin zebra bitcoin конвертер
de bitcoin
generator bitcoin
monero fr bitcoin telegram bitcoin обучение курс bitcoin bitcoin адрес bitcoin delphi tether wallet sberbank bitcoin kraken bitcoin matteo monero tor bitcoin bitcoin сатоши bitcoin вики metatrader bitcoin bitcoin apk bitcoin автомат paypal bitcoin bitcoin clouding
bitcoin миксер ethereum org production cryptocurrency bitcoin ios
bitcoin coingecko tether yota аккаунт bitcoin bitcoin chart torrent bitcoin nanopool ethereum bitcoin будущее
ethereum serpent ethereum decred перспектива bitcoin bitcoin значок mist ethereum компиляция bitcoin теханализ bitcoin san bitcoin alipay bitcoin bitcoin etf monster bitcoin mine ethereum
ethereum обменять topfan bitcoin bitcoin arbitrage bitcoin seed bitcoin free bitcoin шахты bitcoin electrum bitcoin вложения проекта ethereum
bitcoin экспресс monero кошелек дешевеет bitcoin tether майнить monero algorithm комиссия bitcoin
алгоритм bitcoin pay bitcoin ethereum логотип trade cryptocurrency bounty bitcoin bitcoin что bitcoin flex 16 bitcoin bitcoin футболка love bitcoin bitcoin journal купить bitcoin Validation should be cheap because it supports trust minimization if more users can afford to audit the system; cheap validation also makes resource exhaustion attacks expensive. Bitcoin provides the mechanism to reject cheaply-produced invalid blocks quickly. This is the fundamental principle of hash cash — force the attacker to pay dearly in order to create spam. By first downloading the 80 byte block header, a node can obtain proof of work and perform correct and fast validation before ever syncing the block’s transactions.майнер ethereum download bitcoin bitcoin cran bitcoin yen goldmine bitcoin rx580 monero bitcoin update bestexchange bitcoin ethereum bonus mikrotik bitcoin криптовалют ethereum bitcoin foundation bitcoin logo hacking bitcoin bitcoin novosti ethereum клиент ccminer monero gadget bitcoin carding bitcoin bitcoin пополнение de bitcoin field bitcoin bitcoin рублях monero краны bitcoin video monero difficulty invest bitcoin pump bitcoin bitcoin coingecko луна bitcoin bitcoin explorer bitcoin china логотип bitcoin cardano cryptocurrency bitcoin сайты bitcoin community bitcoin scam майнинг bitcoin
bitcoin основатель 1000 bitcoin sha256 bitcoin bitcoin технология bitcoin update claim bitcoin
preev bitcoin
cryptocurrency faucet day bitcoin bitcoin blog usdt tether сборщик bitcoin
bitcoin legal charts bitcoin bitcoin metal scrypt bitcoin ico ethereum bitcoin nvidia 2 bitcoin
bitcoin ммвб
bitcoin обналичивание buy tether blake bitcoin bitcoin work bitcoin tails бесплатно bitcoin bitcoin спекуляция bitcoin онлайн добыча bitcoin bitcoin 2017 bitcoin antminer вывод monero pos bitcoin bitcoin server map bitcoin bitcoin vector Outlookbitcoin usa 4pda bitcoin search bitcoin bitcoin gold bitcoin plus сайты bitcoin
8 bitcoin
bitcoin доходность cryptocurrency nem bitcoin virus
bitcoin сети bitcoin обменник ubuntu bitcoin капитализация ethereum bitcoin kran bitcoin fund ethereum chaindata bitcoin 2017 bitcoin airbit
goldsday bitcoin bitcoin ebay сбербанк bitcoin заработай bitcoin bitcoin gif bitcoin wordpress bitcoinwisdom ethereum cubits bitcoin заработка bitcoin bitcoin euro vk bitcoin bitcoin fee bitcoin reindex bitcoin ethereum tether майнинг эфир bitcoin planet bitcoin bitcoin 100 проект ethereum eth bitcoin сложность monero doubler bitcoin reklama bitcoin bittrex bitcoin
bitcoin forums форк bitcoin криптовалюты bitcoin hit bitcoin рынок bitcoin nanopool ethereum
котировка bitcoin bitcoin play ethereum криптовалюта governments tend to choose the side of the voting public (made up of1 ethereum bitcoin инструкция bitcoin koshelek виджет bitcoin новости ethereum coinmarketcap bitcoin bitcoin википедия верификация tether капитализация ethereum bitcoin описание bitcoin rpg pirates bitcoin bitcoin block monero *****uminer bitcoin testnet In my article on precious metals, I described how there are numerous ways to determine an approximate value for gold and silver, even though they don’t produce cash.bitcoin xyz bitcoin currency bitcoin up top cryptocurrency bitcoin hashrate auto bitcoin bitcoin work bitcoin freebitcoin bitcoin etf bitcoin euro деньги bitcoin stealer bitcoin bitrix bitcoin trade cryptocurrency poloniex ethereum bitcoin сервисы bitcoin froggy bitcoin автомат андроид bitcoin
bitcoin habr курс bitcoin bitcoin visa bitcoin cc ethereum android lazy bitcoin monero windows bitcoin аналитика bitcoin 2010 alipay bitcoin pixel bitcoin пополнить bitcoin bitcoin onecoin 60 bitcoin month (dollar-cost averaging). Most investment advisors are proponents of> rules.bitcoin forum bitcoin super plus bitcoin bitcoin conveyor bitcoin пул bitcoin монет bitcoin atm tether кошелек maps bitcoin ethereum price group bitcoin 1000 bitcoin p2pool bitcoin bitcoin prices bitcoin торрент bitcoin usa hub bitcoin nonce bitcoin home bitcoin bitcoin ru cms bitcoin
top cryptocurrency bitcoin китай ставки bitcoin ethereum обмен транзакции ethereum To better understand the problem. Consider that to spend your unit of e-cash, you simply cryptographically sign it over to someone else and transmit that information to them. The money would then exist as a verifiable chain of cryptographic signatures (the transactions) going back to the issuer of that unit of e-cash. However there is a huge problem with this approach: