-
Notifications
You must be signed in to change notification settings - Fork 161
[consensus/simplex] WebSocket reporter #2030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pondering where the best place is to put these "stock" reporters. Admittedly, it feels very right to put here (although I don't love that this crate knows about tokio)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could have a consensus-extras crate? Although it probably makes sense to keep AttributableReporter in consensus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the TUI could go in consensus-extras as well.
Deploying monorepo with
|
| Latest commit: |
af1322f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0f77eb8c.monorepo-eu0.pages.dev |
| Branch Preview URL: | https://andre-simplex-websocket-repo.monorepo-eu0.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2030 +/- ##
==========================================
- Coverage 92.35% 92.33% -0.02%
==========================================
Files 313 313
Lines 83834 83808 -26
==========================================
- Hits 77426 77387 -39
- Misses 6408 6421 +13
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This PR adds a WebSocket reporter for the simplex consensus engine that streams real-time consensus activities as binary over the network. The reporter uses a broadcast channel with two components: a
WebSocketReporterthat implements theReportertrait and can be passed to the consensus engine, and a separate consumableWebSocketServeractor that handles the actual WebSocket connections. When clients connect, they first receive a context message containing participant information followed by a continuous stream ofActivitymessages. The implementation requires a tokio runtime and uses tokio-tungstenite for the WebSocket server.Related #1921.