Expand description
Ledger log: the first storage version of the Ledger Engine.
The open segment is current.xwle, an append-only file: the magic
XWLE\0\1, then records u32 length | u32 sequence | ledger. Every
ledger is flushed to disk immediately, since they arrive every few seconds.
A torn tail left by a crash is cut off.
Every segment_ledgers ledgers the log is compressed into
segments/led-<first>-<last>.xwle.zst and started afresh. The compressed
file is written first, then the log is removed.
Structs§
Functions§
- parse_
records - read_
journal - The whole log in a directory, decompressed, in order: sealed segments,
then the open log. Records from each come from
parse_records.
Type Aliases§
- Records
- Log records (sequence and serialized ledger), and where the last complete record ended.