diff --git a/cpp/src/aztec3/circuits/rollup/base/.test.cpp b/cpp/src/aztec3/circuits/rollup/base/.test.cpp index 961c6f59..c61b6da0 100644 --- a/cpp/src/aztec3/circuits/rollup/base/.test.cpp +++ b/cpp/src/aztec3/circuits/rollup/base/.test.cpp @@ -474,7 +474,9 @@ TEST_F(base_rollup_tests, nullifier_tree_regression) BaseRollupInputs empty_inputs = dummy_base_rollup_inputs_with_vk_proof(); // This test runs after some data has already been inserted into the tree - // TODO: explain data + // This test will pre-populate the tree with 24 values (0 item + 23 more) simulating that a rollup inserting two + // random values has already been performed. This rollup then adds two further random values that will end up having + // their low nullifiers point at each other std::vector initial_values(23, 0); for (size_t i = 0; i < 7; i++) { initial_values[i] = i + 1; @@ -493,7 +495,6 @@ TEST_F(base_rollup_tests, nullifier_tree_regression) AppendOnlyTreeSnapshot nullifier_tree_start_snapshot = std::get<1>(inputs_and_snapshots); AppendOnlyTreeSnapshot nullifier_tree_end_snapshot = std::get<2>(inputs_and_snapshots); - // We now have the correct tree - can debug in circuit /** * RUN */ @@ -512,6 +513,7 @@ TEST_F(base_rollup_tests, nullifier_tree_regression) ASSERT_EQ(outputs.end_nullifier_tree_snapshot, nullifier_tree_end_snapshot); } +// Note leaving this test here as there are no negative tests, even though it no longer passes // TEST_F(base_rollup_tests, new_nullifier_tree_sparse_attack) // { // // @todo THIS SHOULD NOT BE PASSING. The circuit should fail with an assert as we are trying to double-spend. diff --git a/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp b/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp index 81fac0b5..47c1aa67 100644 --- a/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp +++ b/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp @@ -291,9 +291,6 @@ AppendOnlySnapshot check_nullifier_tree_non_membership_and_insert_to_tree(DummyC // Witness containing index and path auto nullifier_index = 4 * i + j; - info("nullifier index", nullifier_index); - - // info(nullifier_insertion_subtree); auto witness = baseRollupInputs.low_nullifier_membership_witness[nullifier_index]; // Preimage of the lo-index required for a non-membership proof @@ -301,12 +298,6 @@ AppendOnlySnapshot check_nullifier_tree_non_membership_and_insert_to_tree(DummyC // Newly created nullifier auto nullifier = new_nullifiers[j]; - // preimage - info("preimage"); - info("value: ", low_nullifier_preimage.leaf_value); - info("next index: ", low_nullifier_preimage.next_index); - info("next value: ", low_nullifier_preimage.next_value); - // TODO: reason about this more strongly, can this cause issues? if (nullifier != 0) { diff --git a/cpp/src/aztec3/circuits/rollup/base/nullifier_tree_testing_harness.cpp b/cpp/src/aztec3/circuits/rollup/base/nullifier_tree_testing_harness.cpp index 38e1182d..3c44dd7f 100644 --- a/cpp/src/aztec3/circuits/rollup/base/nullifier_tree_testing_harness.cpp +++ b/cpp/src/aztec3/circuits/rollup/base/nullifier_tree_testing_harness.cpp @@ -76,8 +76,6 @@ NullifierMemoryTreeTestingHarness::circuit_prep_batch_insert(std::vector con // Start insertion index fr start_insertion_index = this->size(); - info(values); - // Low nullifiers std::vector low_nullifiers; std::vector pending_insertion_tree; @@ -105,10 +103,6 @@ NullifierMemoryTreeTestingHarness::circuit_prep_batch_insert(std::vector con bool is_already_present; std::tie(current, is_already_present) = find_closest_leaf(leaves_, new_value); - info("new value: ", new_value); - info("current"); - info(current); - // If the inserted value is 0, then we ignore and provide a dummy low nullifier if (new_value == 0) { sibling_paths.push_back(empty_sp);