Skip to content

fix(wspub): add flashblocks payload subscriber count limit#373

Merged
avalonche merged 2 commits intoflashbots:mainfrom
okx:niven/ws-subscribe-limit
Feb 4, 2026
Merged

fix(wspub): add flashblocks payload subscriber count limit#373
avalonche merged 2 commits intoflashbots:mainfrom
okx:niven/ws-subscribe-limit

Conversation

@sieniven
Copy link
Contributor

📝 Summary

Adds a maximum number of websocket subscriber limit on the wspub server.

✅ I have completed the following steps:

  • [✅] Run make lint
  • [✅] Run make test
  • Added tests (if applicable)

* feat: add subscriber limit for websocket connections

* fix: change args

* fix: add return error message

* fix: change log level & make lint

* chore: update imports

* chore: increment after check, change log level

* fix: change subscriber limit to u16 from Option

* chore: inline code

* chore: update comments
@sieniven sieniven changed the title feat: add flashblocks payload subscriber count limit fix(wspub): add flashblocks payload subscriber count limit Jan 22, 2026
#[arg(
long = "flashblocks.ws-subscriber-limit",
env = "FLASHBLOCK_WS_SUBSCRIBER_LIMIT",
default_value = "256"
Copy link
Collaborator

Choose a reason for hiding this comment

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

could the default be no limit? this way it would be a backwards compatible change

Copy link
Contributor Author

@sieniven sieniven Jan 28, 2026

Choose a reason for hiding this comment

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

Hmm, the default was added here because it helps protect the node against perhaps an attack vector (like ddos)? Will it be better if we tune the default value up instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avalonche hey! eba797b resolves the issue by switching the sub limit to an option instead, and removes the default limit size.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@sieniven op-rbuilder flashblocks websocket should be accesses only by rollup-boosts

@sieniven sieniven requested a review from avalonche February 2, 2026 05:50
@avalonche avalonche enabled auto-merge (squash) February 4, 2026 03:35
@avalonche avalonche merged commit 8863dad into flashbots:main Feb 4, 2026
4 checks passed
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.

4 participants