pub enum SubtreeSliceResponse {
Items {
challenge_id: u64,
items: Vec<SubtreeSliceItem>,
},
Bootstrapping {
challenge_id: u64,
},
Rejected {
challenge_id: u64,
kind: RejectKind,
reason: String,
},
}Expand description
Response to a SubtreeSliceChallenge (round 2).
The contract is coalesced and order-independent: the responder groups the requested openings by key (reading and hashing each chunk once), so
- a
Presentitem is unique per distinct(key, block_index); - an
Absentitem is at most one per key and covers ALL of that key’s requested openings (it has noblock_index); - duplicate requested openings do not multiply work or response items;
- item order is unspecified — the auditor matches by identity, not position.
The auditor rejects a response whose identities collide (a duplicate
(key, block_index), or a key that is both Present and Absent) as
malformed, so first-match ambiguity cannot decide a verdict.
Each item is a few KB (a 1 KiB block plus O(log n) hashes on two short
chains), so even the worst-case sample fits far under
MAX_REPLICATION_MESSAGE_SIZE with no batching — the auditor bounds the
sample to MAX_SLICE_OPENINGS and the
responder rejects larger requests.
Variants§
Items
The responder’s per-opening answers (a verified slice or an absent signal).
Fields
items: Vec<SubtreeSliceItem>One item per DISTINCT requested opening, coalesced and
order-independent (see the type-level contract above): duplicate
openings do not multiply items, and one Absent covers all of a
key’s openings.
Bootstrapping
Peer is still bootstrapping (should not happen mid-audit, but handled).
Rejected
The responder rejects the slice challenge outright. kind drives the
auditor’s accounting (ADR-0004 A1: grace removed): RejectKind::Transient
routes to the timeout lane (no trust penalty, holder credit revoked); every
other kind is a confirmed failure, like round 1.
Trait Implementations§
Source§impl Clone for SubtreeSliceResponse
impl Clone for SubtreeSliceResponse
Source§fn clone(&self) -> SubtreeSliceResponse
fn clone(&self) -> SubtreeSliceResponse
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 SubtreeSliceResponse
impl Debug for SubtreeSliceResponse
Source§impl<'de> Deserialize<'de> for SubtreeSliceResponse
impl<'de> Deserialize<'de> for SubtreeSliceResponse
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 SubtreeSliceResponse
impl RefUnwindSafe for SubtreeSliceResponse
impl Send for SubtreeSliceResponse
impl Sync for SubtreeSliceResponse
impl Unpin for SubtreeSliceResponse
impl UnsafeUnpin for SubtreeSliceResponse
impl UnwindSafe for SubtreeSliceResponse
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