Struct holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::config::tuning_params_struct::KitsuneP2pTuningParams
source · #[non_exhaustive]pub struct KitsuneP2pTuningParams {Show 33 fields
pub gossip_strategy: String,
pub gossip_loop_iteration_delay_ms: u32,
pub gossip_outbound_target_mbps: f64,
pub gossip_inbound_target_mbps: f64,
pub gossip_historic_outbound_target_mbps: f64,
pub gossip_historic_inbound_target_mbps: f64,
pub gossip_burst_ratio: f64,
pub gossip_peer_on_success_next_gossip_delay_ms: u32,
pub gossip_peer_on_error_next_gossip_delay_ms: u32,
pub gossip_agent_info_update_interval_ms: u32,
pub gossip_local_sync_delay_ms: u32,
pub gossip_redundancy_target: f64,
pub gossip_max_batch_size: u32,
pub gossip_dynamic_arcs: bool,
pub gossip_single_storage_arc_per_space: bool,
pub default_rpc_single_timeout_ms: u32,
pub default_rpc_multi_remote_agent_count: u8,
pub default_rpc_multi_remote_request_grace_ms: u64,
pub agent_info_expires_after_ms: u32,
pub tls_in_mem_session_storage: u32,
pub proxy_keepalive_ms: u32,
pub proxy_to_expire_ms: u32,
pub concurrent_limit_per_thread: usize,
pub tx2_quic_max_idle_timeout_ms: u32,
pub tx2_pool_max_connection_count: usize,
pub tx2_channel_count_per_connection: usize,
pub tx2_implicit_timeout_ms: u32,
pub tx2_initial_connect_retry_delay_ms: usize,
pub danger_tls_keylog: String,
pub danger_gossip_recent_threshold_secs: u64,
pub disable_publish: bool,
pub disable_recent_gossip: bool,
pub disable_historical_gossip: bool,
}
Expand description
Network tuning parameters. This is serialized carefully so all the values can be represented as strings in YAML - and we will be able to proceed with a printed warning for tuning params that are removed, but still specified in configs.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.gossip_strategy: String
Gossip strategy to use. [Default: “sharded-gossip”]
gossip_loop_iteration_delay_ms: u32
Delay between gossip loop iteration. [Default: 1s]
gossip_outbound_target_mbps: f64
The gossip loop will attempt to rate-limit output to this count megabits per second. [Default: 100.0]
gossip_inbound_target_mbps: f64
The gossip loop will attempt to rate-limit input to this count megabits per second. [Default: 100.0]
gossip_historic_outbound_target_mbps: f64
The gossip loop will attempt to rate-limit outbound traffic for the historic loop (if there is one) to this count megabits per second. [Default: 100.0]
gossip_historic_inbound_target_mbps: f64
The gossip loop will attempt to rate-limit inbound traffic for the historic loop (if there is one) to this count megabits per second. [Default: 100.0]
gossip_burst_ratio: f64
The gossip loop accomodates this amount of excess capacity before enacting the target rate limit, expressed as a ratio of the target rate limit. For instance, if the historic outbound target is 10mbps, a burst ratio of 50 will allow an extra 500mb of outbound traffic before the target rate limiting kicks in (and this extra capacity will take 50 seconds to “refill”). [Default: 100.0]
gossip_peer_on_success_next_gossip_delay_ms: u32
How long should we hold off talking to a peer we’ve previously spoken successfully to. [Default: 1 minute]
gossip_peer_on_error_next_gossip_delay_ms: u32
How long should we hold off talking to a peer we’ve previously gotten errors speaking to. [Default: 5 minute]
gossip_agent_info_update_interval_ms: u32
How often should we update and publish our agent info? [Default: 5 minutes]
gossip_local_sync_delay_ms: u32
How frequently we should locally sync when there is no new data. Agents arc can change so this shouldn’t be too long. [Default: 1 minutes]
gossip_redundancy_target: f64
The target redundancy is the number of peers we expect to hold any given Op.
gossip_max_batch_size: u32
The max number of bytes of op data to send in a single message. Payloads larger than this are split into multiple batches.
gossip_dynamic_arcs: bool
Should gossip dynamically resize storage arcs?
gossip_single_storage_arc_per_space: bool
Allow only the first agent to join the space to have a sized storage arc. [Default: false] This is an experimental feature that sets the first agent to join as the full arc and all other later agents to empty. It should not be used in production unless you understand what you are doing.
default_rpc_single_timeout_ms: u32
Default timeout for rpc single. [Default: 30s]
default_rpc_multi_remote_agent_count: u8
Default agent count for rpc multi. [Default: 3]
default_rpc_multi_remote_request_grace_ms: u64
Default remote request grace ms. [Default: 3s] If we already have results from other sources, but made any additional outgoing remote requests, we’ll wait at least this long for additional responses.
agent_info_expires_after_ms: u32
Default agent expires after milliseconds. [Default: 20 minutes]
tls_in_mem_session_storage: u32
Tls in-memory session storage capacity. [Default: 512]
proxy_keepalive_ms: u32
How often should NAT nodes refresh their proxy contract? [Default: 2 minutes]
proxy_to_expire_ms: u32
How often should proxy nodes prune their ProxyTo list? Note - to function this should be > proxy_keepalive_ms. [Default: 5 minutes]
concurrent_limit_per_thread: usize
Mainly used as the for_each_concurrent limit, this restricts the number of active polled futures on a single thread. [Default: 4096]
tx2_quic_max_idle_timeout_ms: u32
tx2 quic max_idle_timeout [Default: 30 seconds]
tx2_pool_max_connection_count: usize
tx2 pool max connection count [Default: 4096]
tx2_channel_count_per_connection: usize
tx2 channel count per connection [Default: 2]
tx2_implicit_timeout_ms: u32
tx2 timeout used for passive background operations like reads / responds. [Default: 30 seconds]
tx2_initial_connect_retry_delay_ms: usize
tx2 initial connect retry delay (note, this delay is currenty exponentially backed off– multiplied by 2x on every loop) [Default: 200 ms]
danger_tls_keylog: String
if you would like to be able to use an external tool
to debug the QUIC messages sent and received by kitsune
you’ll need the decryption keys.
The default of "no_keylog"
is secure and will not write any keys
Setting this to "env_keylog"
will write to a keylog specified
by the SSLKEYLOGFILE
environment variable, or do nothing if
it is not set, or is not writable.
danger_gossip_recent_threshold_secs: u64
Set the cutoff time when gossip switches over from recent to historical gossip.
This is dangerous to change, because gossip may not be possible with nodes using a different setting for this threshold. Do not change this except in testing environments. [Default: 15 minutes]
disable_publish: bool
Don’t publish ops, only rely on gossip. Useful for testing the efficacy of gossip.
disable_recent_gossip: bool
Disable recent gossip. Useful for testing Historical gossip in isolation. Note that this also disables agent gossip!
disable_historical_gossip: bool
Disable historical gossip. Useful for testing Recent gossip in isolation.
Implementations
sourceimpl KitsuneP2pTuningParams
impl KitsuneP2pTuningParams
sourcepub fn implicit_timeout(&self) -> KitsuneTimeout
pub fn implicit_timeout(&self) -> KitsuneTimeout
Generate a KitsuneTimeout instance based on the tuning parameter tx2_implicit_timeout_ms
sourcepub fn danger_gossip_recent_threshold(&self) -> Duration
pub fn danger_gossip_recent_threshold(&self) -> Duration
Get the gossip recent threshold param as a proper Duration
sourcepub fn use_env_tls_keylog(&self) -> bool
pub fn use_env_tls_keylog(&self) -> bool
returns true if we should initialize a tls keylog
based on the SSLKEYLOGFILE
environment variable
Trait Implementations
sourceimpl Clone for KitsuneP2pTuningParams
impl Clone for KitsuneP2pTuningParams
sourcefn clone(&self) -> KitsuneP2pTuningParams
fn clone(&self) -> KitsuneP2pTuningParams
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for KitsuneP2pTuningParams
impl Debug for KitsuneP2pTuningParams
sourceimpl Default for KitsuneP2pTuningParams
impl Default for KitsuneP2pTuningParams
sourcefn default() -> KitsuneP2pTuningParams
fn default() -> KitsuneP2pTuningParams
sourceimpl<'de> Deserialize<'de> for KitsuneP2pTuningParams
impl<'de> Deserialize<'de> for KitsuneP2pTuningParams
sourcefn deserialize<D>(
deserializer: D
) -> Result<KitsuneP2pTuningParams, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<KitsuneP2pTuningParams, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
sourceimpl PartialEq<KitsuneP2pTuningParams> for KitsuneP2pTuningParams
impl PartialEq<KitsuneP2pTuningParams> for KitsuneP2pTuningParams
sourcefn eq(&self, other: &KitsuneP2pTuningParams) -> bool
fn eq(&self, other: &KitsuneP2pTuningParams) -> bool
sourceimpl Serialize for KitsuneP2pTuningParams
impl Serialize for KitsuneP2pTuningParams
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for KitsuneP2pTuningParams
Auto Trait Implementations
impl RefUnwindSafe for KitsuneP2pTuningParams
impl Send for KitsuneP2pTuningParams
impl Sync for KitsuneP2pTuningParams
impl Unpin for KitsuneP2pTuningParams
impl UnwindSafe for KitsuneP2pTuningParams
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.