diff --git a/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit_inner.cpp b/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit_inner.cpp index 1475360c571..1ed14d432b2 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit_inner.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit_inner.cpp @@ -74,13 +74,14 @@ namespace aztec3::circuits::kernel::private_kernel { // return aggregation_object; // } -void validate_this_private_call_hash(DummyCircuitBuilder& builder, - PrivateCallData const& private_call, - KernelCircuitPublicInputs& public_inputs) +void pop_and_validate_this_private_call_hash( + DummyCircuitBuilder& builder, + PrivateCallData const& private_call, + std::array& private_call_stack) { // TODO(mike): this logic might need to change to accommodate the weird edge 3 initial txs (the 'main' tx, the 'fee' // tx, and the 'gas rebate' tx). - const auto popped_private_call_hash = array_pop(public_inputs.end.private_call_stack); + const auto popped_private_call_hash = array_pop(private_call_stack); const auto calculated_this_private_call_hash = private_call.call_stack_item.hash(); builder.do_assert( @@ -151,7 +152,7 @@ KernelCircuitPublicInputs native_private_kernel_circuit_inner(DummyCircuitBu validate_inputs(builder, private_inputs); - validate_this_private_call_hash(builder, private_inputs.private_call, public_inputs); + pop_and_validate_this_private_call_hash(builder, private_inputs.private_call, public_inputs.end.private_call_stack); common_validate_call_stack(builder, private_inputs.private_call);