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.
bitcoin оплатить конвертер monero форк bitcoin криптовалюта monero bitcoin tools all bitcoin bitcoin machines bitcoin 2x bistler bitcoin bitcoin dark
bitcoin bcn
таблица bitcoin monero pools bitrix bitcoin ethereum web3 bitcoin explorer bitcoin etf bitcoin проблемы bitcoin fields bitcoin froggy x2 bitcoin delphi bitcoin
2x bitcoin карты bitcoin
ethereum валюта carding bitcoin cryptocurrency price bitcoin forum bitcoin оплатить
lurkmore bitcoin cryptocurrency price bitcoin click стоимость bitcoin raiden ethereum майнинга bitcoin
запуск bitcoin explorer ethereum рейтинг bitcoin bitcoin 10000 bitcoin airbit blockchain monero bitcoin bear bitcoin suisse tether wifi динамика ethereum algorithm ethereum скрипты bitcoin прогноз ethereum bubble bitcoin ledger bitcoin bitcoin safe antminer bitcoin
bitcoin analytics bitcoin форум apk tether bitcoin 50 bitcoin alien monero client bitcoin update иконка bitcoin bitcoin автоматом
prune bitcoin instant bitcoin bitcoin это комиссия bitcoin
ethereum акции ethereum клиент email bitcoin bitcoin motherboard cgminer monero
bitcoin coinmarketcap windows bitcoin Non-fungible tokensbitcoin tradingview DeFi: decentralized finance (DeFi) is the term for the array of financial applications built on top of ethereum.ethereum сбербанк работа bitcoin get bitcoin
client ethereum куплю bitcoin ethereum io app bitcoin cryptocurrency bitcoin cranes bitcoin bitcoin wordpress Is Monero Illegal?boxbit bitcoin siiz bitcoin
bitcoin is bitcoin payeer cryptocurrency calendar qr bitcoin monero miner блокчейна ethereum monero xeon bitcoin пицца maps bitcoin bitcoin алгоритмы blockchain bitcoin bitcoin заработок сложность bitcoin
пулы bitcoin кран bitcoin
monero free bitcoin rus Valid transaction nonce. Recall that the nonce of an account is the count of transactions sent from that account. To be valid, a transaction nonce must be equal to the sender account’s nonce.wallet tether
nicehash monero bitcoin daemon криптовалюта tether magic bitcoin
tera bitcoin token bitcoin bitcoin webmoney ethereum asics bitcoin valet
bitcoin usa ethereum валюта bitcoin book mooning bitcoin bitcoin заработок bitcoin компьютер bitcoin people loan bitcoin casinos bitcoin
bye bitcoin free ethereum cryptocurrency calendar
bitcoin раздача
bitcoin сегодня auto bitcoin difficulty ethereum ethereum torrent bitcoin трейдинг bitcoin pps bitcoin generator ethereum токены майнер monero видео bitcoin finney ethereum rotator bitcoin paidbooks bitcoin bitcoin расшифровка токен ethereum mining bitcoin get bitcoin all cryptocurrency ubuntu bitcoin отзыв bitcoin monero криптовалюта blocks bitcoin
bitcoin автосерфинг bitcoin qr hyip bitcoin zona bitcoin краны ethereum bitcoin escrow
bitcoin playstation bitcoin автомат daemon bitcoin bitcoin монета
wallets cryptocurrency
работа bitcoin ethereum russia bitcoin payoneer bitcoin server ферма bitcoin bitcoin рублей bitcoin ферма blogspot bitcoin валюта monero ethereum telegram
goldsday bitcoin bitcoin vpn bitcoin millionaire tether ethereum crane bitcoin прогноз bitcoin monkey обвал bitcoin форум bitcoin stock bitcoin Should I buy Ethereum: a Litecoin on a black keyboard.Mining poolsCoinBasebitcoin банкнота bitcoin main ultimate bitcoin bitcoin capital bitcoin genesis bitcoin 4 instant bitcoin bitcoin joker bitcoin инструкция bitcointalk monero coingecko bitcoin bitcoin ферма сайты bitcoin tether 2 разработчик bitcoin калькулятор ethereum Much of the Ethereum mining power is concentrated in the hands of just a few mining pools. As of December 2020, Sparkpool, Ethermine, and f2pool2 make up more than 50% of the total mining power.транзакции bitcoin
bitcoin прогноз bitcoin anonymous bitcoin girls cubits bitcoin bitcoin investing bitcoin fasttech monero сложность system bitcoin coingecko ethereum accepts bitcoin ethereum токены ethereum mining bitcoin создать
bitcoin исходники mastercard bitcoin ethereum forum daily bitcoin bitcoin paper 8 bitcoin iso bitcoin акции ethereum
java bitcoin bitcoin fpga портал bitcoin ethereum форк cryptocurrency forum ethereum покупка bitcoin prune bitcoin store monero калькулятор
bitcoin circle bitcoin de clockworkmod tether
система bitcoin ethereum serpent bus bitcoin shot bitcoin Bitcoin, often abbreviated by the ticker symbol BTC, was the first example of what we now call a cryptocurrency. Cryptocurrencies are a growing asset class that shares some characteristics with traditional currencies except they are purely digital, and creation and ownership verification is based on cryptography.bitcoin x2 config bitcoin ethereum видеокарты ethereum blockchain bitcoin android
conference bitcoin polkadot ico bitcoin рублях
bitcoin jp bitcoin терминал
перспектива bitcoin monero обменник
криптовалюты bitcoin loan bitcoin разработчик bitcoin bitcoin упал bitcoin lion bitcoin блок bitcoin money trezor ethereum bitcoin торги форум bitcoin bitcoin accepted monero валюта polkadot ico криптовалюта bitcoin bitcoin database
bitcoin 123 seed bitcoin nvidia bitcoin криптовалюту bitcoin ethereum картинки
bitcoin x2 транзакции monero bitcoin security bitcoin banks bitcoin converter bitcoin plugin лотерея bitcoin bitcoin scripting fasterclick bitcoin bitcoin center ninjatrader bitcoin earnings bitcoin bitcoin airbit secp256k1 ethereum bitcoin clouding лотерея bitcoin криптовалюту monero суть bitcoin bitcoin bat 2x bitcoin bitcoin монет ethereum ethash купить bitcoin bitcoin trend bitcoin cryptocurrency запрет bitcoin r bitcoin wallets cryptocurrency платформы ethereum poloniex monero kupit bitcoin
purchase bitcoin bitcoin account bitcoin x2
bitcoin india ethereum кран polkadot stingray lazy bitcoin описание bitcoin кран ethereum bitcoin комбайн 999 bitcoin bitcoin сервера bitcoin вложить monero wallet bitcoin ishlash korbit bitcoin bitcoin dump create bitcoin bitcoin транзакции bitcoin иконка bitcoin машины bitcoin token china bitcoin
Academic studiesethereum скачать bitcoin dark bitcoin exe продаю bitcoin работа bitcoin отзыв bitcoin blog bitcoin bitcoin twitter bitcoin hosting kinolix bitcoin testnet bitcoin car bitcoin 1070 ethereum
bitcoin miner основатель bitcoin цена ethereum
raiden ethereum games bitcoin trading bitcoin bitcoin 20 bitcoin statistic
форк ethereum
bitcoin exchanges код bitcoin bitcoin keywords вклады bitcoin 7. Workersbitcoin euro bag bitcoin bitcoin investment monero сложность ann bitcoin bitcoin passphrase cryptocurrency gold bitcoin матрица usdt tether tor bitcoin ферма ethereum сложность bitcoin ethereum charts bitcoin price bitcoin разделился 10 bitcoin теханализ bitcoin криптовалюту monero
монета bitcoin bitcoin poloniex
bitcoin окупаемость bitcoin history ethereum rig
ethereum os валюта tether konvert bitcoin bitcoin cz курс ethereum bitcoin roulette moto bitcoin
bitcoin рухнул laundering bitcoin bitcoin system bazar bitcoin bitcoin pps hyip bitcoin bitcoin koshelek plasma ethereum верификация tether bitcoin mining bitcoin local bitcoin pay create bitcoin
математика bitcoin ethereum обменять bitcoin golden p2pool ethereum which gave the investor the right to share in the profits of a voyage in themonero hashrate bitcoin кредит bitcoin knots bitcoin accelerator iso bitcoin
4000 bitcoin зарабатывать bitcoin advcash bitcoin ethereum swarm mine monero ads bitcoin bitcoin elena bitcoin получить bitcoin машины bitcoin yen btc ethereum ethereum стоимость Several news outlets have asserted that the popularity of bitcoins hinges on the ability to use them to purchase illegal goods. Nobel-prize winning economist Joseph Stiglitz says that bitcoin's anonymity encourages money laundering and other crimes.bitcoin wm скачать bitcoin bitcoin alpari r bitcoin bitcoin click ethereum стоимость bitcoin ммвб bitcoin пулы обменять monero bitcoin de ethereum клиент bitcoin habr casper ethereum ethereum wallet up bitcoin blog bitcoin bitcoin development торги bitcoin bitcoin buying
foto bitcoin day bitcoin takara bitcoin pizza bitcoin bitcoin best bitcoin майнер bitcoin mine monero usd In 2015, The Economist described these criticisms as unfair, since bitcoin had been relatively stable during that year, and the shady image may have compelled users to overlook the capabilities of the blockchain technology.регистрация bitcoin wmx bitcoin bitcoin луна total cryptocurrency bitcoin free minecraft bitcoin block bitcoin love bitcoin ethereum клиент bitcoin проект bitcoin traffic bitcoin зебра mt5 bitcoin amazon bitcoin bitcoin pools калькулятор bitcoin bitcoin знак monero 1060 bitcoin кран bitcoin кран bitcoin converter register bitcoin ethereum info difficulty monero tether пополнить ethereum клиент bitcoin bonus bitcoin hesaplama bitcoin mmgp bitcoin купить bitcoin cap cpp ethereum bitcoin is cryptocurrency capitalisation выводить bitcoin cc bitcoin monero форк tether limited nicehash monero bitcoin деньги иконка bitcoin ethereum telegram
blacktrail bitcoin ann bitcoin bitcoin hype red bitcoin bitcoin матрица ethereum online tails bitcoin ethereum покупка bitcoin xl динамика ethereum btc bitcoin
теханализ bitcoin ethereum cryptocurrency
ethereum coins bitcoin india форум ethereum bitmakler ethereum автомат bitcoin bitcoin скрипт cryptocurrency mining bitcoin capitalization bitcoin global компания bitcoin
bitcoin eu byzantium ethereum connect bitcoin
bitcoin kraken supernova ethereum часы bitcoin best bitcoin bitcoin chains doge bitcoin bitcoin monkey metatrader bitcoin
In case, after reading this guide, you decide to choose an easier way to get cryptocurrencies, you should make sure to go for the most reliable cryptocurrency exchanges, such as Coinbase and Binance. Also, keep your assets in secure hardware wallets at all times! A Short Explanation of How to Mine Bitcoin