From 06590d1886cae00a26b11906cf9c081727fa6c4e Mon Sep 17 00:00:00 2001 From: Ming Date: Thu, 10 Oct 2024 09:21:59 +0800 Subject: [PATCH] mockprover error hint (#270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Görgens --- ceno_zkvm/src/scheme/mock_prover.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ceno_zkvm/src/scheme/mock_prover.rs b/ceno_zkvm/src/scheme/mock_prover.rs index b6eb755cb..e0e0b9e8a 100644 --- a/ceno_zkvm/src/scheme/mock_prover.rs +++ b/ceno_zkvm/src/scheme/mock_prover.rs @@ -481,6 +481,15 @@ impl<'a, E: ExtensionField + Hash> MockProver { println!("======================================================"); println!("Error: {} constraints not satisfied", errors.len()); + println!( + r"Hints: + - If you encounter a constraint error that sporadically occurs in different environments + (e.g., passes locally but fails in CI), + this often points to unassigned witnesses during the assignment phase. + Accessing these cells before they are properly written leads to undefined behavior. + " + ); + for error in errors { error.print(wits_in, &cb.cs.witin_namespace_map); }