Skip to content

Commit

Permalink
chore(types): Removing unused types (#925)
Browse files Browse the repository at this point in the history
## What ❔

* Remove (most) of evm_test_harness dependency from lib/types

## Why ❔

* it is mostly not needed with the new boojum proof system
* it is a huge crate, as it pulls a lot of crypto code with it

## Other comments
test_harness is still used in 2 files there (that are responsible for
sending proofs) - we should refactor them into a separate crate.
  • Loading branch information
mm-zk authored Jan 24, 2024
1 parent d562a4e commit d959f1f
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions core/lib/types/src/proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ use std::{
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, Bytes};
use zkevm_test_harness::{
abstract_zksync_circuit::concrete_circuits::ZkSyncCircuit,
bellman::{bn256::Bn256, plonk::better_better_cs::proof::Proof},
encodings::{recursion_request::RecursionRequest, QueueSimulator},
witness::{
full_block_artifact::{BlockBasicCircuits, BlockBasicCircuitsPublicInputs},
oracle::VmWitnessOracle,
},
LeafAggregationOutputDataWitness, NodeAggregationOutputDataWitness,
SchedulerCircuitInstanceWitness,
};
use zksync_basic_types::{L1BatchNumber, H256, U256};

const HASH_LEN: usize = H256::len_bytes();
Expand Down Expand Up @@ -59,12 +48,6 @@ impl StorageLogMetadata {
}
}

#[derive(Clone)]
pub struct WitnessGeneratorJobMetadata {
pub block_number: L1BatchNumber,
pub proofs: Vec<Proof<Bn256, ZkSyncCircuit<Bn256, VmWitnessOracle<Bn256>>>>,
}

/// Represents the sequential number of the proof aggregation round.
/// Mostly used to be stored in `aggregation_round` column in `prover_jobs` table
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
Expand Down Expand Up @@ -235,38 +218,6 @@ pub struct BasicCircuitWitnessGeneratorInput {
pub merkle_paths_input: PrepareBasicCircuitsJob,
}

#[derive(Clone)]
pub struct PrepareLeafAggregationCircuitsJob {
pub basic_circuits: BlockBasicCircuits<Bn256>,
pub basic_circuits_inputs: BlockBasicCircuitsPublicInputs<Bn256>,
pub basic_circuits_proofs: Vec<Proof<Bn256, ZkSyncCircuit<Bn256, VmWitnessOracle<Bn256>>>>,
}

#[derive(Clone)]
pub struct PrepareNodeAggregationCircuitJob {
pub previous_level_proofs: Vec<Proof<Bn256, ZkSyncCircuit<Bn256, VmWitnessOracle<Bn256>>>>,
pub previous_level_leafs_aggregations: Vec<LeafAggregationOutputDataWitness<Bn256>>,
pub previous_sequence: Vec<QueueSimulator<Bn256, RecursionRequest<Bn256>, 2, 2>>,
}

#[derive(Clone)]
pub struct PrepareSchedulerCircuitJob {
pub incomplete_scheduler_witness: SchedulerCircuitInstanceWitness<Bn256>,
pub final_node_aggregations: NodeAggregationOutputDataWitness<Bn256>,
pub node_final_proof_level_proof: Proof<Bn256, ZkSyncCircuit<Bn256, VmWitnessOracle<Bn256>>>,
pub previous_aux_hash: [u8; 32],
pub previous_meta_hash: [u8; 32],
}

#[derive(Debug, Clone)]
pub struct ProverJobMetadata {
pub id: u32,
pub block_number: L1BatchNumber,
pub circuit_type: String,
pub aggregation_round: AggregationRound,
pub sequence_number: usize,
}

#[derive(Debug, Clone)]
pub struct FriProverJobMetadata {
pub id: u32,
Expand Down

0 comments on commit d959f1f

Please sign in to comment.