You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The disc space necessary to store state_network content in a key-value database will grow exponentially compared to history_network content. A database full of serialized Container<leaf, proof> will inevitably store duplicate proof hashes.
However the same volume of content can be available through instead storing and updating a set of sparse state tries, or more specifically - the necessary data to reconstruct, update, and generate proofs from a Trie.
Rationale
As a state_network node, our radius covers a range of account addresses. We aim to provide a view of recent state history for those accounts. Currently aiming to serve requests for the most recent 256 state roots.
By storing and updating sparse state tries for each of the 256 most recent state_roots, the node can increase its radius to include more accounts. The capacity to serve state_network content will grow at a rate higher than the actual size of the database, due to the sharing of proof hashes.
Design
TrieLevel
Implementation of ethereumjs/trie interface DB
Has attribute this.db that extends AbstractLevel (memory-level / browser-level)
State Network Database
TODO
Implement / Modify design for Contract Storage
Summary
The disc space necessary to store state_network content in a key-value database will grow exponentially compared to history_network content. A database full of serialized
Container<leaf, proof>
will inevitably store duplicate proof hashes.However the same volume of content can be available through instead storing and updating a set of sparse state tries, or more specifically - the necessary data to reconstruct, update, and generate proofs from a
Trie
.Rationale
As a state_network node, our radius covers a range of account addresses. We aim to provide a view of recent state history for those accounts. Currently aiming to serve requests for the most recent 256 state roots.
By storing and updating sparse state tries for each of the 256 most recent state_roots, the node can increase its radius to include more accounts. The capacity to serve state_network content will grow at a rate higher than the actual size of the database, due to the sharing of proof hashes.
Design
TrieLevel
ethereumjs/trie
interfaceDB
this.db
that extendsAbstractLevel
(memory-level / browser-level)new TrieLevel({ db?: AbstractLevel )}
Trie.create({ db: this.db })
this.db = Trie.database().db
Trie
EthereumJS/Trie
StateDB
StateProtocol.db: StateDB
state_root
toTrieLevel
this.sublevels: Map<state_root, TrieLevel>
Set
of known addresses in radiusthis.knownAddresses: Set<Address>
this.stateRootIndex: StateRootIndex
StateRootIndex
Purpose:
Use:
Protocol
StateProtocol
store
andretrieve
methods will interact with the StateDB methods, instead of the DBManager class used by HistoryNetwork.The text was updated successfully, but these errors were encountered: