Skip to content

feat: support multiple flashblock websockets as fallback#202

Draft
limyeechern wants to merge 4 commits intosync-developfrom
feat/multi-fb-ws
Draft

feat: support multiple flashblock websockets as fallback#202
limyeechern wants to merge 4 commits intosync-developfrom
feat/multi-fb-ws

Conversation

@limyeechern
Copy link
Collaborator

Summary

  • Add MultiSourceFlashBlockStream that wraps multiple WebSocket flashblock streams with deduplication,
    cross-validation, and per-source error backoff
  • Change --flashblocks-url to --flashblocks-urls to accept multiple comma-separated URLs for redundancy
  • First-arriving flashblock for each (payload_id, index) wins; duplicates are dropped with hash cross-validation
  • Per-source backoff (500ms) on errors so healthy sources continue serving while a failed source recovers

@limyeechern limyeechern marked this pull request as draft February 27, 2026 11:09
use tracing::warn;

/// Backoff duration applied per-source when a stream error occurs.
const PER_SOURCE_BACKOFF: Duration = Duration::from_millis(500);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i was wondering if we should implement exponential backoff instead, but i'm not too sure which is better

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