Skip to content

SimulationBuilder::storage_fault_mask, mirroring network_fault_mask #292

Closed

Description

@PierreZ

Downstream: PierreZ/paros#176 (run every paros role on moonpool-journal stores under at least the in-memory world's chaos) and PierreZ/paros#202. References: moonpool 9ed1360, paros 29b23e3.

Downstream evidence. paros wants Chaos::Storage(ChaosMode::Swarm) on its acceptors' moonpool-journal
stores (paros#176). Two families must not run:

  • PhantomWrite can drop both writes of one append: the entry write and the slot write. Those records were
    acknowledged, so the next open reads a torn tail and an acknowledged Paxos vote is silently forgotten. One
    forgotten vote breaks quorum intersection, which a replicated pattern cannot prevent (CTRL's Figure 2 bug). See
    moonpool-sim/src/storage/config.rs:480 (random_for_seed draws it) and :526 (apply_swarm_mask may keep it).
    On the paros side, the journal folds accepts at crates/paros/src/journal/node.rs:153-230.
  • DiskFailure: paros has no storage watchdog yet, and a failed disk survives recovery mode.

Today the only storage switch is all or nothing (Chaos::Storage); network has
network_fault_mask (runner/builder.rs:637, applied at :1274).

Smallest API. SimulationBuilder::storage_fault_mask(StorageFaultMask::all().without(StorageFault::PhantomWrite)).
It works like NetworkFaultMask: one variant per family in StorageConfiguration, and it zeroes the masked
probabilities.

Determinism. Apply the mask after Random/Swarm sampling and after apply_buggify_knobs, immediately before
set_storage_config (builder.rs:1243-1290), exactly where the network mask goes. It consumes no draws, so
recipes and replay are unchanged, and the default mask is inert.

Acceptance. In crates/moonpool-sim/tests/storage, over N seeds with Chaos::Storage(Swarm) + BuggifyKnobs
and the phantom family masked, take_storage_fault_records() never holds PhantomWrite. The RNG call count of
each seed is identical with and without the mask.

Activity

  1. added 10 commits that reference this issue on Oct 5, 2026
    fb8a030
    c0a203f
    6b4c50a
    a614d42
    3456e1a
    d914eab
    dbe9b76
    c8943dc
    540943c
    e6a1884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions