Skip to content

Commit

Permalink
feat: remove leftovers after BWIP (#2456)
Browse files Browse the repository at this point in the history
## What ❔

Removed redundant columns from prover DB after adding BWIP.

## Why ❔

Because they won't be used anymore

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] 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`.
  • Loading branch information
Artemka374 authored Jul 23, 2024
1 parent c5650a4 commit 990676c
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 114 deletions.
9 changes: 1 addition & 8 deletions core/lib/basic_types/src/prover_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ use chrono::{DateTime, Duration, NaiveDateTime, NaiveTime, Utc};
use strum::{Display, EnumString};

use crate::{
basic_fri_types::{AggregationRound, Eip4844Blobs},
protocol_version::ProtocolVersionId,
L1BatchNumber,
basic_fri_types::AggregationRound, protocol_version::ProtocolVersionId, L1BatchNumber,
};

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -255,7 +253,6 @@ pub struct ProverJobFriInfo {
pub created_at: NaiveDateTime,
pub updated_at: NaiveDateTime,
pub time_taken: Option<NaiveTime>,
pub is_blob_cleaned: Option<bool>,
pub depth: u32,
pub is_node_final_proof: bool,
pub proof_blob_url: Option<String>,
Expand All @@ -266,7 +263,6 @@ pub struct ProverJobFriInfo {
#[derive(Debug, Clone)]
pub struct BasicWitnessGeneratorJobInfo {
pub l1_batch_number: L1BatchNumber,
pub merkle_tree_paths_blob_url: Option<String>,
pub witness_inputs_blob_url: Option<String>,
pub attempts: u32,
pub status: WitnessJobStatus,
Expand All @@ -275,10 +271,8 @@ pub struct BasicWitnessGeneratorJobInfo {
pub updated_at: NaiveDateTime,
pub processing_started_at: Option<NaiveDateTime>,
pub time_taken: Option<NaiveTime>,
pub is_blob_cleaned: Option<bool>,
pub protocol_version: Option<i32>,
pub picked_by: Option<String>,
pub eip_4844_blobs: Option<Eip4844Blobs>,
}

#[derive(Debug, Clone)]
Expand All @@ -294,7 +288,6 @@ pub struct LeafWitnessGeneratorJobInfo {
pub updated_at: NaiveDateTime,
pub processing_started_at: Option<NaiveDateTime>,
pub time_taken: Option<NaiveTime>,
pub is_blob_cleaned: Option<bool>,
pub number_of_basic_circuits: Option<i32>,
pub protocol_version: Option<i32>,
pub picked_by: Option<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ impl ProofGenDataFetcher {
impl ProofGenDataFetcher {
async fn save_proof_gen_data(&self, data: ProofGenerationData) {
let store = &*self.0.blob_store;
let merkle_paths = store
.put(data.l1_batch_number, &data.witness_input_data.merkle_paths)
.await
.expect("Failed to save proof generation data to GCS");
let witness_inputs = store
.put(data.l1_batch_number, &data.witness_input_data)
.await
Expand All @@ -49,13 +45,7 @@ impl ProofGenDataFetcher {

connection
.fri_witness_generator_dal()
.save_witness_inputs(
data.l1_batch_number,
&merkle_paths,
&witness_inputs,
data.protocol_version,
data.witness_input_data.eip_4844_blobs,
)
.save_witness_inputs(data.l1_batch_number, &witness_inputs, data.protocol_version)
.await;
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE witness_inputs_fri ADD COLUMN IF NOT EXISTS merkle_tree_paths_blob_url TEXT;
ALTER TABLE witness_inputs_fri ADD COLUMN IF NOT EXISTS eip_4844_blobs TEXT;
ALTER TABLE witness_inputs_fri ADD COLUMN IF NOT EXISTS is_blob_cleaned BOOLEAN;
ALTER TABLE leaf_aggregation_witness_jobs_fri ADD COLUMN IF NOT EXISTS is_blob_cleaned BOOLEAN;
ALTER TABLE prover_jobs_fri ADD COLUMN IF NOT EXISTS is_blob_cleaned BOOLEAN;
ALTER TABLE prover_jobs_fri_archive ADD COLUMN IF NOT EXISTS is_blob_cleaned BOOLEAN;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE witness_inputs_fri DROP COLUMN IF EXISTS merkle_tree_paths_blob_url;
ALTER TABLE witness_inputs_fri DROP COLUMN IF EXISTS eip_4844_blobs;
ALTER TABLE witness_inputs_fri DROP COLUMN IF EXISTS is_blob_cleaned;
ALTER TABLE leaf_aggregation_witness_jobs_fri DROP COLUMN IF EXISTS is_blob_cleaned;
ALTER TABLE prover_jobs_fri DROP COLUMN IF EXISTS is_blob_cleaned;
ALTER TABLE prover_jobs_fri_archive DROP COLUMN IF EXISTS is_blob_cleaned;
1 change: 0 additions & 1 deletion prover/crates/lib/prover_dal/src/fri_prover_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ impl FriProverDal<'_, '_> {
created_at: row.created_at,
updated_at: row.updated_at,
time_taken: row.time_taken,
is_blob_cleaned: row.is_blob_cleaned,
depth: row.depth as u32,
is_node_final_proof: row.is_node_final_proof,
proof_blob_url: row.proof_blob_url.clone(),
Expand Down
Loading

0 comments on commit 990676c

Please sign in to comment.