Expand description
File-based event buffer for offline reliability.
Events are stored as JSON files in a buffer directory when the transport is unavailable, then replayed when connectivity is restored.
Each file is a unit: one send batch, so a Merkle-signed batch (#392)
stays together with the statement and proofs its events carry. Events
are signed before they are buffered, so editing a buffered event breaks
its signature or proof. Unit names carry a zero-padded timestamp and
counter, and units are read back in the order written, so replay can
forward them strictly in order (#395). An unreadable unit is moved to
rejected/ so it cannot block the queue.
Structsยง
- Buffered
Event - A buffered event with its file path.
- Buffered
Unit - One buffered unit: the events written together, in order.
- File
Buffer - File-based event buffer.