pub struct SubtreeSliceChallenge {
pub challenge_id: u64,
pub nonce: [u8; 32],
pub challenged_peer_id: [u8; 32],
pub expected_commitment_hash: [u8; 32],
pub openings: Vec<SubtreeSliceOpening>,
}Expand description
Round 2 of the storage audit (ADR-0002 / V2-685): the surprise slice challenge.
After structurally verifying a SubtreeAuditResponse::Proof the auditor
picks a small sample of the just-proven leaves with FRESH randomness (chosen
now, after the proof is committed — NOT derived from the round-1 nonce) and,
for each, a fresh-random 1 KiB block index. It asks the responder to open
exactly those blocks. For each opened block the responder returns a Bao
verified slice plus a nonced block-tree opening; the auditor checks, over the
same block bytes:
- the Bao slice against
leaf.bytes_hash(the chunk’s content address), AND - the nonced opening against
leaf.nonced_root(round-1 possession commit).
The pair binds the opened block to bytes that were held when round 1 was
answered, cheaply: the response is a few KB, not up to two 4 MiB chunks.
Whoever answered round 1 without the bytes cannot have committed a correct
nonced_root, and cannot fold an after-the-fact-fetched block to a foreign
root without a preimage break.
What it does NOT bind is which party held them. Every input is public, so a backend holding one copy can answer for any number of front-end identities; the proof is delegable, and cheaper to delegate than the full-byte round 2 it replaces, which priced delegation by forcing the chunk through the relay. ADR-0009 records that as a known gap. Anything in this tree that reads as “non-delegable” or “a relay blows the deadline” is a claim about the older design and is superseded there.
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 — binds each nonced block opening to this audit.
challenged_peer_id: [u8; 32]The challenged peer ID (bound into every nonced block leaf).
expected_commitment_hash: [u8; 32]The pinned commitment hash from round 1, so the responder resolves the SAME tree it just proved and opens blocks only for keys it committed to.
openings: Vec<SubtreeSliceOpening>The exact blocks to open: the auditor’s freshly-randomised spot-check sample of the round-1 subtree (chosen after the proof was received; not nonce-derived), up to two blocks per sampled leaf (a fresh-random block plus the final block, for the content-length pin).
Trait Implementations§
Source§impl Clone for SubtreeSliceChallenge
impl Clone for SubtreeSliceChallenge
Source§fn clone(&self) -> SubtreeSliceChallenge
fn clone(&self) -> SubtreeSliceChallenge
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 SubtreeSliceChallenge
impl Debug for SubtreeSliceChallenge
Source§impl<'de> Deserialize<'de> for SubtreeSliceChallenge
impl<'de> Deserialize<'de> for SubtreeSliceChallenge
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 SubtreeSliceChallenge
impl RefUnwindSafe for SubtreeSliceChallenge
impl Send for SubtreeSliceChallenge
impl Sync for SubtreeSliceChallenge
impl Unpin for SubtreeSliceChallenge
impl UnsafeUnpin for SubtreeSliceChallenge
impl UnwindSafe for SubtreeSliceChallenge
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