pub enum ReputationTier {
R0,
R1,
R2,
R3,
R4,
}Expand description
Discrete reputation tier for a Pouch peer.
Variants§
R0
Quarantined — isolated from trusted peers, may be evicted.
R1
Fledgling — new node, < 7 days in the network.
R2
Reliable — sustained uptime and PoS pass rate over 30 days.
R3
Trusted — high reliability over 90 days.
R4
Pillar — exemplary reliability over 365 days.
Implementations§
Source§impl ReputationTier
impl ReputationTier
Sourcepub fn qos_target_ph(self) -> f64
pub fn qos_target_ph(self) -> f64
Target QoS recovery probability Ph for this reputation tier.
Used as the ph argument to
crate::coding::params::compute_network_storage_factor when
computing the effective available storage of a Pouch node:
effective_available = (bid − used) × k/Nwhere k/N is the maximum coding rate that the current network
of N Pouch peers can sustain while guaranteeing at least Ph
probability of full file recovery.
| Tier | Ph | Rationale |
|---|---|---|
| R0 | 0.00 | Quarantined — no availability guaranteed |
| R1 | 0.70 | Fledgling — lenient, network still forming |
| R2 | 0.85 | Reliable — solid sustained network |
| R3 | 0.95 | Trusted — high-reliability threshold |
| R4 | 0.999 | Pillar — near-certain recovery |
Sourcepub fn is_eligible_for(self, sender_tier: ReputationTier) -> bool
pub fn is_eligible_for(self, sender_tier: ReputationTier) -> bool
Returns true if this tier is trusted enough to receive fragments
from senders with sender_tier.
Rule: a Pouch is eligible for a sender’s fragments if
pouch_tier >= sender_tier || sender_tier == R0.
Trait Implementations§
Source§impl Clone for ReputationTier
impl Clone for ReputationTier
Source§fn clone(&self) -> ReputationTier
fn clone(&self) -> ReputationTier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReputationTier
impl Debug for ReputationTier
Source§impl<'de> Deserialize<'de> for ReputationTier
impl<'de> Deserialize<'de> for ReputationTier
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>,
Source§impl Display for ReputationTier
impl Display for ReputationTier
Source§impl Ord for ReputationTier
impl Ord for ReputationTier
Source§fn cmp(&self, other: &ReputationTier) -> Ordering
fn cmp(&self, other: &ReputationTier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ReputationTier
impl PartialEq for ReputationTier
Source§impl PartialOrd for ReputationTier
impl PartialOrd for ReputationTier
Source§impl Serialize for ReputationTier
impl Serialize for ReputationTier
impl Copy for ReputationTier
impl Eq for ReputationTier
impl StructuralPartialEq for ReputationTier
Auto Trait Implementations§
impl Freeze for ReputationTier
impl RefUnwindSafe for ReputationTier
impl Send for ReputationTier
impl Sync for ReputationTier
impl Unpin for ReputationTier
impl UnwindSafe for ReputationTier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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