Skip to content

Conversation

@maximopalopoli
Copy link
Collaborator

@maximopalopoli maximopalopoli commented Nov 25, 2025

Description

This PR turns the fixed program IDs for Risc0 and SP1 to be part of a map (program ID -> proving system ID), to make the system more scalable (because it's easier to add new program IDs) and retrocompatible (because this program ID - proving system is not unique anymore, and when we update the program ID now we can also handle the previous programs).

How to test

  1. Start ethereum package:
make ethereum_package_start
  1. Start batcher after waiting for 2 minutes:
make batcher_start_ethereum_package
  1. Send SP1 and Risc0 proofs:
make batcher_send_sp1_burst BURST_SIZE=1
make batcher_send_risc0_burst BURST_SIZE=1
  1. Run proof aggregator for SP1 and RISC0:
make proof_aggregator_start AGGREGATOR=sp1
make proof_aggregator_start AGGREGATOR=risc0
  1. Verify the proofs have been aggregated:
make verify_aggregated_proof_sp1 FROM_BLOCK=0
make verify_aggregated_proof_risc0 FROM_BLOCK=0

You can also follow the steps in the l2 example README to test this example.

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Optimization
  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change crates/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@maximopalopoli maximopalopoli self-assigned this Nov 25, 2025
@maximopalopoli maximopalopoli marked this pull request as ready for review November 25, 2025 16:54
@JuArce JuArce changed the title feat: turn program IDs into a mapping feat(aggregation-mode): turn program IDs into a mapping Nov 25, 2025
Copy link
Collaborator

@JuArce JuArce left a comment

Choose a reason for hiding this comment

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

The explorer is not detecting the proving system correctly. It is missing to update

  @verifyRisc0_solidity_signature "0x54687ccf"
  @verifySp1_solidity_signature "0xf6e04ac4"

in explorer/lib/explorer/contract_managers/aligned_proof_aggregation_service.ex

Warning

This PR requires to update config files in the servers

Copy link
Member

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

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

SP1 is working but Risc0 is failing with InvalidProgramId

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Changes to gas cost

Generated at commit: 34c4d2be320aaaedfbf10d042ac30283841365c7, compared to commit: a2dcb5f519f4e7251c7fefd90b8652663defa3cf

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
AlignedLayerServiceManager createNewTask -88 ✅ -0.11%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
AlignedLayerServiceManager 4,398,072 (0) createNewTask
receive
56,910 (+36)
23,301 (0)
+0.06%
0.00%
76,638 (-88)
46,556 (-93)
-0.11%
-0.20%
77,050 (-24)
47,115 (0)
-0.03%
0.00%
77,788 (-48)
47,115 (0)
-0.06%
0.00%
256 (0)
256 (0)

Copy link
Collaborator Author

@maximopalopoli maximopalopoli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

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

Honestly, it looks much readable. I am not approving it because verifyProofInclusion not being updated on the sdk (see comment above). L2 example is working correctly.

@MarcosNicolau
Copy link
Member

Honestly, it looks much readable. I am not approving it because verifyProofInclusion not being updated on the sdk (see comment above). L2 example is working correctly.

Solved it in d5b88f6.

@MauroToscano MauroToscano changed the base branch from testnet to staging December 4, 2025 12:09
@JuArce JuArce added this pull request to the merge queue Dec 4, 2025
Merged via the queue into staging with commit 492ed20 Dec 4, 2025
8 checks passed
@JuArce JuArce deleted the feat/turn-program-ids-mapping-testnet branch December 4, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants