feat: add sequencer/rpc mode for flashblock preconfirmations#214
feat: add sequencer/rpc mode for flashblock preconfirmations#214fridrik01 wants to merge 5 commits intorezbera/use-modular-flashblocksfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 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