pub struct SubtreeAuditChallenge {
pub challenge_id: u64,
pub nonce: [u8; 32],
pub challenged_peer_id: [u8; 32],
pub expected_commitment_hash: [u8; 32],
}Expand description
Gossip-triggered contiguous-subtree storage audit challenge (ADR-0002).
The auditor pins the commitment a peer just gossiped and sends a fresh
random nonce. The nonce alone deterministically selects one contiguous
subtree of the peer’s committed Merkle tree (see
crate::replication::subtree::select_subtree_path); the auditor does
not name keys. The responder must reply with a
SubtreeAuditResponse::Proof for that selected subtree against the pinned
commitment, or a SubtreeAuditResponse::Rejected if it genuinely cannot
(for a recently gossiped pinned commitment a rejection is a confirmed
failure, since the responder retains its last two gossiped commitments).
Fields§
§challenge_id: u64Unique challenge identifier.
nonce: [u8; 32]Random nonce. Selects the subtree AND freshens each leaf’s possession hash, so a stored answer cannot be replayed.
challenged_peer_id: [u8; 32]Challenged peer ID. Bound into each leaf’s possession hash.
expected_commitment_hash: [u8; 32]The auditor’s pin: the crate::replication::commitment::commitment_hash
of the commitment the peer just gossiped. The response’s commitment must
hash to exactly this value.
Trait Implementations§
Source§impl Clone for SubtreeAuditChallenge
impl Clone for SubtreeAuditChallenge
Source§fn clone(&self) -> SubtreeAuditChallenge
fn clone(&self) -> SubtreeAuditChallenge
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 SubtreeAuditChallenge
impl Debug for SubtreeAuditChallenge
Source§impl<'de> Deserialize<'de> for SubtreeAuditChallenge
impl<'de> Deserialize<'de> for SubtreeAuditChallenge
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 SubtreeAuditChallenge
impl RefUnwindSafe for SubtreeAuditChallenge
impl Send for SubtreeAuditChallenge
impl Sync for SubtreeAuditChallenge
impl Unpin for SubtreeAuditChallenge
impl UnsafeUnpin for SubtreeAuditChallenge
impl UnwindSafe for SubtreeAuditChallenge
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