Skip to content

WIP: feat(coordinator): implement RollupProofGeneratingCoordinator for RISC-V rollup proofs - #3747

Draft
gauravahuja wants to merge 1 commit into
mainfrom
feat/riscv-rollup-proof-coordinator
Draft

WIP: feat(coordinator): implement RollupProofGeneratingCoordinator for RISC-V rollup proofs#3747
gauravahuja wants to merge 1 commit into
mainfrom
feat/riscv-rollup-proof-coordinator

Conversation

@gauravahuja

@gauravahuja gauravahuja commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds `RollupProofGeneratingCoordinator`, `RollupRequestBuilder`, and `RollupProofHandler` to `coordinator/core` for the Type-1 RISC-V conflation flow.

  • Receives `Blob` events, accumulates K blobs (`Config.blobsPerRollupProof`, default 1 per the RISC-V spec decision to keep K=1 for initial rollout), then builds a `RollupProofRequestV1` via `RollupRequestBuilder`
  • Submits idempotently through `RollupProverClientV1`, tracks pending `BlockIntervalProofIndex` entries, and polls for responses via `VertxPeriodicPollingService`
  • Delivers `RollupProofResponseV1` to `RollupProofHandler` for persistence
  • K>1 is supported for future amortisation of the rollup proof's recursive verification overhead; the `blobsPerRollupProof` config knob enables it without code changes
  • Mirrors the submit-then-poll lifecycle of `BlobCompressionProofCoordinator` (Type-2 flow)

Test plan

  • Unit tests: K=1 happy path, K>1 accumulation, already-proven skip on restart, retry on transient failure

Note

Medium Risk
New core conflation/proof orchestration on the critical blob→proof path; misconfiguration of K or polling could delay or duplicate proof handling, though idempotent submit and already-proven handling reduce restart risk.

Overview
Introduces RollupProofGeneratingCoordinator for the Type-1 RISC-V conflation path: it implements BlobCreationHandler and a periodic poller to drive rollup proof generation end-to-end.

Incoming Blob events are buffered until Config.blobsPerRollupProof (default K=1) is reached, then RollupRequestBuilder builds a RollupProofRequestV1. The coordinator submits via RollupProverClientV1, tracks in-flight BlockIntervalProofIndex values, polls up to rollupProofPollsPerTick per tick, and on success calls RollupProofHandler—including an already-proven fast path when findProofResponse returns immediately. Transient failures use AsyncRetryer with configurable backoff.

RollupRequestBuilder and RollupProofHandler are small fun interfaces for wiring request construction and persistence. Metrics cover blob intake, queue depth, pending proofs, and blob size histograms.

Reviewed by Cursor Bugbot for commit ba57c44. Bugbot is set up for automated code reviews on this repo. Configure here.

…C-V rollup proofs

Adds RollupProofGeneratingCoordinator, RollupRequestBuilder, and RollupProofHandler
to coordinator/core for the Type-1 RISC-V conflation flow.

The coordinator receives Blob events from the blob-aware calculator, accumulates K
blobs (Config.blobsPerRollupProof, default 1 per the RISC-V spec decision to keep
K=1 for initial rollout), then builds a RollupProofRequestV1 via RollupRequestBuilder
and submits it through RollupProverClientV1. Completed proofs are delivered to
RollupProofHandler. Mirrors the submit-then-poll lifecycle of BlobCompressionProofCoordinator.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
@gauravahuja gauravahuja self-assigned this Aug 7, 2026
@gauravahuja
gauravahuja requested a deployment to docker-build-and-e2e August 7, 2026 14:37 — with GitHub Actions Waiting

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit ba57c44. Configure here.

name = "compression.queue.size",
description = "Number of blobs accumulated and waiting to form a rollup proof request",
measurementSupplier = { pendingBlobs.size },
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colliding rollup queue metric name

Medium Severity

The pending-blob accumulation gauge is registered as compression.queue.size under LineaMetricsCategory.BLOB, the same name already used by BlobCompressionProofCoordinator. Micrometer keeps the first registration, so one supplier is ignored and the gauge reports the wrong queue. The shared counter / blocks.size / batches.size names have the same collision risk during Type-1/Type-2 coexistence.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: Bugbot Review Instructions

Reviewed by Cursor Bugbot for commit ba57c44. Configure here.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 131 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...n/riscv/rollup/RollupProofGeneratingCoordinator.kt 0.00% 131 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gauravahuja
gauravahuja marked this pull request as draft August 10, 2026 10:00
@gauravahuja gauravahuja changed the title feat(coordinator): implement RollupProofGeneratingCoordinator for RISC-V rollup proofs WIP: feat(coordinator): implement RollupProofGeneratingCoordinator for RISC-V rollup proofs Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant