Skip to content

Commit 67a2f47

Browse files
committed
fix: compilation errors
1 parent c313185 commit 67a2f47

6 files changed

Lines changed: 17 additions & 14 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ __AGGREGATION_MODE__: ## ____
236236

237237
is_aggregator_set:
238238
@if [ -z "$(AGGREGATOR)" ]; then \
239-
echo "Error: AGGREGATOR is not set. Please provide arg AGGREGATOR='sp1' or 'risc0'."; \
239+
echo "Error: AGGREGATOR is not set. Please provide arg AGGREGATOR='sp1' or 'risc0' or 'zisk'."; \
240240
exit 1; \
241241
fi
242242

@@ -893,7 +893,7 @@ aligned_get_user_balance_holesky:
893893
__GENERATE_PROOFS__: ## ____
894894

895895
generate_zisk_proof:
896-
@cd scripts/test_files/zisk && cargo-zisk build --release && \
896+
@cd scripts/test_files/zisk/sha_hasher && cargo-zisk build --release && \
897897
cargo-zisk rom-setup -e target/riscv64ima-zisk-zkvm-elf/release/sha_hasher && \
898898
cargo-zisk prove -e target/riscv64ima-zisk-zkvm-elf/release/sha_hasher -i build/input.bin -o proof -a -y
899899

aggregation_mode/proof_aggregator/src/aggregators/mod.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ impl Display for ZKVMEngine {
3434
pub enum ProofAggregationError {
3535
SP1Aggregation(SP1AggregationError),
3636
Risc0Aggregation(Risc0AggregationError),
37+
ZiskAggregation(zisk_aggregator::AlignedZiskError),
3738
PublicInputsDeserialization,
3839
}
3940

@@ -184,22 +185,19 @@ impl ZKVMEngine {
184185

185186
let mut agg_proofs: Vec<(ZiskStarkProof, Vec<[u8; 32]>)> = vec![];
186187
for (i, chunk) in chunks.enumerate() {
187-
let leaves_commitment = chunk
188-
.iter()
189-
.map(|e| e.hash_image_id_and_public_inputs())
190-
.collect();
188+
let leaves_commitment = chunk.iter().map(|e| e.hash_proof()).collect();
191189
let agg_proof = zisk_aggregator::run_user_proofs_aggregator(chunk)
192-
.map_err(ProofAggregationError::Risc0Aggregation)?;
190+
.map_err(ProofAggregationError::ZiskAggregation)?;
193191
agg_proofs.push((agg_proof, leaves_commitment));
194192

195193
info!("Chunk number {} has been aggregated", i);
196194
}
197195

198196
info!("All chunks have been aggregated, performing last aggregation...");
199197
let agg_proof = zisk_aggregator::run_chunk_aggregator(&agg_proofs)
200-
.map_err(ProofAggregationError::Risc0Aggregation)?;
198+
.map_err(ProofAggregationError::ZiskAggregation)?;
201199

202-
let public_input_bytes = agg_proof.public_values;
200+
let public_input_bytes = agg_proof.public_values.clone();
203201
let merkle_root: [u8; 32] = public_input_bytes
204202
.try_into()
205203
.map_err(|_| ProofAggregationError::PublicInputsDeserialization)?;

aggregation_mode/proof_aggregator/src/backend/fetcher.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ impl ProofsFetcher {
8080
ZKVMEngine::ZISK => {
8181
let pairs: Vec<(AlignedProof, Uuid)> = tasks
8282
.into_par_iter()
83-
.filter_map(|task| Some((ZiskStarkProof::new(task.proof), task.task_id)))
83+
.filter_map(|task| {
84+
let proof = ZiskStarkProof::new(task.proof);
85+
Some((AlignedProof::Zisk(proof.into()), task.task_id))
86+
})
8487
.collect();
8588

8689
pairs.into_iter().unzip()

aggregation_mode/proof_aggregator/src/backend/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl ProofAggregator {
123123
config,
124124
sp1_chunk_aggregator_vk_hash_bytes,
125125
risc0_chunk_aggregator_image_id_bytes,
126-
zisk_chunk_aggregator_vk_hash_bytes: zisk_chunk_aggregator_vk_bytes,
126+
zisk_chunk_aggregator_vk_hash_bytes,
127127
db,
128128
}
129129
}
@@ -371,9 +371,9 @@ impl ProofAggregator {
371371
.proof_aggregation_service
372372
.verifyAggregationZisk(
373373
blob_versioned_hash.into(),
374-
proof.vk.into(),
375-
proof.public_values.into(),
376-
proof.proof.into(),
374+
proof.vk.clone().into(),
375+
proof.public_values.to_vec().into(),
376+
proof.proof.to_vec().into(),
377377
self.zisk_chunk_aggregator_vk_hash_bytes.into(),
378378
)
379379
.sidecar(blob)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +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"
2930

3031
ecdsa:
3132
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"

config-files/config-proof-aggregator.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +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"
2930

3031
ecdsa:
3132
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"

0 commit comments

Comments
 (0)