Skip to content

Commit a76496f

Browse files
authored
chore(circuits): rename function to validate private call hash in PKC (it pops too) (#1418)
# Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
1 parent e788745 commit a76496f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit_inner.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,14 @@ namespace aztec3::circuits::kernel::private_kernel {
7474
// return aggregation_object;
7575
// }
7676

77-
void validate_this_private_call_hash(DummyCircuitBuilder& builder,
78-
PrivateCallData<NT> const& private_call,
79-
KernelCircuitPublicInputs<NT>& public_inputs)
77+
void pop_and_validate_this_private_call_hash(
78+
DummyCircuitBuilder& builder,
79+
PrivateCallData<NT> const& private_call,
80+
std::array<NT::fr, MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX>& private_call_stack)
8081
{
8182
// TODO(mike): this logic might need to change to accommodate the weird edge 3 initial txs (the 'main' tx, the 'fee'
8283
// tx, and the 'gas rebate' tx).
83-
const auto popped_private_call_hash = array_pop(public_inputs.end.private_call_stack);
84+
const auto popped_private_call_hash = array_pop(private_call_stack);
8485
const auto calculated_this_private_call_hash = private_call.call_stack_item.hash();
8586

8687
builder.do_assert(
@@ -151,7 +152,7 @@ KernelCircuitPublicInputs<NT> native_private_kernel_circuit_inner(DummyCircuitBu
151152

152153
validate_inputs(builder, private_inputs);
153154

154-
validate_this_private_call_hash(builder, private_inputs.private_call, public_inputs);
155+
pop_and_validate_this_private_call_hash(builder, private_inputs.private_call, public_inputs.end.private_call_stack);
155156

156157
common_validate_call_stack(builder, private_inputs.private_call);
157158

0 commit comments

Comments
 (0)