pub struct VerificationEntry {
pub state: VerificationState,
pub verified_sources: Vec<PeerId>,
pub tried_sources: HashSet<PeerId>,
pub created_at: Instant,
pub next_verify_at: Instant,
pub hint_sources: HashSet<PeerId>,
pub replica_hint_sources: HashSet<PeerId>,
pub unresolved_retries: u32,
pub no_holder_reported: bool,
}Expand description
Entry in the pending-verification table.
Tracks a single key through the verification FSM, recording which peers responded and which have been tried for fetch.
Fields§
§state: VerificationStateCurrent state in the verification FSM.
verified_sources: Vec<PeerId>Peers that responded Present during verification (verified fetch
sources).
tried_sources: HashSet<PeerId>Peers already tried for fetch (to avoid retrying the same source).
created_at: InstantWhen this entry was created.
next_verify_at: InstantEarliest time this key should be included in another verification round.
hint_sources: HashSet<PeerId>Routing-table peers that advertised this key and have not subsequently departed. Duplicate hints add to this set instead of being discarded.
replica_hint_sources: HashSet<PeerId>Subset of Self::hint_sources that advertised a replica hint and
therefore claimed chunk possession. Paid-only advertisers are excluded.
unresolved_retries: u32Consecutive verification rounds that left this key unresolved.
Counts deferrals, not rounds: it advances only when a round ends with no usable holder (or an inconclusive quorum) and the key is put back for a later retry. Zero means the key has not yet failed a round, so the next deferral is its first.
Drives the retry backoff. Lifetime is the entry’s own — eviction and re-admission start a fresh count.
Cleared by a round that did find a holder, so it counts consecutive failures rather than lifetime ones: a key held up only by a full fetch queue is making progress and must not inherit an earlier backoff.
no_holder_reported: boolWhether this entry’s one no-holder warning has already been emitted.
Deliberately not derived from Self::unresolved_retries. The two
answer different questions: the counter asks “how many consecutive
rounds failed”, which an inconclusive quorum legitimately advances, and
this asks “have we told anyone”, which only a no-holder result may
consume. Deriving one from the other loses the first — and only —
warning for any key whose opening round is inconclusive.
Cleared alongside the counter, so “once per episode” is literal: a key that resolves and later becomes unresolvable again is reported again.
Implementations§
Source§impl VerificationEntry
impl VerificationEntry
Sourcepub fn pipeline(&self) -> HintPipeline
pub fn pipeline(&self) -> HintPipeline
Which pipeline this key arrived on.
Derived from Self::replica_hint_sources rather than stored: the
pipeline is “did any peer claim to hold this key”, so a stored copy
can only drift from its own definition as advertisers are merged in and
departed peers are pruned out.
This describes hint provenance, not authorization. It selects fetch
sources (only a peer claiming possession is worth fetching from) and
scopes sole-source trust penalties. It must never gate storage:
possession claims come from the sender, so treating one as permission to
store lets a peer conscript a node that carries no responsibility for
the key. Storage responsibility is decided separately, against live
routing state, by is_responsible(storage_admission_width) at the point
of download.
Trait Implementations§
Source§impl Clone for VerificationEntry
impl Clone for VerificationEntry
Auto Trait Implementations§
impl Freeze for VerificationEntry
impl RefUnwindSafe for VerificationEntry
impl Send for VerificationEntry
impl Sync for VerificationEntry
impl Unpin for VerificationEntry
impl UnsafeUnpin for VerificationEntry
impl UnwindSafe for VerificationEntry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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,
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