Skip to content

Commit

Permalink
fix: tmp fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
roynalnaruto committed Aug 5, 2024
1 parent 12bc857 commit 5d73889
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
10 changes: 9 additions & 1 deletion bin/src/chain_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,15 @@ async fn prove_by_batch(
}

#[cfg(feature = "batch-prove")]
prove_utils::prove_batch(&format!("chain_prover: batch-{batch_id}"), chunk_proofs);
use prover::BatchHeader;
#[cfg(feature = "batch-prove")]
let batch_header = BatchHeader::<MAX_AGG_SNARKS>::default();
#[cfg(feature = "batch-prove")]
prove_utils::prove_batch(
&format!("chain_prover: batch-{batch_id}"),
chunk_proofs,
batch_header,
);
}
}
#[tokio::main]
Expand Down
14 changes: 12 additions & 2 deletions bin/src/prove_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ use prover::{BlockTrace, ChunkProof};
use std::panic::{catch_unwind, AssertUnwindSafe};

#[cfg(feature = "batch-prove")]
pub fn prove_batch(id: &str, chunk_proofs: Vec<ChunkProof>) {
use prover::{BatchHeader, MAX_AGG_SNARKS};

#[cfg(feature = "batch-prove")]
pub fn prove_batch(
id: &str,
chunk_proofs: Vec<ChunkProof>,
batch_header: BatchHeader<MAX_AGG_SNARKS>,
) {
use prover::BatchProvingTask;

let batch = BatchProvingTask { chunk_proofs };
let batch = BatchProvingTask {
chunk_proofs,
batch_header,
};
let result = catch_unwind(AssertUnwindSafe(|| prover::test::batch_prove(id, batch)));

match result {
Expand Down

0 comments on commit 5d73889

Please sign in to comment.