Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
421e621
Remove readme file
MauroToscano Aug 25, 2025
9af1ee0
Merge branch 'testnet' of github.com:yetanotherco/aligned_layer into …
MauroToscano Oct 4, 2025
b833ecd
Merge branch 'testnet' of github.com:yetanotherco/aligned_layer into …
MauroToscano Oct 13, 2025
3637984
Merge branch 'testnet' of github.com:yetanotherco/aligned_layer into …
MauroToscano Oct 28, 2025
6ce5d48
fix: bump allow and send blobs in transaction with eip 7594
MarcosNicolau Nov 14, 2025
a81b73f
ci: bump rust version to support newer alloy version
MarcosNicolau Nov 14, 2025
c14107e
chore: ignore clippy uninlined_format_args warnings
MarcosNicolau Nov 19, 2025
4898009
chore: address clippy warnings
MarcosNicolau Nov 19, 2025
c88ec93
chore: address more clippy warnings
MarcosNicolau Nov 19, 2025
bb3786d
chore: address clippy warnings
MarcosNicolau Nov 19, 2025
7048c1b
chore: migrate ethereum package to fulu fork (#2173)
MarcosNicolau Nov 20, 2025
d50427b
feat: turn program IDs into a mapping
maximopalopoli Nov 25, 2025
6cdc1a0
infra: add vk/image id to aggregation mode templates
JuArce Nov 25, 2025
2c1df1e
update the aligned layer deployed anvil state
maximopalopoli Nov 25, 2025
b938200
update the risc0 and sp1 verify methods
maximopalopoli Nov 25, 2025
d4fe4be
emit the verifier type on the deleteProgramId method
maximopalopoli Nov 25, 2025
ba099a5
Add a modifier to ensure the provided verifier type is one of the val…
maximopalopoli Nov 25, 2025
aceefe1
Apply suggestions from code review
maximopalopoli Nov 25, 2025
e634e58
Check if the verifier type matches the one received by param on delet…
maximopalopoli Nov 25, 2025
9320f76
Remove extra as_slice conversion in ProofAggregator build
maximopalopoli Nov 25, 2025
a90843a
Remove the 0x prefix from the proof aggregator config files
maximopalopoli Nov 25, 2025
349684b
Fix: update the network params with the correct program ID
maximopalopoli Nov 26, 2025
dcb80e3
Merge branch 'testnet' into feat/turn-program-ids-mapping-testnet
maximopalopoli Nov 26, 2025
23c295f
fix: remove the 0x prefix from the risc0 aggregator image id
maximopalopoli Nov 26, 2025
6b54e1e
Fix the modifier to add and delete in proof agg service
maximopalopoli Nov 26, 2025
23919e2
Apply suggestions from code review
maximopalopoli Nov 26, 2025
0c9ec6e
Rename validVerifierType modifier to respect good practices
maximopalopoli Nov 27, 2025
09e01ce
Avoid casting to u8 in both comparation sides when checking types
maximopalopoli Nov 27, 2025
970a753
update the additional_preloaded_contracts on network params
maximopalopoli Nov 27, 2025
2dc6f93
Merge branch 'testnet' into feat/turn-program-ids-mapping-testnet
maximopalopoli Nov 27, 2025
ae78925
Merge branch 'testnet' into feat/turn-program-ids-mapping-testnet
maximopalopoli Dec 1, 2025
f8f6d45
Update the deployed contracts on network params
maximopalopoli Dec 1, 2025
ea24871
Update the program IDs in the proof aggregator configs
maximopalopoli Dec 1, 2025
0724970
Merge branch 'testnet' of github.com:yetanotherco/aligned_layer into …
MauroToscano Dec 1, 2025
e9a4014
Simplify everything
MauroToscano Dec 1, 2025
1369e88
Merge branch 'testnet' of github.com:yetanotherco/aligned_layer into …
MauroToscano Dec 1, 2025
1e61ec5
Merge main and update deploy
MauroToscano Dec 1, 2025
062bdf4
Update the proof aggregation service ABI on agg mode
maximopalopoli Dec 2, 2025
d5b88f6
fix: update sdk is_proof_verified_on_chain calling new is_proof_verif…
MarcosNicolau Dec 3, 2025
d68ece0
chore: update sdk abi
MarcosNicolau Dec 3, 2025
72e0568
fix: remove VERIFIER_MOCK_ADDRESS
JuArce Dec 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions aggregation_mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ We are using docker to produce deterministic builds so that the program ids are

### Updating the program id in `AlignedProofAggregationService` contract

If the program ids have changed, you will also need to update them in the `AlignedProofAggregationService` contract.
If the program ids have changed, you will also need to add the updated one to the `AlignedProofAggregationService` contract. You can do this by calling the `addProgramId` method with the new image ID and the verifier type number as parameters (you can check the last parameter in the VerifierType definition at `contracts/src/core/AlignedProofAggregationService.sol`).

- Risc0: call `setRisc0AggregatorProgramImageId` method with the value of `risc0_root_aggregator_image_id` from `aggregation_mode/program_ids.json`.
- SP1: call: `setSP1AggregatorProgramVKHash` method with the value of `sp1_root_aggregator_vk_hash` from `aggregation_mode/program_ids.json`.
You can fetch the program ID values from the following:

- Risc0: Use the value of `risc0_chunk_aggregator_image_id` from `aggregation_mode/program_ids.json`.
- SP1: Use the value of `sp1_chunk_aggregator_vk_hash` from `aggregation_mode/program_ids.json`.
2 changes: 1 addition & 1 deletion aggregation_mode/abi/AlignedProofAggregationService.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions aggregation_mode/src/backend/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pub struct Config {
pub ecdsa: ECDSAConfig,
pub proofs_per_chunk: u16,
pub total_proofs_limit: u16,
pub sp1_chunk_aggregator_vk_hash: String,
pub risc0_chunk_aggregator_image_id: String,
}

impl Config {
Expand Down
18 changes: 18 additions & 0 deletions aggregation_mode/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ pub struct ProofAggregator {
proof_aggregation_service: AlignedProofAggregationServiceContract,
fetcher: ProofsFetcher,
config: Config,
sp1_chunk_aggregator_vk_hash_bytes: [u8; 32],
risc0_chunk_aggregator_image_id_bytes: [u8; 32],
}

impl ProofAggregator {
Expand All @@ -66,11 +68,25 @@ impl ProofAggregator {
ZKVMEngine::from_env().expect("AGGREGATOR env variable to be set to one of sp1|risc0");
let fetcher = ProofsFetcher::new(&config);

let sp1_chunk_aggregator_vk_hash_bytes: [u8; 32] =
hex::decode(&config.sp1_chunk_aggregator_vk_hash)
.expect("Failed to decode SP1 chunk aggregator VK hash")
.try_into()
.expect("SP1 chunk aggregator VK hash must be 32 bytes");
Comment thread
MarcosNicolau marked this conversation as resolved.

let risc0_chunk_aggregator_image_id_bytes: [u8; 32] =
hex::decode(&config.risc0_chunk_aggregator_image_id)
.expect("Failed to decode Risc0 chunk aggregator image id")
.try_into()
.expect("Risc0 chunk aggregator image id must be 32 bytes");

Comment thread
MarcosNicolau marked this conversation as resolved.
Self {
engine,
proof_aggregation_service,
fetcher,
config,
sp1_chunk_aggregator_vk_hash_bytes,
risc0_chunk_aggregator_image_id_bytes,
}
}

Expand Down Expand Up @@ -161,6 +177,7 @@ impl ProofAggregator {
blob_versioned_hash.into(),
proof.proof_with_pub_values.public_values.to_vec().into(),
proof.proof_with_pub_values.bytes().into(),
self.sp1_chunk_aggregator_vk_hash_bytes.into(),
)
.sidecar(blob)
.into_transaction_request(),
Expand All @@ -173,6 +190,7 @@ impl ProofAggregator {
blob_versioned_hash.into(),
encoded_seal.into(),
proof.receipt.journal.bytes.into(),
self.risc0_chunk_aggregator_image_id_bytes.into(),
)
.sidecar(blob)
.into_transaction_request()
Expand Down
6 changes: 6 additions & 0 deletions config-files/config-proof-aggregator-ethereum-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ proofs_per_chunk: 512 # Amount of proofs to process per chunk
# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob
total_proofs_limit: 3968

# These program ids are the ones from the chunk aggregator programs
# Can be found in the Proof Aggregation Service deployment config
# (remember to trim the 0x prefix)
sp1_chunk_aggregator_vk_hash: "00ba19eed0aaeb0151f07b8d3ee7c659bcd29f3021e48fb42766882f55b84509"
risc0_chunk_aggregator_image_id: "d8cfdd5410c70395c0a1af1842a0148428cc46e353355faccfba694dd4862dbf"

ecdsa:
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
private_key_store_password: ""
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ proofs_per_chunk: 512 # Amount of proofs to process per chunk
# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob
total_proofs_limit: 3968

# These program ids are the ones from the chunk aggregator programs
# Can be found in the Proof Aggregation Service deployment config
# (remember to trim the 0x prefix)
sp1_chunk_aggregator_vk_hash: "00ba19eed0aaeb0151f07b8d3ee7c659bcd29f3021e48fb42766882f55b84509"
risc0_chunk_aggregator_image_id: "d8cfdd5410c70395c0a1af1842a0148428cc46e353355faccfba694dd4862dbf"

ecdsa:
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
Expand Down
5 changes: 5 additions & 0 deletions config-files/config-proof-aggregator-mock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ proofs_per_chunk: 512 # Amount of proofs to process per chunk
# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob
total_proofs_limit: 3968

# These program ids are the ones from the chunk aggregator programs
# Can be found in the Proof Aggregation Service deployment config
# (remember to trim the 0x prefix)
sp1_chunk_aggregator_vk_hash: "00ba19eed0aaeb0151f07b8d3ee7c659bcd29f3021e48fb42766882f55b84509"
risc0_chunk_aggregator_image_id: "d8cfdd5410c70395c0a1af1842a0148428cc46e353355faccfba694dd4862dbf"

ecdsa:
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
Expand Down
5 changes: 5 additions & 0 deletions config-files/config-proof-aggregator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ proofs_per_chunk: 512 # Amount of proofs to process per chunk
# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob
total_proofs_limit: 3968

# These program ids are the ones from the chunk aggregator programs
# Can be found in the Proof Aggregation Service deployment config
# (remember to trim the 0x prefix)
sp1_chunk_aggregator_vk_hash: "00ba19eed0aaeb0151f07b8d3ee7c659bcd29f3021e48fb42766882f55b84509"
risc0_chunk_aggregator_image_id: "d8cfdd5410c70395c0a1af1842a0148428cc46e353355faccfba694dd4862dbf"

ecdsa:
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pragma solidity ^0.8.12;

import {AlignedProofAggregationService} from "../../src/core/AlignedProofAggregationService.sol";
import {IAlignedProofAggregationService} from "../../src/core/IAlignedProofAggregationService.sol";
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

import "forge-std/Script.sol";
Expand All @@ -24,16 +25,24 @@ contract AlignedProofAggregationServiceDeployer is Script {

AlignedProofAggregationService alignedProofAggregationService = new AlignedProofAggregationService();

bytes32[] memory programIds = new bytes32[](2);
programIds[0] = risc0AggregationProgramImageId;
programIds[1] = sp1AggregationProgramVKHash;

uint8[] memory verifierTypes = new uint8[](2);
verifierTypes[0] = uint8(IAlignedProofAggregationService.VerifierType.RISC0);
verifierTypes[1] = uint8(IAlignedProofAggregationService.VerifierType.SP1);

ERC1967Proxy proxy = new ERC1967Proxy(
address(alignedProofAggregationService),
abi.encodeWithSignature(
"initialize(address,address,address,address,bytes32,bytes32)",
"initialize(address,address,address,address,bytes32[],uint8[])",
ownerAddress,
alignedAggregatorAddress,
sp1VerifierAddress,
risc0VerifierAddress,
risc0AggregationProgramImageId,
sp1AggregationProgramVKHash
programIds,
verifierTypes
)
);

Expand Down

Large diffs are not rendered by default.

84 changes: 57 additions & 27 deletions contracts/src/core/AlignedProofAggregationService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ contract AlignedProofAggregationService is
/// if the sp1 verifier address is set to this address, then we skip verification
address public constant VERIFIER_MOCK_ADDRESS = address(0xFF);

/// The unique identifier (image ID) of the RISC Zero aggregator program.
/// This ensures that only proofs generated by a trusted Risc0 program can be verified.
bytes32 public risc0AggregatorProgramImageId;

/// The verification key hash for the SP1 aggregator program.
/// This ensures that only proofs generated by a trusted SP1 program can be verified.
bytes32 public sp1AggregatorProgramVKHash;
/// @notice A map to track aggregation program IDs (image IDs for RISC Zero or vk hashes for SP1)
/// with their proving system. These program IDs are used to validate that the proofs to verify are indeed from
/// a trusted aggregation program.
mapping(bytes32 => uint8) public programIds;

constructor() {
_disableInitializers();
Expand All @@ -54,45 +51,54 @@ contract AlignedProofAggregationService is
address _alignedAggregatorAddress,
address _sp1VerifierAddress,
address _risc0VerifierAddress,
bytes32 _risc0AggregatorProgramImageId,
bytes32 _sp1AggregatorProgramVKHash
bytes32[] memory _programIds,
uint8[] memory _verifierTypes
Comment thread
MauroToscano marked this conversation as resolved.
Outdated
) public initializer {
__Ownable_init();
__UUPSUpgradeable_init();
_transferOwnership(newOwner);
alignedAggregatorAddress = _alignedAggregatorAddress;
sp1VerifierAddress = _sp1VerifierAddress;
risc0VerifierAddress = _risc0VerifierAddress;
risc0AggregatorProgramImageId = _risc0AggregatorProgramImageId;
sp1AggregatorProgramVKHash = _sp1AggregatorProgramVKHash;
for (uint256 i = 0; i < _programIds.length; i++) {
programIds[_programIds[i]] = _verifierTypes[i];
}
}

function verifySP1(bytes32 blobVersionedHash, bytes calldata sp1PublicValues, bytes calldata sp1ProofBytes)
function verifySP1(bytes32 blobVersionedHash, bytes calldata sp1PublicValues, bytes calldata sp1ProofBytes, bytes32 programId)
public
onlyAlignedAggregator
{
(bytes32 merkleRoot) = abi.decode(sp1PublicValues, (bytes32));

if (programIds[programId] != uint8(IAlignedProofAggregationService.VerifierType.SP1)) {
revert InvalidProgramId(programId, IAlignedProofAggregationService.VerifierType.SP1, programIds[programId]);
}

// In dev mode, proofs are mocked, so we skip the verification part
if (_isSP1VerificationEnabled()) {
ISP1Verifier(sp1VerifierAddress).verifyProof(sp1AggregatorProgramVKHash, sp1PublicValues, sp1ProofBytes);
ISP1Verifier(sp1VerifierAddress).verifyProof(programId, sp1PublicValues, sp1ProofBytes);
}

aggregatedProofs[merkleRoot] = true;
emit AggregatedProofVerified(merkleRoot, blobVersionedHash);
}

function verifyRisc0(bytes32 blobVersionedHash, bytes calldata risc0ReceiptSeal, bytes calldata risc0JournalBytes)
function verifyRisc0(bytes32 blobVersionedHash, bytes calldata risc0ReceiptSeal, bytes calldata risc0JournalBytes, bytes32 programId)
public
onlyAlignedAggregator
{
(bytes32 merkleRoot) = abi.decode(risc0JournalBytes, (bytes32));

if (programIds[programId] != uint8(IAlignedProofAggregationService.VerifierType.RISC0)) {
revert InvalidProgramId(programId, IAlignedProofAggregationService.VerifierType.RISC0, programIds[programId]);
}

// In dev mode, proofs are mocked, so we skip the verification part
if (_isRisc0VerificationEnabled()) {
bytes32 risc0JournalDigest = sha256(risc0JournalBytes);
IRiscZeroVerifier(risc0VerifierAddress).verify(
risc0ReceiptSeal, risc0AggregatorProgramImageId, risc0JournalDigest
risc0ReceiptSeal, programId, risc0JournalDigest
);
}

Expand Down Expand Up @@ -148,31 +154,55 @@ contract AlignedProofAggregationService is
_;
}

/// @notice Modifier to ensure the provided verifier type is one of the valid enum values.
modifier onValidVerifierType(IAlignedProofAggregationService.VerifierType verifierType) {
if (verifierType != IAlignedProofAggregationService.VerifierType.SP1 &&
verifierType != IAlignedProofAggregationService.VerifierType.RISC0){
revert IAlignedProofAggregationService.InvalidVerifierType(uint8(verifierType));
}

_;
}

/// @notice Sets the address of the Risc0 verifier contract
/// @param _risc0VerifierAddress The new address for the Risc0 verifier contract
function setRisc0VerifierAddress(address _risc0VerifierAddress) external onlyOwner {
risc0VerifierAddress = _risc0VerifierAddress;
emit Risc0VerifierAddressUpdated(_risc0VerifierAddress);
}

/// @notice Sets the image id of the Risc0 program
/// @param _risc0AggregatorProgramImageId The new imageid for the Risc0 aggregator program
function setRisc0AggregatorProgramImageId(bytes32 _risc0AggregatorProgramImageId) external onlyOwner {
risc0AggregatorProgramImageId = _risc0AggregatorProgramImageId;
emit Risc0AggregatorProgramImageIdUpdated(_risc0AggregatorProgramImageId);
}

/// @notice Sets the address of the SP1 verifier contract
/// @param _sp1VerifierAddress The new address for the SP1 verifier contract
function setSP1VerifierAddress(address _sp1VerifierAddress) external onlyOwner {
sp1VerifierAddress = _sp1VerifierAddress;
emit SP1VerifierAddressUpdated(_sp1VerifierAddress);
}

/// @notice Sets the vk hash of the sp1 program
/// @param _sp1AggregatorProgramVKHash The new vk hash for the sp1 aggregator program
function setSP1AggregatorProgramVKHash(bytes32 _sp1AggregatorProgramVKHash) external onlyOwner {
sp1AggregatorProgramVKHash = _sp1AggregatorProgramVKHash;
emit SP1AggregatorProgramVKHashUpdated(_sp1AggregatorProgramVKHash);
/// @notice Adds a new program ID to the list of valid program IDs.
/// @param programId The program ID to add (image ID for RISC0 or vk hash for SP1).
/// @param verifierType The type of verifier associated with the program ID.
function addProgramId(bytes32 programId, IAlignedProofAggregationService.VerifierType verifierType)
external
onlyOwner
onValidVerifierType(verifierType)
{
programIds[programId] = uint8(verifierType);
emit ProgramIdAdded(programId, verifierType);
}

/// @notice Deletes a program ID from the list of valid program IDs.
/// @param programId The program ID to delete (image ID for RISC0 or vk hash for SP1).
function deleteProgramId(bytes32 programId, IAlignedProofAggregationService.VerifierType verifierType) external onlyOwner onValidVerifierType(verifierType) {
// Preserve the verifier type so we can emit it with the event
uint8 verifierTypeRaw = programIds[programId];
uint8 rawReceivedVerifierType = uint8(verifierType);

// Check if the obtained verifier type matches the one received by param
if (verifierTypeRaw != rawReceivedVerifierType) {
revert IAlignedProofAggregationService.VerifierTypeMismatch(verifierTypeRaw, rawReceivedVerifierType);
}

delete programIds[programId];
emit ProgramIdDeleted(programId, IAlignedProofAggregationService.VerifierType(verifierTypeRaw));
}
}
43 changes: 29 additions & 14 deletions contracts/src/core/IAlignedProofAggregationService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ interface IAlignedProofAggregationService {

/// @notice Event emitted when the SP1 verifier address is updated
event SP1VerifierAddressUpdated(address indexed newAddress);

/// @notice Event emitted when a new program ID is added
event ProgramIdAdded(bytes32 indexed programId, VerifierType verifierType);

/// @notice Event emitted when the Risc0 aggregator program image ID is updated
event Risc0AggregatorProgramImageIdUpdated(bytes32 indexed newImageId);

/// @notice Event emitted when the SP1 aggregator program VK hash is updated
event SP1AggregatorProgramVKHashUpdated(bytes32 indexed newVKHash);
/// @notice Event emitted when a program ID is deleted
event ProgramIdDeleted(bytes32 indexed programId, VerifierType verifierType);
Comment thread
MauroToscano marked this conversation as resolved.
Outdated

/// @notice Method to verify an aggregated proof from aligned
/// @dev This function is called by the aligned proof aggregator after collecting the proofs and aggregating them
/// to be verified on-chain. We expect the blobTransactionHash to be called before
/// @param blobVersionedHash the versioned hash of the blob transaction that contains the leaves that compose the merkle root.
/// @param sp1PublicValues Values used to perform the execution
/// @param sp1ProofBytes Groth16 proof
function verifySP1(bytes32 blobVersionedHash, bytes calldata sp1PublicValues, bytes calldata sp1ProofBytes)
/// @param programId The chunk aggregator program ID against which the proof should be verified
function verifySP1(bytes32 blobVersionedHash, bytes calldata sp1PublicValues, bytes calldata sp1ProofBytes, bytes32 programId)
external;

function verifyRisc0(bytes32 blobVersionedHash, bytes calldata risc0ReceiptSeal, bytes calldata risc0JournalBytes)
function verifyRisc0(bytes32 blobVersionedHash, bytes calldata risc0ReceiptSeal, bytes calldata risc0JournalBytes, bytes32 programId)
external;

function verifyProofInclusion(
Expand All @@ -39,17 +40,31 @@ interface IAlignedProofAggregationService {
/// @param _risc0VerifierAddress The new address for the Risc0 verifier contract
function setRisc0VerifierAddress(address _risc0VerifierAddress) external;

/// @notice Sets the image id of the Risc0 program
/// @param _risc0AggregatorProgramImageId The new imageid for the Risc0 aggregator program
function setRisc0AggregatorProgramImageId(bytes32 _risc0AggregatorProgramImageId) external;

/// @notice Sets the address of the SP1 verifier contract
/// @param _sp1VerifierAddress The new address for the SP1 verifier contract
function setSP1VerifierAddress(address _sp1VerifierAddress) external;

/// @notice Sets the vk hash of the sp1 program
/// @param _sp1AggregatorProgramVKHash The new vk hash for the sp1 aggregator program
function setSP1AggregatorProgramVKHash(bytes32 _sp1AggregatorProgramVKHash) external;
/// @notice Adds a new program ID with its verifier type
/// @param programId The program ID to add
/// @param verifierType The type of verifier (SP1 or RISC0)
function addProgramId(bytes32 programId, VerifierType verifierType) external;

/// @notice Deletes an existing program ID
/// @param programId The program ID to delete
/// @param verifierType The type of verifier (SP1 or RISC0)
function deleteProgramId(bytes32 programId, VerifierType verifierType) external;

error OnlyAlignedAggregator(address sender);

error InvalidProgramId(bytes32 programId, VerifierType expected, uint8 actual);

error InvalidVerifierType(uint8 actual);

error VerifierTypeMismatch(uint8 expected, uint8 received);
Comment thread
MarcosNicolau marked this conversation as resolved.
Outdated

enum VerifierType {
INVALID, // If a given program does not exist in the `programId` map, it defaults to 0. This prevents non-existing keys to be considered valid in case SP1 or RISC0 were in this position
SP1,
RISC0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ defmodule AlignedProofAggregationService do
require Logger

@aligned_config_file System.get_env("ALIGNED_PROOF_AGG_CONFIG_FILE")
@verifyRisc0_solidity_signature "0x54687ccf"
@verifySp1_solidity_signature "0xf6e04ac4"
@verifyRisc0_solidity_signature "0x0769eb53"
@verifySp1_solidity_signature "0x96f7966f"

config_file_path =
case @aligned_config_file do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ proofs_per_chunk: 512 # Amount of proofs to process per chunk
# Since each proof commitments takes 32 bytes hash
# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob
total_proofs_limit: 3968
sp1_chunk_aggregator_vk_hash: 00a18429d092a8e1f58aea6ff650ad715ad4e6d7056600bb201d38460244507b
risc0_chunk_aggregator_image_id: 4cc11a4ac146ce4fc71493d694a9707194316cbb609603a195ffbe0c4c099c97

ecdsa:
private_key_store_path: <private_key_store_path>
Expand Down
Loading
Loading