Skip to content

Comments

feat(CCHAIN-1105): Add GossipSub explicit peering #1491

Open
ancazamfir wants to merge 2 commits intocirclefin:mainfrom
ancazamfir:explicit-peering
Open

feat(CCHAIN-1105): Add GossipSub explicit peering #1491
ancazamfir wants to merge 2 commits intocirclefin:mainfrom
ancazamfir:explicit-peering

Conversation

@ancazamfir
Copy link
Contributor

Closes: #XXX

Summary

Add support for GossipSub explicit peering to ensure reliable message delivery between validators, bypassing mesh formation dynamics.

  • Add enable_explicit_peering and enable_flood_publish configuration options to GossipSubConfig
  • When explicit peering is enabled, persistent peers are automatically added as explicit peers in GossipSub
  • Add explicit_peers metric to track active explicit peer connections
  • Force flood_publish=false when explicit peering is enabled (with warning if overriding config)

GossipSub mesh formation is probabilistic and can result in validators not being directly meshed with each other, requiring messages to traverse through full nodes or rely on IHAVE/IWANT gossip.

Configuration

Enable via environment variable:

MALACHITE__CONSENSUS__P2P__PROTOCOL__ENABLE_EXPLICIT_PEERING=true

Or in config.toml:

[consensus.p2p.protocol]
enable_explicit_peering = true

Testing

  • Start testnet with explicit peering enabled
  • Verify validators have zero mesh peers but consensus progresses
  • Check that explicit_peers metric shows expected connections

PR author checklist

Contribution eligibility

  • I am a core contributor, OR I have been explicitly assigned to the linked issue
  • I have read CONTRIBUTING.md and my PR complies with all requirements
  • I understand that PRs not meeting these requirements will be closed without review

For all contributors

For external contributors

@ancazamfir ancazamfir requested a review from romac as a code owner February 20, 2026 08:33
@ancazamfir ancazamfir changed the title feat(network): Add GossipSub explicit peering feat(CCHAIN-1105): Add GossipSub explicit peering Feb 20, 2026
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