Skip to content

Conversation

SozinM
Copy link
Collaborator

@SozinM SozinM commented Oct 14, 2025

This PR contains breaking changes!

  1. Now when websocket connection is closed via cancel token we explicitly send Closing frame.
  2. Cli params changes:
    --flashblock-builder-ws-reconnect-ms was changed, now it consists of 2 params:
    --flashblock-builder-ws-initial-reconnect-ms and --flashblock-builder-ws-max-reconnect-ms that are used in explonential backoff with multiplier 1.5 (timeout increased by 50% every unsuccessful reconnections and reset on successful connection)
  3. Cli params added:
    --flashblock-builder-ws-ping-interval-ms - how often send pings
    --flashblock-builder-ws-pong-timeout-ms - timeout for pong. If we haven't receive pong for ping that we send for timeout - close connection.
  4. Now we send proper data (uuid v7) in pings and expect correct pongs.

@SozinM SozinM requested a review from avalonche October 14, 2025 15:30
Copy link

vercel bot commented Oct 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rollup-boost Ignored Ignored Preview Oct 16, 2025 10:22am

@avalonche
Copy link
Collaborator

does it have any backwards compatibility issues?

@akundaz
Copy link
Contributor

akundaz commented Oct 14, 2025

Have you looked at the https://github.com/Xuanwo/backon crate? It's more ergonomic and seems to be actively maintained

@avalonche
Copy link
Collaborator

would be good to add integration tests

@avalonche avalonche changed the title Improve ping/pong logic [breaking-change] Improve ping/pong logic Oct 16, 2025
@SozinM SozinM enabled auto-merge (squash) October 17, 2025 18:07
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