Skip to content

Commit 39f8d5a

Browse files
committed
tmp disable circuit test
1 parent 343b176 commit 39f8d5a

File tree

1 file changed

+82
-82
lines changed

1 file changed

+82
-82
lines changed

testool/src/statetest/executor.rs

+82-82
Original file line numberDiff line numberDiff line change
@@ -567,88 +567,88 @@ pub fn run_test(
567567
log::debug!("witness_block created");
568568
//builder.sdb.list_accounts();
569569

570-
let row_usage = ScrollSuperCircuit::min_num_rows_block_subcircuits(&witness_block);
571-
let mut overflow = false;
572-
for (num, limit) in row_usage.iter().zip_eq(
573-
get_sub_circuit_limit_and_confidence()
574-
.iter()
575-
.map(|(limit, _)| limit),
576-
) {
577-
if num.row_num_real > *limit {
578-
log::warn!(
579-
"ccc detail: suite.id {}, st.id {}, circuit {}, num {}, limit {}",
580-
suite.id,
581-
st.id,
582-
num.name,
583-
num.row_num_real,
584-
limit
585-
);
586-
overflow = true;
587-
}
588-
}
589-
let max_row_usage = row_usage.iter().max_by_key(|r| r.row_num_real).unwrap();
590-
if overflow {
591-
log::warn!(
592-
"ccc overflow: st.id {}, detail {} {}",
593-
st.id,
594-
max_row_usage.name,
595-
max_row_usage.row_num_real
596-
);
597-
// panic!("{} {}", max_row_usage.name, max_row_usage.row_num_real);
598-
return Err(StateTestError::CircuitOverflow {
599-
circuit: max_row_usage.name.to_string(),
600-
needed: max_row_usage.row_num_real,
601-
});
602-
}
603-
log::info!(
604-
"ccc ok: st.id {}, detail {} {}",
605-
st.id,
606-
max_row_usage.name,
607-
max_row_usage.row_num_real
608-
);
609-
610-
if !circuits_config.super_circuit {
611-
if (*CIRCUIT).is_empty() {
612-
CircuitTestBuilder::<1, 1>::new_from_block(witness_block).run();
613-
} else {
614-
match (*CIRCUIT).as_str() {
615-
"modexp" => test_with::<ModExpCircuit<Fr>>(&witness_block),
616-
"bytecode" => test_with::<BytecodeCircuit<Fr>>(&witness_block),
617-
"ecc" => test_with::<EccCircuit<Fr, 9>>(&witness_block),
618-
"sig" => {
619-
if !witness_block
620-
.precompile_events
621-
.get_ecrecover_events()
622-
.is_empty()
623-
{
624-
test_with::<SigCircuit<Fr>>(&witness_block);
625-
} else {
626-
log::warn!("no ec recover event {}, skip", st.id);
627-
}
628-
}
629-
_ => unimplemented!(),
630-
};
631-
}
632-
} else {
633-
log::debug!("test super circuit {}", *CIRCUIT);
634-
635-
// TODO: these codes are too difficult to maintain.
636-
// The correct way is to dump trace files,
637-
// and use separate tools to test trace files.
638-
#[cfg(feature = "inner-prove")]
639-
{
640-
eth_types::constants::set_env_coinbase(&st.env.current_coinbase);
641-
prover::test::inner_prove(&test_id, &witness_block);
642-
}
643-
#[cfg(feature = "chunk-prove")]
644-
{
645-
eth_types::constants::set_env_coinbase(&st.env.current_coinbase);
646-
prover::test::chunk_prove(&test_id, prover::ChunkProvingTask::from(vec![scroll_trace]));
647-
}
648-
649-
#[cfg(not(any(feature = "inner-prove", feature = "chunk-prove")))]
650-
mock_prove(&test_id, &witness_block);
651-
};
570+
// let row_usage = ScrollSuperCircuit::min_num_rows_block_subcircuits(&witness_block);
571+
// let mut overflow = false;
572+
// for (num, limit) in row_usage.iter().zip_eq(
573+
// get_sub_circuit_limit_and_confidence()
574+
// .iter()
575+
// .map(|(limit, _)| limit),
576+
// ) {
577+
// if num.row_num_real > *limit {
578+
// log::warn!(
579+
// "ccc detail: suite.id {}, st.id {}, circuit {}, num {}, limit {}",
580+
// suite.id,
581+
// st.id,
582+
// num.name,
583+
// num.row_num_real,
584+
// limit
585+
// );
586+
// overflow = true;
587+
// }
588+
// }
589+
// let max_row_usage = row_usage.iter().max_by_key(|r| r.row_num_real).unwrap();
590+
// if overflow {
591+
// log::warn!(
592+
// "ccc overflow: st.id {}, detail {} {}",
593+
// st.id,
594+
// max_row_usage.name,
595+
// max_row_usage.row_num_real
596+
// );
597+
// // panic!("{} {}", max_row_usage.name, max_row_usage.row_num_real);
598+
// return Err(StateTestError::CircuitOverflow {
599+
// circuit: max_row_usage.name.to_string(),
600+
// needed: max_row_usage.row_num_real,
601+
// });
602+
// }
603+
// log::info!(
604+
// "ccc ok: st.id {}, detail {} {}",
605+
// st.id,
606+
// max_row_usage.name,
607+
// max_row_usage.row_num_real
608+
// );
609+
610+
// if !circuits_config.super_circuit {
611+
// if (*CIRCUIT).is_empty() {
612+
// CircuitTestBuilder::<1, 1>::new_from_block(witness_block).run();
613+
// } else {
614+
// match (*CIRCUIT).as_str() {
615+
// "modexp" => test_with::<ModExpCircuit<Fr>>(&witness_block),
616+
// "bytecode" => test_with::<BytecodeCircuit<Fr>>(&witness_block),
617+
// "ecc" => test_with::<EccCircuit<Fr, 9>>(&witness_block),
618+
// "sig" => {
619+
// if !witness_block
620+
// .precompile_events
621+
// .get_ecrecover_events()
622+
// .is_empty()
623+
// {
624+
// test_with::<SigCircuit<Fr>>(&witness_block);
625+
// } else {
626+
// log::warn!("no ec recover event {}, skip", st.id);
627+
// }
628+
// }
629+
// _ => unimplemented!(),
630+
// };
631+
// }
632+
// } else {
633+
// log::debug!("test super circuit {}", *CIRCUIT);
634+
//
635+
// // TODO: these codes are too difficult to maintain.
636+
// // The correct way is to dump trace files,
637+
// // and use separate tools to test trace files.
638+
// #[cfg(feature = "inner-prove")]
639+
// {
640+
// eth_types::constants::set_env_coinbase(&st.env.current_coinbase);
641+
// prover::test::inner_prove(&test_id, &witness_block);
642+
// }
643+
// #[cfg(feature = "chunk-prove")]
644+
// {
645+
// eth_types::constants::set_env_coinbase(&st.env.current_coinbase);
646+
// prover::test::chunk_prove(&test_id, prover::ChunkProvingTask::from(vec![scroll_trace]));
647+
// }
648+
//
649+
// #[cfg(not(any(feature = "inner-prove", feature = "chunk-prove")))]
650+
// mock_prove(&test_id, &witness_block);
651+
// };
652652
log::debug!("balance_overflow = {balance_overflow}");
653653
log::debug!(
654654
"has_l2_different_evm_behaviour_trace = {}",

0 commit comments

Comments
 (0)