Skip to content

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Aug 8, 2024

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
  • new metrics
    • gossipsub_rpc_sent_idontwant_total
    • gossipsub_idontwant_rcv_msgids_total
    • gossipsub_idontwant_rcv_dont_have_msgids_total

@wemeetagain wemeetagain requested a review from a team as a code owner August 8, 2024 20:35
@wemeetagain wemeetagain merged commit 5481add into master Sep 13, 2024
9 checks passed
@wemeetagain wemeetagain deleted the feat/idontwant branch September 13, 2024 15:04
wemeetagain pushed a commit to ChainSafe/lodestar that referenced this pull request Jun 6, 2025
**Motivation**

We enabled `IDONTWANT` a while ago but haven't added panels for it yet.

**Description**

Add panels for `IDONTWANT` metrics to gossipsub dashboard


![image](https://github.com/user-attachments/assets/8c39f565-81aa-4ba7-8171-e52cc296da65)


Related ChainSafe/js-libp2p-gossipsub#498
KatyaRyazantseva pushed a commit to KatyaRyazantseva/lodestar that referenced this pull request Jun 19, 2025
…Safe#7924)

**Motivation**

We enabled `IDONTWANT` a while ago but haven't added panels for it yet.

**Description**

Add panels for `IDONTWANT` metrics to gossipsub dashboard


![image](https://github.com/user-attachments/assets/8c39f565-81aa-4ba7-8171-e52cc296da65)


Related ChainSafe/js-libp2p-gossipsub#498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant