Skip to content

Latest commit

 

History

History
181 lines (81 loc) · 3.07 KB

File metadata and controls

181 lines (81 loc) · 3.07 KB

Home > @holochain/tryorama > NetworkConfig

NetworkConfig interface

Signature:

export interface NetworkConfig 

Properties

Property

Modifiers

Type

Description

initiateIntervalMs?

number

(Optional) The interval in seconds between initiating gossip rounds.

This controls how often gossip will attempt to find a peer to gossip with. This can be set as low as you'd like, but you will still be limited by minInitiateIntervalMs. So a low value for this will result in gossip doing its initiation in a burst. Then, when it has run out of peers, it will idle for a while.

Default: 100

initiateJitterMs?

number

(Optional) A jitter value to add to the initiateIntervalMs.

This is used to avoid peers always being the gossip initiator or acceptor. It can be set to 0 to disable jitter, but it is recommended to leave this at the default value.

Default: 30

minInitiateIntervalMs?

number

(Optional) The minimum amount of time that must be allowed to pass before a gossip round can be initiated by a given peer.

This is a rate-limiting mechanism to be enforced against incoming gossip and therefore must be respected when initiating too.

Default: 100

roundTimeoutMs?

number

(Optional) The timeout for a round of gossip.

This is the maximum amount of time that a gossip round is allowed to take.

Default: 10,000

targetArcFactor?

number

(Optional) The target arc factor for gossip.

This controls the range of DHT locations that the peer will aim to store and serve during gossip.

For leacher nodes that do not contribute to gossip, set to 0.

Values other than 1 or 0 will be rejected.

Default: 1

transportTimeoutS?

number

(Optional) The network timeout for transport operations.

This controls how long Holochain will spend waiting for connections to be established and other low-level network operations.

If you are writing tests that start and stop conductors, you may want to set this to a lower value to avoid waiting for connections to conductors that are no longer running.

Default: 15