Skip to content

chore: bump the pubsub validation queue length to 256#13176

Merged
masih merged 1 commit intomasterfrom
masih/validation-queue
Jun 18, 2025
Merged

chore: bump the pubsub validation queue length to 256#13176
masih merged 1 commit intomasterfrom
masih/validation-queue

Conversation

@masih
Copy link
Copy Markdown
Member

@masih masih commented Jun 13, 2025

Increase the pubsub validation queue length to 256, to accommodate the increased rate of message exchange as a result of F3. Note that there's
no topic-specific option for this setting, hence the bump at top-level
pubsub instantiation.

Relates to: libp2p/go-libp2p-pubsub#621

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Jun 13, 2025
@masih masih marked this pull request as ready for review June 13, 2025 13:34
Copilot AI review requested due to automatic review settings June 13, 2025 13:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR bumps the pubsub validation queue length to 4096 to better handle the increased rate of gossipsub message exchanges driven by F3. The changes include updating the pubsub instantiation in the code and adding an entry to the CHANGELOG.

  • Updated the pubsub module to use a validation queue size of 4096.
  • Updated the CHANGELOG to document the change.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
node/modules/lp2p/pubsub.go Extended the pubsub options to include a higher validation queue size.
CHANGELOG.md Added an entry documenting the change to the validation queue size.

@masih
Copy link
Copy Markdown
Member Author

masih commented Jun 13, 2025

Many thanks to @dennis-tra at Probelab for pointing this out.

@masih masih requested a review from Kubuxu June 13, 2025 13:36
@masih masih marked this pull request as draft June 13, 2025 13:45
@masih
Copy link
Copy Markdown
Member Author

masih commented Jun 13, 2025

Marked as draft to look into max message size (default 1MiB in go-libp2p-pubsub) unconfigured in Lotus.

@masih
Copy link
Copy Markdown
Member Author

masih commented Jun 13, 2025

We know from Dennis that 2048 would be effective but not as much as we ideally want. Not sure what size would be a good compromise.

@dennis-tra
Copy link
Copy Markdown

Great @masih! I know from our Hermes deployment that 2048 still results in some discarded messages, so bumping to 4096 sounds reasonable to make sure that we don't miss any.

@Kubuxu
Copy link
Copy Markdown
Contributor

Kubuxu commented Jun 13, 2025

@dennis-tra FYI, we optimised the validator (it could take a while to process the first message of an instance) in more recent go-f3 commits and lotus (go-f3 is not yet merged), so we expect maybe that to help.

@dennis-tra
Copy link
Copy Markdown

I'm at github.com/filecoin-project/go-f3 v0.8.4. I just checked and the latest version is v0.8.6. However, I copied the validation bits to Hermes:

I can't remember exactly but I think the validation functions weren't exposed back when I worked on that.

go-f3 is not yet merged

I can't see an open PR, so what's the latest state regarding the validation logic that I should look into?

@Kubuxu
Copy link
Copy Markdown
Contributor

Kubuxu commented Jun 16, 2025

Here is Lotus with latest go-f3 #13144
I'm going to bump it to 0.8.6 today and merge.

Increase the pubsub validation queue length to 256, to accommodate the
increased rate of message exchange as a result of F3. Note that there's
 no topic-specific option for this setting, hence the bump at top-level
 pubsub instantiation.

 Relates to: libp2p/go-libp2p-pubsub#621
@masih masih force-pushed the masih/validation-queue branch from ebff113 to 089e886 Compare June 17, 2025 13:37
@masih
Copy link
Copy Markdown
Member Author

masih commented Jun 17, 2025

@Kubuxu I ran a bunch of experiments on our test node and it seems like 256 is the smallest queue size with almost no impact on validation queue getting full. observed a dozen of such instances while running the test for ~30 minutes. I think this is an acceptable level of message loss and a massive improvement from the default of 32.

@masih masih changed the title chore: bump the pubsub validation queue length to 4096 chore: bump the pubsub validation queue length to 256 Jun 17, 2025
@masih masih marked this pull request as ready for review June 17, 2025 13:39
@BigLep BigLep added this to F3 Jun 17, 2025
@github-project-automation github-project-automation bot moved this to Todo in F3 Jun 17, 2025
@BigLep BigLep moved this from Todo to In review in F3 Jun 17, 2025
@BigLep
Copy link
Copy Markdown
Member

BigLep commented Jun 17, 2025

For completeness if maintainers want the full context, this started out of an internal discussion in https://filecoinproject.slack.com/archives/C08715YFQH5/p1749815281170279

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Jun 18, 2025
@masih masih merged commit 739ad9f into master Jun 18, 2025
103 of 104 checks passed
@masih masih deleted the masih/validation-queue branch June 18, 2025 10:29
@github-project-automation github-project-automation bot moved this from In review to Done in F3 Jun 18, 2025
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

5 participants