Skip to content

Commit 68ab601

Browse files
feat: rm test_balance_not_in_range
1 parent d95feef commit 68ab601

File tree

1 file changed

+0
-98
lines changed

1 file changed

+0
-98
lines changed

zk_prover/src/circuits/tests.rs

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -463,104 +463,6 @@ mod test {
463463
);
464464
}
465465

466-
// // 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.
467-
// // Furthermore, the public input check on the root hash and on root_balances[0] should fail too
468-
// #[test]
469-
// fn test_balance_not_in_range() {
470-
// let merkle_sum_tree =
471-
// MerkleSumTree::<N_ASSETS, N_BYTES>::new("src/merkle_sum_tree/csv/entry_16.csv")
472-
// .unwrap();
473-
474-
// let user_index = 0;
475-
476-
// let merkle_proof = merkle_sum_tree.generate_proof(user_index).unwrap();
477-
// let user_entry = merkle_sum_tree.get_entry(user_index);
478-
479-
// // Only now we can instantiate the circuit with the actual inputs
480-
// let mut circuit = MstInclusionCircuit::<LEVELS, N_ASSETS, N_BYTES>::init(
481-
// merkle_proof,
482-
// user_entry.clone(),
483-
// );
484-
485-
// let balance = BigUint::from(2u64).pow(N_BYTES as u32 * 8) - BigUint::from(1u64);
486-
487-
// 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
488-
489-
// let invalid_prover = MockProver::run(K, &circuit, circuit.instances()).unwrap();
490-
491-
// assert_eq!(
492-
// invalid_prover.verify(),
493-
// Err(vec![
494-
// VerifyFailure::Permutation {
495-
// column: (Any::Fixed, 2).into(),
496-
// location: FailureLocation::OutsideRegion { row: 351 }
497-
// },
498-
// VerifyFailure::Permutation {
499-
// column: (Any::Fixed, 2).into(),
500-
// location: FailureLocation::OutsideRegion { row: 579 }
501-
// },
502-
// VerifyFailure::Permutation {
503-
// column: (Any::Fixed, 2).into(),
504-
// location: FailureLocation::OutsideRegion { row: 807 }
505-
// },
506-
// VerifyFailure::Permutation {
507-
// column: (Any::Fixed, 2).into(),
508-
// location: FailureLocation::OutsideRegion { row: 1035 }
509-
// },
510-
// VerifyFailure::Permutation {
511-
// column: (Any::advice(), 0).into(),
512-
// location: FailureLocation::InRegion {
513-
// region: (31, "assign value to perform range check").into(),
514-
// offset: 14
515-
// }
516-
// },
517-
// VerifyFailure::Permutation {
518-
// column: (Any::advice(), 0).into(),
519-
// location: FailureLocation::InRegion {
520-
// region: (48, "assign value to perform range check").into(),
521-
// offset: 14
522-
// }
523-
// },
524-
// VerifyFailure::Permutation {
525-
// column: (Any::advice(), 0).into(),
526-
// location: FailureLocation::InRegion {
527-
// region: (65, "assign value to perform range check").into(),
528-
// offset: 14
529-
// }
530-
// },
531-
// VerifyFailure::Permutation {
532-
// column: (Any::advice(), 0).into(),
533-
// location: FailureLocation::InRegion {
534-
// region: (78, "permute state").into(),
535-
// offset: 36
536-
// }
537-
// },
538-
// VerifyFailure::Permutation {
539-
// column: (Any::advice(), 0).into(),
540-
// location: FailureLocation::InRegion {
541-
// region: (79, "assign value to perform range check").into(),
542-
// offset: 0
543-
// }
544-
// },
545-
// VerifyFailure::Permutation {
546-
// column: (Any::advice(), 0).into(),
547-
// location: FailureLocation::InRegion {
548-
// region: (79, "assign value to perform range check").into(),
549-
// offset: 14
550-
// }
551-
// },
552-
// VerifyFailure::Permutation {
553-
// column: (Any::Instance, 0).into(),
554-
// location: FailureLocation::OutsideRegion { row: 1 }
555-
// },
556-
// VerifyFailure::Permutation {
557-
// column: (Any::Instance, 0).into(),
558-
// location: FailureLocation::OutsideRegion { row: 2 }
559-
// },
560-
// ])
561-
// );
562-
// }
563-
564466
#[cfg(feature = "dev-graph")]
565467
#[test]
566468
fn print_mst_inclusion() {

0 commit comments

Comments
 (0)