feat: add sequencer/rpc mode for flashblock preconfirmations#214
Draft
fridrik01 wants to merge 4 commits intorezbera/use-modular-flashblocksfrom
Draft
feat: add sequencer/rpc mode for flashblock preconfirmations#214fridrik01 wants to merge 4 commits intorezbera/use-modular-flashblocksfrom
fridrik01 wants to merge 4 commits intorezbera/use-modular-flashblocksfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
26dfe7d to
1ddecc8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds flashblock support to bera-reth and introduces two modes:
Sequencer mode (
--sequencer-enabled)--flashblock-signing-key <path>Path to BLS secret key file (required)--flashblock-ws-addr <addr>WebSocket bind address (default:0.0.0.0:8548)--flashblock-interval-ms <ms>Emission interval (default:200)The payload builder runs a loop that (as in line with preconf notion doc):
--builder.deadline)Each flashblock contains:
Also, a single publisher broadcasts to all connected WebSocket subscribers.
RPC consumer mode (--flashblocks-url )
RPC nodes connect to a sequencer's WebSocket endpoint and subscribe to flashblocks. Incoming flashblocks are processed and used to override the Eth JSON-RPC layer so that latest and pending queries reflect sub-block state. Blocks, transaction counts, receipts, state, gas price, and call execution all serve in-progress flashblock data without the node needing to run as a sequencer.
Test plan
See test plan in berachain/beacon-kit#3005