Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prover_cli): Remove outdated fix for circuit id in node wg #2248

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions core/lib/basic_types/src/prover_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,15 +382,3 @@ pub struct ProofCompressionJobInfo {
pub time_taken: Option<NaiveTime>,
pub picked_by: Option<String>,
}

// This function corrects circuit IDs for the node witness generator.
//
// - Circuit IDs in the node witness generator are 2 higher than in other rounds.
// - The `EIP4844Repack` circuit (ID 255) is an exception and is set to 18.
pub fn correct_circuit_id(circuit_id: i16, aggregation_round: AggregationRound) -> u32 {
match (circuit_id, aggregation_round) {
(18, AggregationRound::NodeAggregation) => 255,
(circuit_id, AggregationRound::NodeAggregation) => (circuit_id as u32) - 2,
_ => circuit_id as u32,
}
}
6 changes: 2 additions & 4 deletions prover/prover_dal/src/fri_prover_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ use zksync_basic_types::{
basic_fri_types::{AggregationRound, CircuitIdRoundTuple, JobIdentifiers},
protocol_version::{ProtocolSemanticVersion, ProtocolVersionId},
prover_dal::{
correct_circuit_id, FriProverJobMetadata, JobCountStatistics, ProverJobFriInfo,
ProverJobStatus, StuckJobs,
FriProverJobMetadata, JobCountStatistics, ProverJobFriInfo, ProverJobStatus, StuckJobs,
},
L1BatchNumber,
};
Expand Down Expand Up @@ -659,8 +658,7 @@ impl FriProverDal<'_, '_> {
.map(|row| ProverJobFriInfo {
id: row.id as u32,
l1_batch_number,
// It is necessary to correct the circuit IDs due to the discrepancy between different aggregation rounds.
circuit_id: correct_circuit_id(row.circuit_id, aggregation_round),
circuit_id: row.circuit_id as u32,
circuit_blob_url: row.circuit_blob_url.clone(),
aggregation_round,
sequence_number: row.sequence_number as u32,
Expand Down
11 changes: 5 additions & 6 deletions prover/prover_dal/src/fri_witness_generator_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use zksync_basic_types::{
basic_fri_types::{AggregationRound, Eip4844Blobs},
protocol_version::{ProtocolSemanticVersion, ProtocolVersionId, VersionPatch},
prover_dal::{
correct_circuit_id, BasicWitnessGeneratorJobInfo, JobCountStatistics,
LeafAggregationJobMetadata, LeafWitnessGeneratorJobInfo, NodeAggregationJobMetadata,
NodeWitnessGeneratorJobInfo, RecursionTipWitnessGeneratorJobInfo,
SchedulerWitnessGeneratorJobInfo, StuckJobs, WitnessJobStatus,
BasicWitnessGeneratorJobInfo, JobCountStatistics, LeafAggregationJobMetadata,
LeafWitnessGeneratorJobInfo, NodeAggregationJobMetadata, NodeWitnessGeneratorJobInfo,
RecursionTipWitnessGeneratorJobInfo, SchedulerWitnessGeneratorJobInfo, StuckJobs,
WitnessJobStatus,
},
L1BatchNumber,
};
Expand Down Expand Up @@ -1553,8 +1553,7 @@ impl FriWitnessGeneratorDal<'_, '_> {
.map(|row| NodeWitnessGeneratorJobInfo {
id: row.id as u32,
l1_batch_number,
// It is necessary to correct the circuit IDs due to the discrepancy between different aggregation rounds.
circuit_id: correct_circuit_id(row.circuit_id, AggregationRound::NodeAggregation),
circuit_id: row.circuit_id as u32,
depth: row.depth as u32,
status: WitnessJobStatus::from_str(&row.status).unwrap(),
attempts: row.attempts as u32,
Expand Down
Loading