pub enum VerificationContext {
ClientPut,
PaidListAdmission,
}Expand description
The fresh admission path a payment proof is being verified for.
ClientPut— the node is admitting a chunk store. The verifier applies store-strength cache semantics and live payment checks.PaidListAdmission— the node is admitting fresh paid-list metadata. It runs the same live payment checks asClientPut, but writes a weaker cache entry that does not authorize future chunk stores.
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.
Immediate fresh chunk replication is different: the receiver is about to
store the newly written chunk as if the client PUT it there directly, so
that call site deliberately uses ClientPut.
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 with store-strength cache semantics.
PaidListAdmission
The node is admitting fresh paid-list metadata with paid-list-strength cache semantics.
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
Source§fn eq(&self, other: &VerificationContext) -> bool
fn eq(&self, other: &VerificationContext) -> bool
self and other values to be equal, and is used by ==.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