Struct holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dht::prelude::GossipParams
pub struct GossipParams {
pub max_time_offset: TimeQuantum,
pub max_space_power_offset: u8,
}
Expand description
Node-specific parameters for gossip.
While the Topology
must be the same for every node in a network, each
node is free to choose its own GossipParams.
Choosing smaller values for these offsets can lead to less resource usage, at the expense of reducing opportunities to gossip with other nodes. This is also largely dependent on the characteristcs of the network, since if almost all nodes are operating with the same current timestamp and Arq power level, there will be very little need for reconciliation.
In networks where nodes are offline for long periods of time, or latency is very high (e.g. sneakernet), it could be helpful to increase these values.
Fields
max_time_offset: TimeQuantum
What +/- coordinate offset will you accept for timestamps? e.g. if the time quantum is 5 min, a time buffer of 2 will allow +/- 10 min discrepancies with gossip partners.
max_space_power_offset: u8
What difference in power will you accept for other agents’ Arqs? e.g. if the power I use in my arq is 14, and this offset is 2, I won’t talk to anyone whose arq is expressed with a power lower than 12 or greater than 16
Implementations
impl GossipParams
impl GossipParams
pub fn new(
max_time_offset: TimeQuantum,
max_space_power_offset: u8
) -> GossipParams
impl GossipParams
impl GossipParams
pub fn zero() -> GossipParams
pub fn zero() -> GossipParams
Zero-tolerance gossip params
Trait Implementations
impl Clone for GossipParams
impl Clone for GossipParams
fn clone(&self) -> GossipParams
fn clone(&self) -> GossipParams
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Debug for GossipParams
impl Debug for GossipParams
impl Copy for GossipParams
Auto Trait Implementations
impl RefUnwindSafe for GossipParams
impl Send for GossipParams
impl Sync for GossipParams
impl Unpin for GossipParams
impl UnwindSafe for GossipParams
Blanket Implementations
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.