Skip to content

feat(prover-ray): added guest output to the public inputs - #3817

Open
Soleimani193 wants to merge 24 commits into
mainfrom
prover-ray/guest-output-integration
Open

feat(prover-ray): added guest output to the public inputs#3817
Soleimani193 wants to merge 24 commits into
mainfrom
prover-ray/guest-output-integration

Conversation

@Soleimani193

@Soleimani193 Soleimani193 commented Aug 18, 2026

Copy link
Copy Markdown
Member

This PR integrates guest output into the prover's public inputs.

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • If this change is deployed to any environment (including Devnet), E2E test coverage exists or is included in this
    PR.
  • I have informed the team of any breaking changes if there are any.

Note

High Risk
Changes how guest outputs enter the proof’s public inputs and adds a soundness-critical length constraint. A bug here could let a prover pick which output rows are attested.

Overview
Binds the guest program’s pub output memory into the prover’s public-input vector so verifiers see the values the guest wrote, in address order.

zkcdriver now records the single public-output memory (address + data columns) from the schema. risc5.RegisterGuestPublicOutputs pins that memory to a fixed length (NumGuestPublicOutputs) and opens each data cell as a public input; without the length constraint a prover could grow the left-padded module and choose which rows become public. GetGuestPublicOutputs reads those constrained cells rather than the tracer’s output map.

Core.New registers this binding after the arithmetization is defined. Tests cover a matching 8-byte guest and a 9-byte guest that must fail both verification and the length check.

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

@Soleimani193 Soleimani193 self-assigned this Aug 18, 2026
Soleimani193 and others added 21 commits August 20, 2026 16:24
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
* chore(misc): enrich R5 request/response samples

* chore(misc): rollup_spec rename parentLastProcessedFtxNumber -> parentFtxNumber

