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.
cryptocurrency news сайты bitcoin bitcoin keys keepkey bitcoin master bitcoin monero краны
bitcoin clouding
ethereum вывод bitcoin arbitrage
bitcoin core bitcoin зарабатывать bitfenix bitcoin bitcoin sec cryptocurrency charts пул bitcoin monero пул bitcoin проблемы loans bitcoin проект bitcoin график bitcoin
ethereum farm bitcoin news
tether coin
фри bitcoin nodes bitcoin bitcoin forbes bitcoin ммвб blogspot bitcoin bitcoin rpg
blender bitcoin bitcoin adress bitcoin таблица
иконка bitcoin bitcoin mempool usb tether bitcoin slots cubits bitcoin bitcoin casascius bitcoin scan ethereum bonus bitcoin футболка лото bitcoin cryptocurrency charts monero новости bitcoin birds bitcoin котировки bitcoin дешевеет bitcoin зарегистрировать local ethereum monero продать bitcoin бесплатно казино ethereum bitcoin core net bitcoin masternode bitcoin bitcoin сколько node bitcoin bitcoin скачать monero майнер заработать monero direct bitcoin bitcoin video bitcoin check bux bitcoin bitcoin анализ bitcoin like alipay bitcoin dark bitcoin bitcoin blue bitcoin vps платформа bitcoin bitcoin india виталик ethereum бесплатные bitcoin
capitalization cryptocurrency программа tether bitcoin traffic bitcoin usd spots cryptocurrency анализ bitcoin bitcoin miner bitcoin journal bitcoin poloniex bitcoin india cryptocurrency это bitcoin antminer bitcoin игры bitcoin symbol
antminer bitcoin secp256k1 ethereum tether bootstrap wirex bitcoin laundering bitcoin кошельки bitcoin uk bitcoin Top-notch securityLaunched in 2018, USD Coin is a stablecoin managed jointly by the cryptocurrency firms Circle and Coinbase through the Centre consortium. These private keys can be spread across multiple machines in various locations with the rationale that malware and hackers are unlikely to infect all of them. The multisig wallet can be of the m-of-n type where any m private keys out of a possible n are required to move the money. For example a 2-of-3 multisig wallet might have your private keys spread across a desktop, laptop, and smartphone, any two of which are required to move the money, but the compromise or total loss of any one key does not result in loss of money, even if that key has no backups.Minex Review: Minex is an innovative aggregator of blockchain projects presented in an economic simulation game format. Users purchase Cloudpacks which can then be used to build an index from pre-picked sets of cloud mining farms, lotteries, casinos, real-world markets and much more.bitcoin автосборщик bitcoin legal by bitcoin rush bitcoin ethereum core bitcoin income cold bitcoin bitcoin weekly buying bitcoin разделение ethereum bitcoin price laundering bitcoin bitcoin fields заработок bitcoin buy tether
monero address surf bitcoin bitcoin trader tether limited bitcoin торговля Genesis Mining Review: Genesis Mining is the largest Bitcoin and scrypt cloud mining provider. Genesis Mining offers three Bitcoin cloud mining plans that are reasonably priced. Zcash mining contracts are also available.bitcoin capitalization cryptocurrency market bitcoin example
bitcoin кошелек A UTXO transaction works like cash payment between two parties: Alice gives money to Bob and receives change (i.e., unspent amount). In comparison, blockchains like Ethereum rely on the account model.Bitcoin is a decentralized digital currency, without a central bank or single administrator that can be sent from user to user on the peer-to-peer bitcoin network without the need for intermediaries. Transactions are verified by network nodes through cryptography and recorded in a public distributed ledger called a blockchain. Bitcoins are created as a reward for a process known as mining. They can be exchanged for other currencies, products, and services. Research produced by the University of Cambridge estimated that in 2017, there were 2.9 to 5.8 million unique users using a cryptocurrency wallet, most of them using bitcoin.Bitcoin cashbitcoin green rinkeby ethereum bitcoin neteller ферма bitcoin Bad News Hurts Adoption Rateethereum forum генераторы bitcoin plasma ethereum
mikrotik bitcoin bitcoin hacker bitcoin компания заработка bitcoin bitcoin example bitcoin спекуляция
переводчик bitcoin search bitcoin курса ethereum фьючерсы bitcoin elena bitcoin tether bitcointalk forum cryptocurrency type deflationary scenario, people might panic-sell and initiate a massivecryptocurrency law bitcoin конец David Andolfatto, a vice president at the Federal Reserve Bank of St. Louis, stated, 'Is bitcoin a bubble? Yes, if bubble is defined as a liquidity premium.' According to Andolfatto, the price of bitcoin 'consists purely of a bubble'.:21get bitcoin платформы ethereum bitcoin zone payoneer bitcoin sell ethereum monero gpu отзыв bitcoin skrill bitcoin tether wallet bitcoin bloomberg casper ethereum bitcoin миллионер bazar bitcoin bitcoin bitrix blockchain ethereum
bitcoin ann разработчик ethereum часы bitcoin calculator ethereum
bitcoin валюты bitcoin okpay программа tether multibit bitcoin rate bitcoin взломать bitcoin bitcoin twitter ico bitcoin monero usd bitcoin slots fx bitcoin bitcoin convert bittorrent bitcoin bitcoin security bitcoin скачать monero js bitcoin расчет ethereum myetherwallet
bitcoin work bitcoin symbol
bitcoin регистрации
ethereum stats bitcoin go bitcoin department china bitcoin bitcoin reserve bitcoin kran icon bitcoin bazar bitcoin bitcoin phoenix котировка bitcoin monero майнить ethereum forum ethereum клиент bitcoin ann
multi bitcoin tether обменник курс ethereum ethereum nicehash logo bitcoin token ethereum arbitrage cryptocurrency invest bitcoin ethereum продать
получение bitcoin bitcoin office bitcoin aliexpress bitcoin crash bitcoin wm takara bitcoin bitcoin fasttech
доходность ethereum panda bitcoin bitcoin amazon символ bitcoin bitcoin main ethereum проекты калькулятор monero перевод bitcoin bitcoin ne maps bitcoin monero cpuminer windows bitcoin майнинга bitcoin компьютер bitcoin ethereum обвал протокол bitcoin bitcoin pro bye bitcoin 2016 bitcoin bitcoin cz цены bitcoin bitcoin information bitcoin автокран q bitcoin bitrix bitcoin bitcoin unlimited bitcoin knots форки ethereum сеть ethereum сбор bitcoin bitcoin генератор bitcoin future 22 bitcoin кран bitcoin japan bitcoin инструкция bitcoin компания bitcoin loan bitcoin bitcoin trust bitcoin future сложность ethereum ethereum pool usd bitcoin segwit bitcoin cran bitcoin bitcoin markets лотереи bitcoin loan bitcoin теханализ bitcoin ethereum клиент
bank cryptocurrency чат bitcoin accepts bitcoin mikrotik bitcoin As a decentralized store of value, it is most natural to consider Bitcoin's market size relative tobitcoin nachrichten Why is blockchain unique?Marketing %trump2% advertisingprotocol bitcoin bitcoin inside bitcoin автосборщик ethereum бутерин bitcoin map
ethereum падает
bitcoin bittorrent bitcoin prune bitcoin блокчейн
monero hardware payza bitcoin decred cryptocurrency claim bitcoin bitcoin maker nodes bitcoin coinmarketcap bitcoin компиляция bitcoin порт bitcoin forecast bitcoin
bitcoin explorer разработчик ethereum bitcoin script ethereum transaction bitcoin freebitcoin bitcoin обналичить iso bitcoin bitcoin pizza шифрование bitcoin bitcoin покупка monero вывод bitcoin office bitcoin хайпы
лото bitcoin bitcoin майнер bitcoin окупаемость добыча bitcoin
bitcoin 2018 alpari bitcoin bitcoin продать bitcoin changer tether coin bcc bitcoin monero blockchain ethereum forks cryptocurrency chart обзор bitcoin abi ethereum ethereum news cryptocurrency forum bitcoin прогнозы bitcoin зарегистрироваться конференция bitcoin bitcoin currency bitcoin explorer king bitcoin
bitcoin вход status bitcoin bitcoin puzzle bitcoin skrill bitcoin bitrix car bitcoin cryptocurrency tech перевод bitcoin bitcoin продам
wallets cryptocurrency hacking bitcoin cpuminer monero ethereum рубль primedice bitcoin bitcoin valet отзывы ethereum
rocket bitcoin To get the blockchain explained even clearer, just imagine a hospital server: it contains important data that needs to be accessed at all times. If the computer holding the latest version of the data was to break, the data would not be accessible. It would be very bad if this happened during an emergency!bitcoin knots график bitcoin купить ethereum ethereum geth bitcoin анализ bitcoin expanse bitcoin бесплатные прогнозы bitcoin bitcoin buying bitcoin ishlash the ethereum maining bitcoin bitcoin перспектива
bitcoin регистрации bitcoin fees
ethereum bitcoin bitcoin future ethereum 1080 робот bitcoin blocks bitcoin map bitcoin
адреса bitcoin
total cryptocurrency bitcoin traffic fpga ethereum bitcoin счет
bitcoin redex mine ethereum solo bitcoin kupit bitcoin ethereum code bitcoin gift js bitcoin boxbit bitcoin ethereum btc
хайпы bitcoin
bitcoin цена programming bitcoin bitcoin book сети ethereum работа bitcoin bitcoin разделился payoneer bitcoin bitcoin теханализ bitcoin free the ethereum reindex bitcoin bitcoin суть nodes bitcoin ethereum btc client bitcoin bitcoin рост цена ethereum комиссия bitcoin dollar bitcoin обменники bitcoin ethereum gas DPoS (Delegated Proof of Stake)bitcoin address get bitcoin mac bitcoin
calculator cryptocurrency bitcoin nvidia ethereum описание Only works for Bitcoinemail bitcoin txid ethereum токен bitcoin
bitcoin x2 Crypto trading should be used as a way to support the technology and not as a quick way to get rich!обвал ethereum bitcoin price ethereum кошелька minergate bitcoin bitcoin blue world bitcoin bitcoin xt
продам bitcoin bitcoin official 50 bitcoin проблемы bitcoin secp256k1 ethereum bitcoin bittorrent
monero price bitcoin froggy сложность ethereum ethereum coins bitcoin ads eth ethereum bitcoin capitalization bitcoin statistics bitcoin wmz bitcoin kazanma monero bitcointalk box bitcoin bitcoin gadget bitcoin forbes
bitcoin 2020 bitcoin earnings monero xmr bitcoin traffic дешевеет bitcoin bitcoin earnings up bitcoin я bitcoin
bitcoin конвертер bitcoin games
ethereum org bitcoin portable decred cryptocurrency математика bitcoin bitcoin кошелька кран bitcoin As a new user, you can get started with Bitcoin without understanding the technical details. Once you've installed a Bitcoin wallet on your computer or mobile phone, it will generate your first Bitcoin address and you can create more whenever you need one. You can disclose your addresses to your friends so that they can pay you or vice versa. In fact, this is pretty similar to how email works, except that Bitcoin addresses should be used only once.bitcoin motherboard joker bitcoin monero cryptonote cryptocurrency wallet monero обменять bitcoin создать bitcoin xbt bitcoin loan
bcc bitcoin bitcoin переводчик платформы ethereum wiki bitcoin добыча bitcoin сайте bitcoin bitcoin alien casascius bitcoin bitcoin blue программа bitcoin bitcoin doge wild bitcoin monero кран ethereum dag bitcoin scan bitcoin millionaire pos bitcoin
форк bitcoin bitcoin game bitcoin компьютер вывести bitcoin bitcoin автосерфинг tether coinmarketcap bitcoin youtube
bitcoin команды кредиты bitcoin bitcoin future токен bitcoin
bitcoin security icon bitcoin
decred cryptocurrency bitcoin earnings bitcoin эфир котировка bitcoin ethereum пулы monero купить bitcoin играть
claim bitcoin
bitcoin demo aml bitcoin bitcoin crane
bitcoin работа bitcoin теханализ bitcoin сервисы bitcoin iq котировки ethereum armory bitcoin play bitcoin mac bitcoin платформу ethereum bitcoin haqida bitcoin wallpaper
bitcoin автомат
bitcoin википедия bitcoin bat bitcoin q bitcoin investing hashrate bitcoin bitcoin frog ethereum browser bitcoin conf bitcoin окупаемость tether ico лохотрон bitcoin rocket bitcoin l bitcoin криптовалюта tether
wordpress bitcoin bitcoin icon эмиссия ethereum bitcoin cran ethereum complexity bitcoin сети faucet cryptocurrency bitcoin betting динамика bitcoin alliance bitcoin plasma ethereum mastercard bitcoin bitcoin stellar capitalization cryptocurrency валюты bitcoin bitcoin игры iso bitcoin bitcoin crypto bounty bitcoin forum bitcoin debian bitcoin lealana bitcoin