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

bench ccc #330

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion bin/src/chain_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl ChunkBuilder {
// Construct chunk myself
async fn prove_by_block(l2geth: &l2geth_client::Client, begin_block: i64, end_block: i64) {
let mut chunk_builder = ChunkBuilder::new();
chunk_builder.block_limit = Some(1);
//chunk_builder.block_limit = Some(1);
let mut batch_builder = BatchBuilder::new();
let (begin_block, end_block) = if begin_block == 0 && end_block == 0 {
// Blocks within last 24 hours
Expand Down Expand Up @@ -245,6 +245,12 @@ fn prove_chunk(batch_id: u64, chunk_id: u64, block_traces: Vec<BlockTrace>) -> O
}
if env::var("CIRCUIT").unwrap_or_default() == "ccc" {
let ccc_modes = [CCCMode::Optimal];
let ccc_modes = [
CCCMode::Optimal,
CCCMode::Siger,
CCCMode::FollowerLight,
CCCMode::FollowerFull,
];
run_circuit_capacity_checker(batch_id, chunk_id, &block_traces, &ccc_modes);
return None;
}
Expand Down
5 changes: 3 additions & 2 deletions integration/src/capacity_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ fn get_ccc_result_of_chunk(
}
log::info!("capacity_checker test done");
pretty_print_row_usage(&acc_row_usage_raw, blocks, chunk_id, tag);
let avg_ccc_time = start_time.elapsed().as_millis() / tx_num as u128;
log::info!("avg time each tx: {avg_ccc_time}ms, mode {tag}");
let total_time = start_time.elapsed();
let avg_ccc_time = total_time.as_millis() / tx_num as u128;
log::info!("avg time each tx: {avg_ccc_time}ms, mode {tag}, total time {total_time:?}, tx_num {tx_num}");

(
acc_row_usage_raw,
Expand Down
Loading
Loading