pub async fn handle_subtree_slice_challenge(
challenge: &SubtreeSliceChallenge,
storage: &LmdbStorage,
self_peer_id: &PeerId,
is_bootstrapping: bool,
commitment_state: Option<&Arc<ResponderCommitmentState>>,
) -> SubtreeSliceResponseExpand description
Handle a round-2 slice challenge (responder side), ADR-0002 / V2-685.
The auditor has already structurally verified this node’s round-1 subtree
proof and now opens up to two 1 KiB blocks (a fresh-random block plus the
final block) of a small freshly-random sample of those leaves. For each
opening the responder reads the committed chunk and builds a two-chain
opening (a Bao verified slice for authenticity against the chunk address, and
a nonced block-tree opening for possession against round 1’s nonced_root),
returning SubtreeSliceItem::Present. If it committed to the key but can no
longer
produce the bytes it returns SubtreeSliceItem::Absent, which the auditor
counts as a provable failure.
A key the responder never committed to (not in the pinned tree) is also
returned Absent: the auditor only ever samples keys it saw in round 1, so
in practice this guards against a malformed/forged challenge rather than an
honest mismatch.