vault backup: 2022-12-19 14:24:11

This commit is contained in:
Jet Hughes 2022-12-19 14:24:11 +13:00
parent c69c79ce7a
commit b8f106c077

View File

@ -52,4 +52,18 @@ Ethereum is a transaction based state machine.
Activities such as transactions, contracts, and minig all change the state of the ethereum blockchain.
e.g., an accout balance (stored in the state trie) which changes every time a transac
Data like account balances are not stored in the blocks of the chain. only the root node hashes of the transaction trie, staet trie ad receipts trie are stoed directly in the chain.
![](https://i.imgur.com/fIgNeUR.png)
There are two **types of data** stored in Ethereum. _Permanent_ (e.g., a transaction recorded in the transaction trie) and _Ephemeral_ (e.g., an account balance stored in the state trie) data.
## State Trie
contains a key and value pair for every account which exists on the eth network. The key is a 160 bit id. The value is the encoded details of an etherum account (nonce, balance, storageRoot, codeHash).
The root node (a hash of the entire tree) is dependent on all internal state trie data.
## Storage Trie
This is where the contract data lives. Each eth account has its own storage trie. this is stored as a hash of the storage trie's root node "storageRoot" in the global state trie
## Transaction Trie