Skip to content

Conversation

@prox3000
Copy link

This change adds comprehensive disconnection tracking and gap detection for both Yellowstone gRPC and RPC WebSocket datasources.

Key features:

  • New DatasourceDisconnection struct in carbon-core with source identification
  • 30-second timeout for detecting hung connections
  • Gap calculation (missed slots) between disconnect and reconnect
  • Warning-level logging for disconnection events
  • Optional disconnect notification channel for consumers

Implementation details:

  • Yellowstone gRPC: Added timeout wrapper and gap tracking with state persistence
  • RPC WebSocket: Added timeout, reconnection logic, and gap calculation
  • Both datasources identify themselves via 'source' field
  • State variables persist across reconnection attempts for accurate gap tracking
  • Debug logging for troubleshooting reconnection flow

Files modified:

  • carbon-core: Added DatasourceDisconnection struct and chrono dependency
  • yellowstone-grpc-datasource: Added timeout, gap tracking, disconnect notifications
  • rpc-block-subscribe-datasource: Added timeout, reconnection, gap tracking, chrono dependency

This change adds comprehensive disconnection tracking and gap detection
for both Yellowstone gRPC and RPC WebSocket datasources.

Key features:
- New DatasourceDisconnection struct in carbon-core with source identification
- 30-second timeout for detecting hung connections
- Gap calculation (missed slots) between disconnect and reconnect
- Warning-level logging for disconnection events
- Optional disconnect notification channel for consumers

Implementation details:
- Yellowstone gRPC: Added timeout wrapper and gap tracking with state persistence
- RPC WebSocket: Added timeout, reconnection logic, and gap calculation
- Both datasources identify themselves via 'source' field
- State variables persist across reconnection attempts for accurate gap tracking
- Debug logging for troubleshooting reconnection flow

Files modified:
- carbon-core: Added DatasourceDisconnection struct and chrono dependency
- yellowstone-grpc-datasource: Added timeout, gap tracking, disconnect notifications
- rpc-block-subscribe-datasource: Added timeout, reconnection, gap tracking, chrono dependency
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