Optional
allowedDo not throw PublishError.NoPeersSubscribedToTopic
error if there are no
peers listening on the topic.
N.B. if you sent this option to true, and you publish a message on a topic with no peers listening on that topic, no other network node will ever receive the message.
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.
For a single stream, await processing each RPC before processing the next
For a single RPC, await processing each message before processing the next
serialize message once and send to all peers without control messages
Optional
canif can relay messages not subscribed
D sets the optimal degree for a Gossipsub topic mesh.
Optional
dataOptional
debugPrefix tag for debug logs
Optional
decodeLimits to bound protobuf decoding
Dhi sets the upper bound on the number of peers we keep in a Gossipsub topic mesh.
Optional
directpeers with which we will maintain direct connections
Dlazy affects the minimum number of peers we will emit gossip to at each heartbeat.
Dlo sets the lower bound on the number of peers we keep in a Gossipsub topic mesh.
whether PX is enabled; this should be enabled in bootstrappers and other well connected/trusted nodes.
Dout sets the quota for the number of outbound connections to maintain in a topic mesh.
Dscore affects how peers are selected when pruning a mesh due to over subscription.
Optional
emitif publish should emit to self, if subscribed
if dial should fallback to floodsub
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.
fast message id function
if self-published messages should be sent to all peers
Optional
globaldefines how signatures should be handled
Specify what percent of peers to send gossip to. If the percent results in
a number smaller than Dlazy
, Dlazy
will be used instead.
It should be a number between 0 and 1, with a reasonable default of 0.25
customize GossipsubIWantFollowupTime in order not to apply IWANT penalties
Optional
graftheartbeatInterval is the time between heartbeats in milliseconds
Optional
idontwantThe maximum number of IDONTWANT messages per heartbeat per peer
Optional
idontwantThe minimum message size in bytes to be considered for sending IDONTWANT messages
Do not throw PublishError.Duplicate
if publishing duplicate messages
Optional
maxSpecify max size to skip decoding messages whose data section exceeds this size.
Optional
maxSpecify the maximum number of inbound gossipsub protocol streams that are allowed to be open concurrently
Optional
maxSpecify max buffer size in bytes for OutboundStream. If full it will throw and reject sending any more data.
Optional
maxSpecify the maximum number of outbound gossipsub protocol streams that are allowed to be open concurrently
mcacheGossip is the number of windows to gossip about
mcacheLength is the number of windows to retain full messages for IWANT responses
override the default MessageCache
Optional
messagehandle this many incoming pubsub messages concurrently
Optional
metricsOptional
metricsmessage id function
Uint8Array message id to string function
Optional
opportunisticOptional
opportunisticOptional
protocolsOverride the protocol registered with the registrar
Optional
pruneOptional
pruneoverride constants for fine tuning
Optional
runPass true to run on limited connections - data or time-limited connections that may be closed at any time such as circuit relay connections.
peer score parameters
peer score thresholds
seenTTL is the number of milliseconds to retain message IDs in the seen cache
If true, will utilize the libp2p connection manager tagging system to prune/graft connections to peers, defaults to true
Optional
unsubcribe
If provided, only allow topics in this list