diff --git a/prover/crates/bin/witness_generator/src/node_aggregation.rs b/prover/crates/bin/witness_generator/src/node_aggregation.rs index 2836d463cd4..4f396fd4b5a 100644 --- a/prover/crates/bin/witness_generator/src/node_aggregation.rs +++ b/prover/crates/bin/witness_generator/src/node_aggregation.rs @@ -8,7 +8,7 @@ use zkevm_test_harness::witness::recursive_aggregation::{ compute_node_vk_commitment, create_node_witness, }; use zksync_config::configs::FriWitnessGeneratorConfig; -use zksync_object_store::{ObjectStore, ObjectStoreError}; +use zksync_object_store::ObjectStore; use zksync_prover_dal::{ConnectionPool, Prover, ProverDal}; use zksync_prover_fri_types::{ circuit_definitions::{ @@ -34,7 +34,7 @@ use crate::{ metrics::WITNESS_GENERATOR_METRICS, utils::{ load_proofs_for_job_ids, save_node_aggregations_artifacts, - save_recursive_layer_prover_input_artifacts, AggregationWrapper, AggregationWrapperLegacy, + save_recursive_layer_prover_input_artifacts, AggregationWrapper, }, }; @@ -449,27 +449,12 @@ async fn get_artifacts( circuit_id: metadata.circuit_id, depth: metadata.depth, }; - let result = object_store.get(key).await; - - // TODO: remove after transition - return match result { - Ok(aggregation_wrapper) => aggregation_wrapper, - Err(error) => { - // probably legacy struct is saved in GCS - if let ObjectStoreError::Serialization(serialization_error) = error { - let legacy_wrapper: AggregationWrapperLegacy = - object_store.get(key).await.unwrap_or_else(|inner_error| { - panic!( - "node aggregation job artifacts getting error. Key: {:?}, errors: {:?} {:?}", - key, serialization_error, inner_error - ) - }); - AggregationWrapper(legacy_wrapper.0.into_iter().map(|x| (x.0, x.1)).collect()) - } else { - panic!("node aggregation job artifacts missing: {:?}", key) - } - } - }; + object_store.get(key).await.unwrap_or_else(|error| { + panic!( + "node aggregation job artifacts getting error. Key: {:?}, error: {:?}", + key, error + ) + }) } #[tracing::instrument( diff --git a/prover/crates/bin/witness_generator/src/utils.rs b/prover/crates/bin/witness_generator/src/utils.rs index 624d8ec1b40..65fe26d63f5 100644 --- a/prover/crates/bin/witness_generator/src/utils.rs +++ b/prover/crates/bin/witness_generator/src/utils.rs @@ -97,32 +97,6 @@ impl StoredObject for AggregationWrapper { serialize_using_bincode!(); } -/// TODO: remove after transition -#[derive(serde::Serialize, serde::Deserialize)] -pub struct AggregationWrapperLegacy( - pub Vec<( - u64, - RecursionQueueSimulator, - ZkSyncRecursiveLayerCircuit, - )>, -); - -impl StoredObject for AggregationWrapperLegacy { - const BUCKET: Bucket = Bucket::NodeAggregationWitnessJobsFri; - type Key<'a> = AggregationsKey; - - fn encode_key(key: Self::Key<'_>) -> String { - let AggregationsKey { - block_number, - circuit_id, - depth, - } = key; - format!("aggregations_{block_number}_{circuit_id}_{depth}.bin") - } - - serialize_using_bincode!(); -} - #[derive(serde::Serialize, serde::Deserialize)] pub struct SchedulerPartialInputWrapper( pub SchedulerCircuitInstanceWitness<