pub enum SubtreeAuditResponse {
Proof {
challenge_id: u64,
commitment: StorageCommitment,
proof: SubtreeProof,
},
Bootstrapping {
challenge_id: u64,
},
Rejected {
challenge_id: u64,
kind: RejectKind,
reason: String,
},
}Expand description
Response to a contiguous-subtree storage audit challenge (ADR-0002).
Variants§
Proof
The single-contiguous-subtree proof.
Carries the responder’s signed commitment (so the auditor re-derives
key_count and confirms the pin and signature) and the
nonce-selected subtree expanded to its leaves plus the sibling
cut-hashes on the path to the root. This is round 1 of the
two-round audit. The auditor:
- confirms
commitment_hash(commitment) == expected_commitment_hashand the signature is valid; - re-derives the selected subtree from
(nonce, key_count), rebuilds the root from the proof, and requires it to equal the commitment root (structure).
The leaves carry only hashes (bytes_hash, nonced_hash), so this round
proves the tree SHAPE is committed — not that the bytes are still held.
Real possession is proven in round 2: the auditor picks a few of the
just-verified leaves and sends a SubtreeByteChallenge requesting their
original chunk bytes FROM the responder (see that type).
Fields
commitment: StorageCommitmentThe signed commitment whose root the proof is against.
proof: SubtreeProofThe nonce-selected contiguous subtree proof.
Bootstrapping
Peer is still bootstrapping (not ready for audit).
Rejected
Challenge rejected. kind drives the auditor’s accounting (confirmed vs
graced); reason is the human-readable detail for logs.
Trait Implementations§
Source§impl Clone for SubtreeAuditResponse
impl Clone for SubtreeAuditResponse
Source§fn clone(&self) -> SubtreeAuditResponse
fn clone(&self) -> SubtreeAuditResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubtreeAuditResponse
impl Debug for SubtreeAuditResponse
Source§impl<'de> Deserialize<'de> for SubtreeAuditResponse
impl<'de> Deserialize<'de> for SubtreeAuditResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SubtreeAuditResponse
impl RefUnwindSafe for SubtreeAuditResponse
impl Send for SubtreeAuditResponse
impl Sync for SubtreeAuditResponse
impl Unpin for SubtreeAuditResponse
impl UnsafeUnpin for SubtreeAuditResponse
impl UnwindSafe for SubtreeAuditResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<'de, T> BorrowedRpcObject<'de> for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more