Signed-off-by: Fluent Crafter <205769460+fluentcrafter@users.noreply.github.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…omponent and milestone [skip ci]

Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
Signed-off-by: Fluent Crafter <205769460+fluentcrafter@users.noreply.github.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…or config v2 (#3799)

* feat(coordinator): add RISC-V prover and protocol config to coordinator config v2

- Make ProverToml.blobCompression optional and add rollup alternative (from PR #3796)
- Rename ProverDirectoriesToml → ProverConfigToml and add guestProgramId field
- Add guestProgramId to FileBasedProverConfig
- Add riscvProver: ProverToml? to CoordinatorConfigFileToml (TOML key: riscv-prover)
- Add riscvProversConfig: ProversConfig? to CoordinatorConfig
- Add ProtocolConfig.RiscvConfig (coinbase, chainId, forkName) and ProtocolToml.RiscvToml
- Add XOR init validation in ProverToml (exactly one of blobCompression/rollup required)
- Update ConflationAppV1 and ConflationBacktestingApp for nullable blobCompression
- Add RiscVProverParsingTest; update CoordinatorConfigTest and ProtocolParsingTest
- Add live [riscv-prover] and [protocol.riscv] blocks to coordinator-config-v2.toml

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

* feat(coordinator): move forkName from ProverConfig to FileBasedProverConfig

forkName is specific to an individual prover's execution config rather
than the prover group; moving it to FileBasedProverConfig aligns it with
guestProgramId which lives at the same level. In TOML, fork-name now sits
under each [*-prover.execution] sub-section instead of the top-level
[*-prover] section.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

---------

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…omponent and milestone [skip ci]

Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…support (#3800)

- Extract ABProverClientRouter.create() companion method from ProverClientFactory
  so the routing logic is shared and not duplicated
- Add BlockInterval fallback in StartBlockNumberBasedSwitchPredicate to support
  L2ExecutionProofRequestV1 and BlockIntervalProofIndex without listing them explicitly
- Add RiscvProverClientFactory in riscv-client that creates an L2ExecutionProverClient
  backed by FileBasedProverProofTransport, with A/B routing and the same
  GaugeAggregator waiting-response metrics pattern as ProverClientFactory
- ProverClientFactory call sites now call ABProverClientRouter.create directly

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…s spec (#3801)

Replace BlobWitness with ConflationWitness (blockRlps only), reshape
RollupProofRequestV1 (conflations, chunks, parentDataRollingHash,
startOffset, opaque prefix/suffix, boundaryPrevDataRollingHash) and
expand RollupProofPublicInputs from 14 to 20 fields
(parentDataRollingHash, endDataRollingHash, parentBlockHash,
endBlockHash, startOffset, endOffset, programVks).

Update RiscVProofDtos, both request mappers, response mappers and all
test fixtures/tests in the riscv-client to match the updated schemas in
rollup_spec/prover_io/schemas/.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…omponent and milestone [skip ci]

Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…#3810)

Signed-off-by: AlexandreBelling <alexandrebelling8@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
… schemas and testdata (#3814)

Aligns the request envelope field name with the response field added in
2963881 (programVk on responses). Updates all three request schemas
(l2-execution, rollup, rollup-aggregation), their testdata fixtures, and
all prose references in README files and proof_io_v1.py comments.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
* feat(misc): rename guestProgramId to programVk in prover-ray

- Renames guestProgramID → programVk (key, struct field, size const) in
  request.go decoder and all associated test cases
- Adds programVk field to executionResponse and threads req.ProgramVk
  through newExecutionResponse in runner.go
- Updates local request testdata fixtures (single/multi block)
- Syncs rollup_spec reference fixture to use programVk key

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

* fix(misc): wrap newExecutionResponse signature to satisfy lll lint rule

Function signature exceeded the 120-character line limit enforced by
golangci-lint (lll linter). Split the parameter list across two lines.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

---------

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…3816)

Renames the 32-byte verifying-key field from guestProgramId → programVk
across all coordinator Kotlin sources to match the rollup_spec wire
contract rename:

- FileBasedProverConfig.guestProgramId → programVk
- ProverToml.ProverConfigToml.guestProgramId → programVk (+ description update)
- 5 request DTOs in RiscVProofDtos.kt
- L2ExecutionProverClient, RollupProverClient, RollupAggregationProverClient
  (mapper class fields, constructor params, DTO construction call-sites)
- RiscvProverClientFactory (requireNotNull access + error message)
- RiscVProverParsingTest: TOML strings (guest-program-id → program-vk),
  Kotlin field names, test method name, assertions
- 3 constants in RiscVProverClientTestFixtures: *_GUEST_PROGRAM_ID → *_PROGRAM_VK
- RiscVProofRequestDtoMapperTest: property references shared fixture constant
- 6 prover client tests: imports + named args
- docker/coordinator-config-v2.toml: guest-program-id → program-vk
- Regenerated coordinator-config-reference.md and coordinator-config-schema.json

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…omponent and milestone [skip ci]

Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
#3818)

* feat(misc): add programVk to rollup proof response schema and testdata

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

* feat(misc): add programVk to encode_rollup_response and update tests

Thread program_vk through encode_rollup_response, encode_rollup_response_json,
and run_rollup_from_request_json so the rollup response emits programVk —
mirroring the L2-execution response pattern. Update the two rollup response
tests to pass program_vk=_ROLLUP_VK and assert the emitted field.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

---------

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…ponse chain (#3819)

* feat(coordinator): add programVk to L2 execution and rollup proof response chain

Thread programVk from the RISC-V prover response DTOs through to the
domain types (L2ExecutionProofResponseV1, RollupProofResponseV1) and
embed it in downstream proof request DTOs (L2ExecutionProofDto,
RollupProofDto) so aggregation provers receive the verifying key hash
alongside each proof.

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

* fix(coordinator): fix ExecutionPayloadDto.baseFeePerGas type and response DTO proverVersion nullability

- Change ExecutionPayloadDto.baseFeePerGas from BigInteger to String, serialized
  as a 0x-prefixed hex quantity to match the rollup_spec schema definition
- Add BigInteger.toHexString() extension to TypingsExtensions (mirrors ULong.toHexString)
- Make proverVersion non-nullable in L2ExecutionProofResponseDto, RollupProofResponseDto,
  and RollupAggregationProofResponseDto to match the required constraint in all three
  response schemas

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>

---------

Signed-off-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
…omponent and milestone [skip ci]

Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
* fix(prover-ray): fix range check bug

Signed-off-by: Bogdan Ursu <bogdanursuoffice@gmail.com>

* fix(prover-ray): range check bug test

Signed-off-by: Bogdan Ursu <bogdanursuoffice@gmail.com>

* fix(prover-ray): adding panic when running the wrong size function for dynamic modules

Signed-off-by: Bogdan Ursu <bogdanursuoffice@gmail.com>

---------

Signed-off-by: Bogdan Ursu <bogdanursuoffice@gmail.com>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
#3803)

* chore(ci): skip linea-besu publish if has-changes-requiring-linea-besu-package-build is false

Signed-off-by: jonesho <jones.ho@consensys.net>

* chore(ci): revise based on comment

Signed-off-by: jonesho <jones.ho@consensys.net>

---------

Signed-off-by: jonesho <jones.ho@consensys.net>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
Signed-off-by: Soleimani193 <azam.soleimanian@ens.fr>
@Soleimani193
Soleimani193 force-pushed the prover-ray/guest-output-integration branch from 4faa98a to f512fe2 Compare August 20, 2026 14:27
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AlexandreBelling AlexandreBelling added the Prover-RAY All issues or PR relevant to the establishment of the framework in prover-ray label Aug 24, 2026
@Soleimani193
Soleimani193 marked this pull request as ready for review August 24, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Prover-RAY All issues or PR relevant to the establishment of the framework in prover-ray

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants