#[non_exhaustive]
pub struct KitsuneP2pTuningParams {
Show 42 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_round_timeout_ms: u64, pub gossip_redundancy_target: f64, pub gossip_max_batch_size: u32, pub gossip_dynamic_arcs: bool, pub gossip_arc_clamping: String, 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 tx5_max_send_bytes: u32, pub tx5_max_recv_bytes: u32, pub tx5_max_conn_count: u32, pub tx5_max_conn_init_s: u32, pub tx5_ban_time_s: u32, pub tx5_min_ephemeral_udp_port: u16, pub tx5_max_ephemeral_udp_port: u16, 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, pub bootstrap_check_delay_backoff_multiplier: u32, pub bootstrap_max_delay_s: u32,
}
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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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_round_timeout_ms: u64

The timeout for a gossip round if there is no contact. [Default: 1 minute]

§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 data to send in a single message.

This setting was more relevant when entire Ops were being gossiped, but now that only hashes are gossiped, it would take a lot of hashes to reach this limit (1MB = approx 277k hashes).

Payloads larger than this are split into multiple batches when possible.

§gossip_dynamic_arcs: bool

Should gossip dynamically resize storage arcs?

§gossip_arc_clamping: String

By default, Holochain adjusts the gossip_arc to match the the current network conditions for the given DNA. If unsure, please keep this setting at the default “none”, meaning no arc clamping. Setting options are:

  • “none” - Keep the default auto-adjust behavior.
  • “empty” - Makes you a freeloader, contributing nothing to the network. Please don’t choose this option without a good reason, such as being on a bandwidth constrained mobile device!
  • “full” - Indicates that you commit to serve and hold all all data from all agents, and be a potential target for all get requests. This could be a significant investment of bandwidth. Don’t take this responsibility lightly.
§default_rpc_single_timeout_ms: u32

Default timeout for rpc single. [Default: 60s]

§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: 60 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: 60 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]

§tx5_max_send_bytes: u32

Tx5 max pending send byte count limit. [Default: 16 MiB]

§tx5_max_recv_bytes: u32

Tx5 max pending recv byte count limit. [Default: 16 MiB]

§tx5_max_conn_count: u32

Tx5 max concurrent connection limit. [Default: 255]

§tx5_max_conn_init_s: u32

Tx5 max init (connect) time for a connection in seconds. [Default: 60]

§tx5_ban_time_s: u32

Tx5 ban time in seconds.

§tx5_min_ephemeral_udp_port: u16

Tx5 min ephemeral port

§tx5_max_ephemeral_udp_port: u16

Tx5 max ephemeral port

§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.

§bootstrap_check_delay_backoff_multiplier: u32

Control the backoff multiplier for the time delay between checking in with the bootstrap server. The default value of 2 causes the delay to grow quickly up to the max time of 1 hour. For testing consider using 1 to prevent the delay from growing.

§bootstrap_max_delay_s: u32

Set the bootstrap fetch maximum backoff time. The default value is 60 * 5 s = five minutes. The minimum value is 60 s = one minute.

Implementations§

source§

impl KitsuneP2pTuningParams

source

pub fn implicit_timeout(&self) -> KitsuneTimeout

Generate a KitsuneTimeout instance based on the tuning parameter tx2_implicit_timeout_ms

source

pub fn danger_gossip_recent_threshold(&self) -> Duration

Get the gossip recent threshold param as a proper Duration

source

pub fn tx5_max_conn_init(&self) -> Duration

Get the tx5_max_conn_init_s param as a Duration.

source

pub fn tx5_ban_time(&self) -> Duration

get the tx5_ban_time_s param as a Duration.

source

pub fn use_env_tls_keylog(&self) -> bool

returns true if we should initialize a tls keylog based on the SSLKEYLOGFILE environment variable

source

pub fn gossip_round_timeout(&self) -> Duration

The timeout for a gossip round if there is no contact.

source

pub fn arc_clamping(&self) -> Option<ArqClamping>

Parse the gossip_arc_clamping string as a proper type

source

pub fn to_arq_strat(&self) -> ArqStrat

Create a standard ArqStrat from the tuning params

Trait Implementations§

source§

impl Clone for KitsuneP2pTuningParams

source§

fn clone(&self) -> KitsuneP2pTuningParams

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for KitsuneP2pTuningParams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for KitsuneP2pTuningParams

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for KitsuneP2pTuningParams

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for KitsuneP2pTuningParams

source§

fn eq(&self, other: &KitsuneP2pTuningParams) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for KitsuneP2pTuningParams

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for KitsuneP2pTuningParams

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,