Interface RelayCreateOptions

Hierarchy

  • GossipsubOpts
    • RelayCreateOptions

Properties

D: number

D sets the optimal degree for a Gossipsub topic mesh.

Dhi: number

Dhi sets the upper bound on the number of peers we keep in a Gossipsub topic mesh.

Dlazy: number

Dlazy affects how many peers we will emit gossip to at each heartbeat.

Dlo: number

Dlo sets the lower bound on the number of peers we keep in a Gossipsub topic mesh.

Dout: number

Dout sets the quota for the number of outbound connections to maintain in a topic mesh.

Dscore: number

Dscore affects how peers are selected when pruning a mesh due to over subscription.

allowPublishToZeroPeers: boolean

Do not throw InsufficientPeers error if publishing to zero peers

allowedTopics?: string[] | Set<string>

If provided, only allow topics in this list

asyncValidation: boolean

If true will not forward messages to mesh peers until reportMessageValidationResult() is called. Messages will be cached in mcache for some time after which they are evicted. Calling reportMessageValidationResult() after the message is dropped from mcache won't forward the message.

awaitRpcHandler: boolean

For a single stream, await processing each RPC before processing the next

awaitRpcMessageHandler: boolean

For a single RPC, await processing each message before processing the next

canRelayMessage?: boolean

if can relay messages not subscribed

dataTransform?: DataTransform
debugName?: string

Prefix tag for debug logs

decodeRpcLimits?: DecodeRPCLimits

Limits to bound protobuf decoding

directConnectTicks?: number
directPeers: AddrInfo[]

peers with which we will maintain direct connections

doPX: boolean

whether PX is enabled; this should be enabled in bootstrappers and other well connected/trusted nodes.

emitSelf?: boolean

if publish should emit to self, if subscribed

enabled?: boolean
fallbackToFloodsub: boolean

if dial should fallback to floodsub

fanoutTTL: number

fanoutTTL controls how long we keep track of the fanout state. If it's been fanoutTTL milliseconds since we've published to a topic that we're not subscribed to, we'll delete the fanout map for that topic.

fastMsgIdFn: FastMsgIdFn

fast message id function

floodPublish: boolean

if self-published messages should be sent to all peers

globalSignaturePolicy?: SignaturePolicy

defines how signatures should be handled

gossipsubIWantFollowupMs: number

customize GossipsubIWantFollowupTime in order not to apply IWANT penalties

graftFloodThreshold?: number
heartbeatInterval: number

heartbeatInterval is the time between heartbeats in milliseconds

maxInboundDataLength?: number

Specify max size to skip decoding messages whose data section exceeds this size.

maxInboundStreams?: number

Specify the maximum number of inbound gossipsub protocol streams that are allowed to be open concurrently

maxOutboundBufferSize?: number

Specify max buffer size in bytes for OutboundStream. If full it will throw and reject sending any more data.

maxOutboundStreams?: number

Specify the maximum number of outbound gossipsub protocol streams that are allowed to be open concurrently

mcacheGossip: number

mcacheGossip is the number of windows to gossip about

mcacheLength: number

mcacheLength is the number of windows to retain full messages for IWANT responses

messageCache: MessageCache

override the default MessageCache

messageProcessingConcurrency?: number

handle this many incoming pubsub messages concurrently

metricsRegister?: null | MetricsRegister
metricsTopicStrToLabel?: TopicStrToLabel
msgIdFn: MsgIdFn

message id function

msgIdToStrFn: MsgIdToStrFn

Uint8Array message id to string function

multicodecs?: string[]
opportunisticGraftPeers?: number
opportunisticGraftTicks?: number
pruneBackoff?: number
prunePeers?: number

override constants for fine tuning

pubSubTopic?: string

The PubSub Topic to use. Defaults to DefaultPubSubTopic.

One and only one pubsub topic is used by Waku. This is used by:

  • WakuRelay to receive, route and send messages,
  • WakuLightPush to send messages,
  • WakuStore to retrieve messages.

The usage of the default pubsub topic is recommended. See Waku v2 Topic Usage Recommendations for details.

Default

DefaultPubSubTopic

scoreParams: Partial<PeerScoreParams>

peer score parameters

scoreThresholds: Partial<PeerScoreThresholds>

peer score thresholds

seenTTL: number

seenTTL is the number of milliseconds to retain message IDs in the seen cache

Generated using TypeDoc