diff --git a/zk_prover/src/circuits/tests.rs b/zk_prover/src/circuits/tests.rs index c1a89c8e..1bb54079 100644 --- a/zk_prover/src/circuits/tests.rs +++ b/zk_prover/src/circuits/tests.rs @@ -463,104 +463,6 @@ mod test { ); } - // // Adding a balance at the verge of overflowing should fail the range check for any following computed sum and, because we are adding a fake balance. - // // Furthermore, the public input check on the root hash and on root_balances[0] should fail too - // #[test] - // fn test_balance_not_in_range() { - // let merkle_sum_tree = - // MerkleSumTree::::new("src/merkle_sum_tree/csv/entry_16.csv") - // .unwrap(); - - // let user_index = 0; - - // let merkle_proof = merkle_sum_tree.generate_proof(user_index).unwrap(); - // let user_entry = merkle_sum_tree.get_entry(user_index); - - // // Only now we can instantiate the circuit with the actual inputs - // let mut circuit = MstInclusionCircuit::::init( - // merkle_proof, - // user_entry.clone(), - // ); - - // let balance = BigUint::from(2u64).pow(N_BYTES as u32 * 8) - BigUint::from(1u64); - - // circuit.path_element_balances[0][0] = big_uint_to_fp(&balance); // 2^64 - 1. It means that as soon as it is summed with the other balances, it will overflow - - // let invalid_prover = MockProver::run(K, &circuit, circuit.instances()).unwrap(); - - // assert_eq!( - // invalid_prover.verify(), - // Err(vec![ - // VerifyFailure::Permutation { - // column: (Any::Fixed, 2).into(), - // location: FailureLocation::OutsideRegion { row: 351 } - // }, - // VerifyFailure::Permutation { - // column: (Any::Fixed, 2).into(), - // location: FailureLocation::OutsideRegion { row: 579 } - // }, - // VerifyFailure::Permutation { - // column: (Any::Fixed, 2).into(), - // location: FailureLocation::OutsideRegion { row: 807 } - // }, - // VerifyFailure::Permutation { - // column: (Any::Fixed, 2).into(), - // location: FailureLocation::OutsideRegion { row: 1035 } - // }, - // VerifyFailure::Permutation { - // column: (Any::advice(), 0).into(), - // location: FailureLocation::InRegion { - // region: (31, "assign value to perform range check").into(), - // offset: 14 - // } - // }, - // VerifyFailure::Permutation { - // column: (Any::advice(), 0).into(), - // location: FailureLocation::InRegion { - // region: (48, "assign value to perform range check").into(), - // offset: 14 - // } - // }, - // VerifyFailure::Permutation { - // column: (Any::advice(), 0).into(), - // location: FailureLocation::InRegion { - // region: (65, "assign value to perform range check").into(), - // offset: 14 - // } - // }, - // VerifyFailure::Permutation { - // column: (Any::advice(), 0).into(), - // location: FailureLocation::InRegion { - // region: (78, "permute state").into(), - // offset: 36 - // } - // }, - // VerifyFailure::Permutation { - // column: (Any::advice(), 0).into(), - // location: FailureLocation::InRegion { - // region: (79, "assign value to perform range check").into(), - // offset: 0 - // } - // }, - // VerifyFailure::Permutation { - // column: (Any::advice(), 0).into(), - // location: FailureLocation::InRegion { - // region: (79, "assign value to perform range check").into(), - // offset: 14 - // } - // }, - // VerifyFailure::Permutation { - // column: (Any::Instance, 0).into(), - // location: FailureLocation::OutsideRegion { row: 1 } - // }, - // VerifyFailure::Permutation { - // column: (Any::Instance, 0).into(), - // location: FailureLocation::OutsideRegion { row: 2 } - // }, - // ]) - // ); - // } - #[cfg(feature = "dev-graph")] #[test] fn print_mst_inclusion() {