Add support for gossipsub 1.2, namely, IDONTWANT support.
Behavior
The first time a message is seen, prevalidation, send IDONTWANT to mesh peers (that aren't the sender and that support 1.2) if the message data is gte idontwantMinDataSize
Track per-heartbeat count of IDONTWANTs received from peers
Track IDONTWANTs received from peers, along with the heartbeat tick that the IDONTWANT was received
Prune IDONTWANT counts in the heartbeat
Prune tracked IDONTWANTs in the heartbeat, only keep IDONTWANTs for mcacheLength number of heartbeats
Prune IDONTWANT counts and tracked IDONTWANTs on peer removal
Prune IDONTWANT counts and tracked IDONTWANTs on stop
New metrics track sent / received IDONTWANT count and IDONTWANT count of messages we haven't yet received (to track the "savings" of IDONTWANT)
Configuration
new opts:
idontwantMinDataSize - The minimum message size in bytes to be considered for sending IDONTWANT messages. Below this, no IDONTWANT is sent. - default 512
idontwantMaxMessages - The maximum number of IDONTWANT messages per heartbeat per peer. IDONTWANTs received beyond this limit are ignored. - default 512
Add support for gossipsub 1.2, namely, IDONTWANT support.
Behavior
idontwantMinDataSize
mcacheLength
number of heartbeatsConfiguration
idontwantMinDataSize
- The minimum message size in bytes to be considered for sending IDONTWANT messages. Below this, no IDONTWANT is sent. - default 512idontwantMaxMessages
- The maximum number of IDONTWANT messages per heartbeat per peer. IDONTWANTs received beyond this limit are ignored. - default 512gossipsub_rpc_sent_idontwant_total
gossipsub_idontwant_rcv_msgids_total
gossipsub_idontwant_rcv_dont_have_msgids_total