Skip to main content

Module storage_commitment_audit

Module storage_commitment_audit 

Source
Expand description

Gossip-triggered contiguous-subtree storage audit (ADR-0002).

A node commits to what it stores (a signed Merkle StorageCommitment gossiped to neighbours). On receiving a peer’s changed commitment, a neighbour may audit it: pin the just-gossiped root, send a fresh nonce that deterministically selects one contiguous subtree, and require the peer to prove that subtree (structure + real bytes) within a deadline. This module owns the auditor entry point run_subtree_audit and the responder handler handle_subtree_challenge; the pure proof maths live in crate::replication::subtree.

Structs§

AuditCredit
Holder-eligibility cache the auditor credits on a passing audit.
Round1Work
A round-1 response together with the chunk bytes spent producing it.

Enums§

SubtreeAuditOrigin
Local subsystem that launched a storage-commitment audit.

Functions§

handle_subtree_challenge
Handle an incoming subtree audit challenge (responder side).
handle_subtree_challenge_measured
handle_subtree_challenge, additionally reporting the read-and-hash work it performed so the caller can charge it on every exit path.
handle_subtree_slice_challenge
Handle a round-2 slice challenge (responder side), ADR-0002 / V2-685.
run_subtree_audit
Run one gossip-triggered subtree audit against challenged_peer, pinned to the commitment hash the peer just gossiped (expected_commitment_hash).