From 4ae5a93e9e96cd0cd529baf9ffa78c1b21a9c4b1 Mon Sep 17 00:00:00 2001 From: perekopskiy <53865202+perekopskiy@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:39:47 +0300 Subject: [PATCH] fix(prover): fix setup_metadata_to_setup_data_key (#2875) --- prover/crates/bin/prover_fri/src/utils.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/prover/crates/bin/prover_fri/src/utils.rs b/prover/crates/bin/prover_fri/src/utils.rs index 2941c15439a9..181dc857c364 100644 --- a/prover/crates/bin/prover_fri/src/utils.rs +++ b/prover/crates/bin/prover_fri/src/utils.rs @@ -143,9 +143,19 @@ pub fn verify_proof( pub fn setup_metadata_to_setup_data_key( setup_metadata: &CircuitIdRoundTuple, ) -> ProverServiceDataKey { - ProverServiceDataKey { - circuit_id: setup_metadata.circuit_id, - round: setup_metadata.aggregation_round.into(), + let round = setup_metadata.aggregation_round.into(); + match round { + AggregationRound::NodeAggregation => { + // For node aggregation only one key exist for all circuit types + ProverServiceDataKey { + circuit_id: ZkSyncRecursionLayerStorageType::NodeLayerCircuit as u8, + round, + } + } + _ => ProverServiceDataKey { + circuit_id: setup_metadata.circuit_id, + round, + }, } }