Skip to main content

Module stores

Module stores 

Source
Expand description

The native stores of a node, each in its own directory and opened at its authority (durable-records, Table I): the one layout the daemon and the FFI provider share.

<data>                  DHT data store            Disposable      configured budget
<data>/../relay-inbox        relay carriers       Retained        RELAY_INBOX_STORAGE_CAPACITY
<data>/../dht-removals       remove sides         Retained      DHT_REMOVAL_STORAGE_CAPACITY
<data>/../transaction-replay replay windows       Authoritative   TRANSACTION_REPLAY_STORAGE_CAPACITY
<data>/../onion-entry-guards entry guards         DurableCache    ONION_ENTRY_GUARD_STORAGE_CAPACITY
<measure>               peer measurements         Disposable      configured budget
<measure>/../provisional-evidence                 Disposable      the measure budget

Every store beside the data or the measure store is a sibling directory of it (sibling_storage_path). Each store locks its own directory at open (#1039), so a second daemon or FFI provider given a store an open node holds fails to open it, with StorageDirectoryLocked, instead of writing beside it.

Re-exports§

pub use crate::consts::DHT_REMOVAL_STORAGE_CAPACITY;
pub use crate::consts::ONION_ENTRY_GUARD_STORAGE_CAPACITY;
pub use crate::consts::RELAY_INBOX_STORAGE_CAPACITY;
pub use crate::consts::TRANSACTION_REPLAY_STORAGE_CAPACITY;

Structs§

NodeStores
Every native store of a node, opened at its authority (module docs).

Constants§

DATA_STORAGE_DIR
Directory of the DHT data store under a storage root (NodeStores::open_under).
DHT_REMOVAL_STORAGE_DIR
Directory of the store of the data namespace’s remove sides, beside the data store.
MEASURE_STORAGE_DIR
Directory of the measure store under a storage root (NodeStores::open_under).
ONION_ENTRY_GUARD_STORAGE_DIR
Directory of the onion entry-guard store, beside the data store.
PROVISIONAL_EVIDENCE_STORAGE_DIR
Directory of the provisional-evidence store, beside the measure store.
RELAY_INBOX_STORAGE_DIR
Directory of the relay-inbox store, beside the data store.
TRANSACTION_REPLAY_STORAGE_DIR
Directory of the transaction replay store, beside the data store.

Functions§

sibling_storage_path
The path of the store directory dir beside the store at storage_path: in its parent, or in the working directory when it has none (pure).