pub struct SubtreeByteChallenge {
pub challenge_id: u64,
pub nonce: [u8; 32],
pub challenged_peer_id: [u8; 32],
pub expected_commitment_hash: [u8; 32],
pub keys: Vec<XorName>,
}Expand description
Round 2 of the storage audit (ADR-0002): the surprise byte challenge.
After the auditor has structurally verified a SubtreeAuditResponse::Proof
it picks a small sample of that subtree’s just-proven leaves with FRESH
randomness (chosen now, after the proof is committed — NOT derived from the
round-1 nonce, so the responder could not have predicted it at proof-build
time) and asks the responder to return the ORIGINAL chunk bytes for exactly
those keys. The auditor then checks each returned chunk against the committed
leaf:
BLAKE3(bytes) == leaf.bytes_hash(the chunk’s content address), ANDcompute_audit_digest(nonce, peer, key, bytes) == leaf.nonced_hash.
This makes possession non-delegable to the auditor: the auditor needs to hold NONE of the responder’s chunks. A responder that committed to a chunk it no longer holds cannot fabricate bytes that hash to the committed address (a preimage break), so it is caught regardless of who audits it.
Fields§
§challenge_id: u64The same challenge_id as the round-1 SubtreeAuditChallenge, so the
responder/auditor correlate the two rounds.
nonce: [u8; 32]The same nonce as round 1 — needed for the freshness (nonced_hash)
check and to bind these bytes to this audit.
challenged_peer_id: [u8; 32]The challenged peer ID (bound into each leaf’s possession hash).
expected_commitment_hash: [u8; 32]The pinned commitment hash from round 1, so the responder resolves the SAME tree it just proved and serves bytes only for keys it committed to.
keys: Vec<XorName>The exact keys whose original bytes the responder must return. These are the auditor’s freshly-randomised spot-check sample of the round-1 subtree (chosen after the proof was received; not nonce-derived).
Trait Implementations§
Source§impl Clone for SubtreeByteChallenge
impl Clone for SubtreeByteChallenge
Source§fn clone(&self) -> SubtreeByteChallenge
fn clone(&self) -> SubtreeByteChallenge
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 SubtreeByteChallenge
impl Debug for SubtreeByteChallenge
Source§impl<'de> Deserialize<'de> for SubtreeByteChallenge
impl<'de> Deserialize<'de> for SubtreeByteChallenge
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 SubtreeByteChallenge
impl RefUnwindSafe for SubtreeByteChallenge
impl Send for SubtreeByteChallenge
impl Sync for SubtreeByteChallenge
impl Unpin for SubtreeByteChallenge
impl UnsafeUnpin for SubtreeByteChallenge
impl UnwindSafe for SubtreeByteChallenge
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