pub enum VerificationContext {
ClientPut,
FreshReplication,
PaidListAdmission,
}Expand description
The fresh admission path a payment proof is being verified for.
ClientPut— the node is admitting a chunk store from a direct client PUT. The verifier applies store-strength cache semantics and live payment checks.FreshReplication— the node is admitting a chunk store via the immediate fresh-write fan-out. The receiver is about to store the newly written chunk as if the client PUT it there directly, so this context is verified EXACTLY likeClientPut(store-strength cache semantics, same live checks, same price-floor policy). It exists as a separate variant so price-floor telemetry can distinguish direct ingress from fan-out — the two paths can legitimately diverge during commitment rotation, and the floor policy for fan-out must be tunable from observed data without touching direct-PUT behaviour.PaidListAdmission— the node is admitting fresh paid-list metadata. It runs the same live payment checks, but writes a weaker cache entry that does not authorize future chunk stores. The price floor never applies here: paid-list records reprice no fresh economic decision.
The caller must check local receiver/admission membership before invoking the verifier for replication admission: fresh chunk replication requires local close-group responsibility, and fresh paid-list replication requires local paid-list close-group membership. Direct client PUT deliberately does not perform a receiver-responsibility gate. The verifier itself only checks payment proof validity and that the paid quote’s issuer is in the K closest peers for the quoted chunk address.
Later neighbour-sync repair does not include proof-of-payment bytes and does not call this verifier. It authorizes repair from network evidence: majority storage among the configured close group, or majority paid-list membership among the closest K.
Variants§
ClientPut
The node is admitting a chunk store from a direct client PUT, with store-strength cache semantics.
FreshReplication
The node is admitting a chunk store via immediate fresh replication —
verified identically to ClientPut, split out for price-floor
telemetry and policy.
PaidListAdmission
The node is admitting fresh paid-list metadata with paid-list-strength cache semantics.
Implementations§
Source§impl VerificationContext
impl VerificationContext
Sourcepub fn is_store_admission(self) -> bool
pub fn is_store_admission(self) -> bool
True for contexts that admit chunk BYTES with store-strength cache semantics: direct client PUT and immediate fresh replication. These two are verified identically everywhere — the only policy that reads the variant itself (rather than this predicate) is price-floor telemetry.
Trait Implementations§
Source§impl Clone for VerificationContext
impl Clone for VerificationContext
Source§fn clone(&self) -> VerificationContext
fn clone(&self) -> VerificationContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for VerificationContext
Source§impl Debug for VerificationContext
impl Debug for VerificationContext
impl Eq for VerificationContext
Source§impl PartialEq for VerificationContext
impl PartialEq for VerificationContext
impl StructuralPartialEq for VerificationContext
Auto Trait Implementations§
impl Freeze for VerificationContext
impl RefUnwindSafe for VerificationContext
impl Send for VerificationContext
impl Sync for VerificationContext
impl Unpin for VerificationContext
impl UnsafeUnpin for VerificationContext
impl UnwindSafe for VerificationContext
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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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