Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR extends the flashblocks feature to publish synced flashblocks via WebSocket in addition to the existing P2P publishing mechanism. The main architectural change moves WebSocket publisher initialization to the service level so it can be shared between the payload builder (for locally built blocks) and payload handler (for synced blocks).
Key Changes:
- WebSocket publisher is now instantiated at the service level and passed to both payload builder and handler components
- Payload handler enhanced to publish received/synced flashblocks via WebSocket after successful execution
- Refactored
OpPayloadBuilder::new()to accept pre-initialized WebSocket publisher instead of creating it internally
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| service.rs | Instantiates WebSocket publisher at service level and passes it to payload builder and handler |
| payload_handler.rs | Adds WebSocket publishing for synced flashblocks with metrics recording |
| payload.rs | Refactors constructor to accept WebSocket publisher as parameter instead of creating it |
| ctx.rs | Adds accessor method for metrics used in publishing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
What's the point of this? |
|
@SozinM it would allow RPC providers to get the flashblock stream from non-active builders as well, and allows us to easily ensure that the non-active builders are syncing properly. |
📝 Summary
✅ I have completed the following steps:
make lintmake test