Expand description
:durability-check <ref> — the operator-facing answer to the
single most-feared question: “is my data still alive?”
The check walks the chunk graph rooted at <ref>:
- Fetches the root chunk via
/chunks/{ref}. - If the root parses as a Mantaray manifest, recursively fetches
each fork’s
self_address. Forks withtarget_addressthat isn’t NULL are counted as leaves but their target’s BMT tree is NOT walked (that’s a v1.4 follow-up — bee-rs would need to stream chunks through the file chunker for a complete answer). - If the root doesn’t parse as a manifest, the single-chunk fetch IS the durability answer.
Result is a DurabilityResult with (chunks_total, chunks_lost, chunks_errors). The S13 Watchlist screen records each invocation
and surfaces the running history; cmd_status_tx carries the
one-line summary back to the command bar.
Mirrors beekeeper’s pkg/check/datadurability but for one
operator’s local node + one reference, without the cluster
orchestration.
Structs§
- Check
Options - Knobs for the durability walk.
- Durability
Result - Outcome bucket for the running summary. We separate
chunks_lost(a 404 on/chunks/{ref}) fromchunks_errors(any other failure — timeout, 500, decode error) and fromchunks_corrupt(BMT hash of the returned content doesn’t match the requested reference). They have different operator implications: lost = the network truly dropped your data; errors = something flaky that needs a retry; corrupt = a peer or local store returned different bytes than the address asked for (bit-rot, swap-corrupted on-disk chunk, hostile peer).
Functions§
- check
- Walk the chunk graph rooted at
referenceand report the result. Times out per-chunk via reqwest’s default; the surroundingtokiotask can be cancelled by dropping its handle (the Watchlist screen owns the in-flight handle). BMT verification on by default; swarmscan probe off — seecheck_with_options. - check_
with_ options checkwith explicit options. Exposed so a future[durability].bmt_verify = falseconfig knob (or a CLI flag) can opt out for very large walks where the keccak cost adds up.