chore(coordinator): scaffold ConflationAppV2 for RISC-V cutover - #3771
chore(coordinator): scaffold ConflationAppV2 for RISC-V cutover#3771gauravahuja wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
… RISC-V cutover Add a startup assertion to ConflationAppV1 that requires riscvStartingBlockTimestampInclusive to be present in proofAggregation.timestampBasedHardForks. This is necessary so that when V1 sees the cutover block, the HARD_FORK calculator seals V1's last conflation batch (and via GlobalBlobAwareConflationCalculator, the blob and aggregation boundaries too) at the correct block before handing off to V2. Also fix the BlockCreationMonitor stop timestamp from cutover-1s to cutover, so V1 always sees the cutover block as the trigger regardless of block spacing (1s, 2s, etc.). Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
675c125 to
3d14b48
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 3d14b48. Configure here.
| BlockCreationMonitor.StartingPoint.ByBlockNumberExclusive(candidateBlock.toLong()) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Cold start skips cutover blocks
High Severity
When getLastRiscVConflatedBlock() is null but lastFinalizedBlock already has timestamp ≥ cutover, resolveStartingPoint chooses ByBlockNumberExclusive(lastFinalizedBlock) and treats it as a resume. That skips every block from the cutover through lastFinalizedBlock, so a true RISC-V cold start after L1 has moved past the cutover never processes those blocks.
Triggered by project rule: Bugbot Review Instructions
Reviewed by Cursor Bugbot for commit 3d14b48. Configure here.


#3086
Summary
ConflationAppV2, the RISC-V conflation app that monitors L2 blocks from the cutover timestamp onward.ConflationAppV1is updated to stop atmin(riscvStartingBlockTimestampInclusive - 1s, forceStopConflationAtBlockTimestampInclusive)so V1 and V2 hand off cleanly.ConflationAppV2is wired intoCoordinatorAppand only instantiated whenriscvStartingBlockTimestampInclusiveis configured.Design
Starting point resolution (
resolveStartingPoint): onstart(), V2 fetchesmax(lastFinalizedBlock, lastRiscVConflatedBlock)and checks its timestamp against the cutover:ByTimestampInclusive(cutover)— cold start, polls until L2 reaches cutover then binary-searches for the exact first blockByBlockNumberExclusive(candidateBlock)— restart, resumes from last known blockStubs (to be replaced):
getLastRiscVConflatedBlock()returnsnull— wired to RISC-V execution proof repository once implementedblockCreationListenerlogs the block number — wired toExecutionProofGeneratingCoordinatoronce the pipeline is readyInternal dependencies (not constructor params):
lastProvenBlockNumberProvider—BatchesRepoBasedLastProvenBlockNumberProvider, same as V1targetCheckpointPauseController— no-op (V2 has no checkpoint pausing)Note
Medium Risk
Changes conflation lifecycle and V1 stop boundaries at a hard-fork cutover; misconfiguration could affect where V1 stops, though V2 does not yet process proofs.
Overview
Introduces
ConflationAppV2, a scaffold that watches L2 blocks from the RISC-V cutover onward and will feed the RISC-V execution proof pipeline. It is created only whenriscvStartingBlockTimestampInclusiveis set and is started/stopped alongside V1 inCoordinatorApp.ConflationAppV1is adjusted for a clean handoff: it requires the cutover timestamp to appear intimestampBasedHardForks, and its block monitor’slastL2BlockTimestampToProcessInclusivebecomes the minimum of the cutover timestamp and any existing force-stop timestamp so V1 can seal its last batch at the cutover block.V2 resolves a
BlockCreationMonitorstarting point on startup (wait for cutover vs resume by block number). Proof progress and real conflation are stubbed—the listener only logs blocks andgetLastRiscVConflatedBlock()always returns null until later work lands.Reviewed by Cursor Bugbot for commit 3d14b48. Bugbot is set up for automated code reviews on this repo. Configure here.