From 8b4cbf43e52203aac829324aa48450575b70c656 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Fri, 16 Aug 2024 16:15:06 +0200 Subject: [PATCH] fix(prover): change bucket for RAM permutation witnesses (#2672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. --- core/lib/object_store/src/file.rs | 1 - core/lib/object_store/src/raw.rs | 2 -- prover/crates/bin/witness_generator/src/basic_circuits.rs | 6 +++++- prover/crates/lib/prover_fri_types/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/lib/object_store/src/file.rs b/core/lib/object_store/src/file.rs index e62f40fb943a..decba534d23e 100644 --- a/core/lib/object_store/src/file.rs +++ b/core/lib/object_store/src/file.rs @@ -43,7 +43,6 @@ impl FileBackedObjectStore { Bucket::ProofsFri, Bucket::StorageSnapshot, Bucket::TeeVerifierInput, - Bucket::RamPermutationCircuitQueueWitness, ] { let bucket_path = format!("{base_dir}/{bucket}"); fs::create_dir_all(&bucket_path).await?; diff --git a/core/lib/object_store/src/raw.rs b/core/lib/object_store/src/raw.rs index 32deec061bd8..3c5a89f160a5 100644 --- a/core/lib/object_store/src/raw.rs +++ b/core/lib/object_store/src/raw.rs @@ -20,7 +20,6 @@ pub enum Bucket { StorageSnapshot, DataAvailability, TeeVerifierInput, - RamPermutationCircuitQueueWitness, } impl Bucket { @@ -40,7 +39,6 @@ impl Bucket { Self::StorageSnapshot => "storage_logs_snapshots", Self::DataAvailability => "data_availability", Self::TeeVerifierInput => "tee_verifier_inputs", - Self::RamPermutationCircuitQueueWitness => "ram_permutation_witnesses", } } } diff --git a/prover/crates/bin/witness_generator/src/basic_circuits.rs b/prover/crates/bin/witness_generator/src/basic_circuits.rs index 6dc19bd022b3..00a4d99ba9a9 100644 --- a/prover/crates/bin/witness_generator/src/basic_circuits.rs +++ b/prover/crates/bin/witness_generator/src/basic_circuits.rs @@ -668,7 +668,11 @@ async fn generate_witness( .filter(|(circuit_id, _, _)| circuits_present.contains(circuit_id)) .collect(); - futures::future::join_all(save_ram_queue_witness_handles).await; + let _: Vec<_> = futures::future::join_all(save_ram_queue_witness_handles) + .await + .into_iter() + .map(|result| result.expect("failed to save ram permutation queue witness")) + .collect(); scheduler_witness.previous_block_meta_hash = input.previous_batch_metadata.meta_hash.0; scheduler_witness.previous_block_aux_hash = input.previous_batch_metadata.aux_hash.0; diff --git a/prover/crates/lib/prover_fri_types/src/lib.rs b/prover/crates/lib/prover_fri_types/src/lib.rs index a327111fe6fb..c14bc1905639 100644 --- a/prover/crates/lib/prover_fri_types/src/lib.rs +++ b/prover/crates/lib/prover_fri_types/src/lib.rs @@ -229,7 +229,7 @@ pub struct RamPermutationQueueWitness { } impl StoredObject for RamPermutationQueueWitness { - const BUCKET: Bucket = Bucket::RamPermutationCircuitQueueWitness; + const BUCKET: Bucket = Bucket::ProverJobsFri; type Key<'a> = RamPermutationQueueWitnessKey; fn encode_key(key: Self::Key<'_>) -> String {