Skip to content

Commit

Permalink
test: resuscitate private kernel tests related to call stack item che…
Browse files Browse the repository at this point in the history
…ck (#2558)
  • Loading branch information
jeanmon authored Sep 27, 2023
1 parent fdf5fce commit 9e938fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@ TEST_F(native_private_kernel_init_tests, basic_contract_deployment)
EXPECT_EQ(builder.get_first_failure().code, CircuitErrorCode::NO_ERROR);
}

// TODO(suyash): Disabled until https://github.com/AztecProtocol/aztec-packages/issues/499 is resolved.
TEST_F(native_private_kernel_init_tests, DISABLED_contract_deployment_call_stack_item_hash_mismatch_fails)
TEST_F(native_private_kernel_init_tests, contract_deployment_call_stack_item_hash_mismatch_fails)
{
auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args());

// Randomise the second item in the private call stack (i.e. hash of the private call item).
private_inputs.private_call.call_stack_item.public_inputs.private_call_stack[1] = NT::fr::random_element();
// Randomise the first item in the private call stack (i.e. hash of the private call item).
private_inputs.private_call.call_stack_item.public_inputs.private_call_stack[0] = NT::fr::random_element();

DummyBuilder builder =
DummyBuilder("private_kernel_tests__contract_deployment_call_stack_item_hash_mismatch_fails");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_incorrect_function_le
"computed_contract_tree_root doesn't match purported_contract_tree_root");
}

// TODO(suyash): Disabled until https://github.com/AztecProtocol/aztec-packages/issues/499 is resolved.
TEST_F(native_private_kernel_inner_tests, DISABLED_private_function_incorrect_call_stack_item_hash_fails)
TEST_F(native_private_kernel_inner_tests, private_function_incorrect_call_stack_item_hash_fails)
{
auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args());

Expand All @@ -205,8 +204,6 @@ TEST_F(native_private_kernel_inner_tests, DISABLED_private_function_incorrect_ca
EXPECT_TRUE(builder.failed());
EXPECT_EQ(builder.get_first_failure().code,
CircuitErrorCode::PRIVATE_KERNEL__CALCULATED_PRIVATE_CALL_HASH_AND_PROVIDED_PRIVATE_CALL_HASH_MISMATCH);
EXPECT_EQ(builder.get_first_failure().message,
"calculated private_call_hash does not match provided private_call_hash at the top of the call stack");
}

TEST_F(native_private_kernel_inner_tests, private_kernel_should_fail_if_aggregating_too_many_commitments)
Expand Down

0 comments on commit 9e938fc

Please sign in to comment.