Page MenuHomeSource World

Reference-counted Trie collection

Authored by sorpaas on Jan 12 2018, 3:00 PM.



This new TrieCollection interface allows storing and fetching multiple unrelated
tries, such as in the case of normal Ethereum blockchain storage, in the same
database. For the situation where multiple tries form a directed graph, it is
recommended to directly use the raw interface to avoid RC overhead.

The interface also doesn't contain locking, but can be easily extended. For example,
one might want to open and apply multiple storage tries while at the same time, deal
with one state trie. In this case, one can use a locking variant of the DatabaseMut
trait and create one database instance for state trie, and another for all storage

Diff Detail

rELIB rust-ethereum
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sorpaas created this revision.Jan 12 2018, 3:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 12 2018, 3:01 PM
This revision was automatically updated to reflect the committed changes.