Skip to content

Commit 65b9b04

Browse files
committed
fix: verifyAggregationZisk program commitment usage
1 parent b619ef8 commit 65b9b04

6 files changed

Lines changed: 15 additions & 8 deletions

File tree

aggregation_mode/proof_aggregator/abi/AlignedProofAggregationService.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aggregation_mode/proof_aggregator/src/backend/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ impl ProofAggregator {
371371
.proof_aggregation_service
372372
.verifyAggregationZisk(
373373
blob_versioned_hash.into(),
374-
proof.vk.clone().into(),
375374
proof.public_values.to_vec().into(),
376375
proof.proof.to_vec().into(),
377376
self.zisk_chunk_aggregator_vk_hash_bytes.into(),

config-files/config-proof-aggregator-ethereum-package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ monthly_budget_eth: 15.0
2626
# (remember to trim the 0x prefix)
2727
sp1_chunk_aggregator_vk_hash: "00d6e32a34f68ea643362b96615591c94ee0bf99ee871740ab2337966a4f77af"
2828
risc0_chunk_aggregator_image_id: "8908f01022827e80a5de71908c16ee44f4a467236df20f62e7c994491629d74c"
29-
zisk_chunk_aggregator_vk_hash_bytes: "fd518d50ee1b5bfe9e594448582fc8556b7313e2607e3d1f10a1d475800912b0"
29+
zisk_chunk_aggregator_vk_hash_bytes: "f65864040c58087c19d2793043dcfe0cbf99e8d555b45f20e1801cc447a69108"
3030

3131
ecdsa:
3232
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"

config-files/config-proof-aggregator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ monthly_budget_eth: 15.0
2626
# (remember to trim the 0x prefix)
2727
sp1_chunk_aggregator_vk_hash: "00ba19eed0aaeb0151f07b8d3ee7c659bcd29f3021e48fb42766882f55b84509"
2828
risc0_chunk_aggregator_image_id: "d8cfdd5410c70395c0a1af1842a0148428cc46e353355faccfba694dd4862dbf"
29-
zisk_chunk_aggregator_vk_hash_bytes: "fd518d50ee1b5bfe9e594448582fc8556b7313e2607e3d1f10a1d475800912b0"
29+
zisk_chunk_aggregator_vk_hash_bytes: "f65864040c58087c19d2793043dcfe0cbf99e8d555b45f20e1801cc447a69108"
3030

3131
ecdsa:
3232
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"

contracts/src/core/AlignedProofAggregationService.sol

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ contract AlignedProofAggregationService is
110110
emit AggregatedProofVerified(merkleRoot, blobVersionedHash);
111111
}
112112

113-
function verifyAggregationZisk(bytes32 blobVersionedHash, uint64[4] calldata programVK, bytes calldata publicValues, bytes calldata proofBytes, bytes32 verifierProgramCommitment)
113+
function verifyAggregationZisk(bytes32 blobVersionedHash, bytes calldata publicValues, bytes calldata proofBytes, bytes32 verifierProgramCommitment)
114114
public
115115
onlyAlignedAggregator
116116
{
@@ -120,6 +120,15 @@ contract AlignedProofAggregationService is
120120
revert InvalidVerifyingProgram(verifierProgramCommitment, ZISK_ID, allowedVerifiersProvingSystem[verifierProgramCommitment]);
121121
}
122122

123+
// Cast verifierProgramCommitment (bytes32) to uint64[4]
124+
uint256 commitment = uint256(verifierProgramCommitment);
125+
uint64[4] memory programVK = [
126+
uint64(commitment >> 192),
127+
uint64(commitment >> 128),
128+
uint64(commitment >> 64),
129+
uint64(commitment)
130+
];
131+
123132
IZiskVerifier(ziskVerifierAddress).verifySnarkProof(programVK, publicValues, proofBytes);
124133

125134
isMerkleRootVerified[merkleRoot] = true;

contracts/src/core/IAlignedProofAggregationService.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ interface IAlignedProofAggregationService {
3636
/// @dev This function is called by the aligned proof aggregator after collecting the proofs and aggregating them
3737
/// to be verified on-chain. We expect the blobTransactionHash to be called before
3838
/// @param blobVersionedHash the versioned hash of the blob transaction that contains the leaves that compose the merkle root.
39-
/// @param programVK The verification key for the RISC-V program
4039
/// @param publicValues The public values encoded as bytes
4140
/// @param proofBytes The proof of the program execution the Zisk zkVM encoded as bytes
42-
/// @param verifierProgramCommitment The chunk aggregator verifier program commitment against which the proof should be verified
43-
function verifyAggregationZisk(bytes32 blobVersionedHash, uint64[4] calldata programVK, bytes calldata publicValues, bytes calldata proofBytes, bytes32 verifierProgramCommitment)
41+
/// @param verifierProgramCommitment The chunk aggregator verifier program commitment against which the proof should be verified (also used as programVK)
42+
function verifyAggregationZisk(bytes32 blobVersionedHash, bytes calldata publicValues, bytes calldata proofBytes, bytes32 verifierProgramCommitment)
4443
external;
4544

4645
function isProofVerified(

0 commit comments

Comments
 (0)