mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-28 20:00:43 +00:00
By introducing the "shared rocksdb instance" concept to the backend, we can remove the "piggybacking" mode , thus reducing the complexity of database initialisation and opening the possibility of extending how write batching works across kvt/aristo. The change makes explicit the hidden shared state that was previously hiding in closures and provides the first step towards simplifying the "commit/persist" interface of coredb, preparing it for optimizations to reduce the "layering tax" that `forked-layers` introduced.
Core database
Layout of CoreDb
descriptor objects
Objects dependence:
CoreDbRef -- Base descriptor
| | |
| | +--- CoreDbCtxRef -- Context descriptor
| | | | | |
| | | | | +--- CoreDbKvtRef -- Key-value table
| | | | |
| | | | +----- CoreDbMptRef -- Generic MPT
| | | |
| | | +------- CoreDbAccRef -- Accounts database
| | |
| | +--------- CoreDbTxRef -- Transaction handle
| |
| +----- CoreDbCtxRef
| : : : :
|
+------- CoreDbCtxRef
: : : :