You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moonpool-journal: expose where an entry lives on disk, for targeted fault injection #289
paros now runs every simulated node and matchmaker on moonpool-journal (PierreZ/paros#176). Its fault injector damages specific journal entries at boot: rot one accepted record, garble its identifier too, zero it (a lost write), overwrite its header (a misdirected write), tear the last batch. It must aim at an entry by its far identifier (index, epoch, tag).
The journal does not say where an entry lives. So the harness (crates/paros-sim/src/world/journal_files.rs) parses the on-disk format documented in the crate docs: segment names, the slot table at 8 KiB, the slot and entry header fields. That works, but it duplicates the layout outside the crate. It also breaks silently if the format version changes.
Smallest API asked for
A read-only locator, behind a feature or on Journal itself:
pubstructEntryLocation{pubpath:String,// the segment filepubslot:Range<u64>,// the identifier's bytes in that filepubentry:Range<u64>,// header + payload bytespubid:EntryId,pubbatch_start:bool,}impl<P:StorageProvider>Journal<P>{/// Where every live entry is on disk.pubfnlocations(&self) -> Vec<EntryLocation>;}
Or a free function that scans a closed journal directory without opening (and so without repairing) it. A closed scan is what an injector wants at boot: it damages the bytes before the store's own open reads them.
Determinism
Read-only, no randomness, no clock. Same I/O through the provider as a normal open.
Acceptance
The locator agrees with Recovery on which index a damaged entry is reported at.
A test damages each location's entry range and gets the entry in Recovery::corrupt. Damaging both ranges gets a DoubleFault.
paros deletes its own parser once the pin advances.
Also worth deciding (separate, smaller)
scan::decide refuses (bad entry, bad slot) as a double fault anywhere, the last batch included. Under the default crash model (a sector kept old or new) a 64-byte slot never tears, so this does not happen today. With shorn_write_probability or a garbage fill it could: a crash during the last batch's unsynced write would then leave a node that never boots again, although nothing was acknowledged. A torn identifier in the last batch could be treated as the end of the log.
The "also worth deciding" note (a torn identifier in the last batch refused as a DoubleFault) was not part of PR #291. It now has its own issue, together with the reserved-slot rule it depends on: #300.
Activity
PierreZ commentedon Oct 5, 2026
The "also worth deciding" note (a torn identifier in the last batch refused as a
DoubleFault) was not part of PR #291. It now has its own issue, together with the reserved-slot rule it depends on: #300.Generated by Claude Code