The blockstore
module provides functions for parallel verification of the
Proof of History ledger as well as iterative read, append write, and random
access read to a persistent file-based ledger.
The blockstore_cleanup_service
drops older ledger data to limit disk space usage.
The service works by counting the number of live data shreds in the ledger; this
can be done quickly and should have a fairly stable correlation to actual bytes.
Once the shred count (and thus roughly the byte count) reaches a threshold,
the services begins removing data in FIFO order.
The blockstore_metric_report_service
periodically reports ledger store metrics.
The shred
module defines data structures and methods to pull MTU sized data frames from the
network. There are two types of shreds: data and coding. Data shreds contain entry information
while coding shreds provide redundancy to protect against dropped network packets (erasures).