Skip to content

Commit

Permalink
chore(circuits): Remove obsolete comments in native private kernel ci…
Browse files Browse the repository at this point in the history
…rcuit (#2570)

Clean up comments

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [x] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [x] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [x] 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).
  • Loading branch information
jeanmon authored Sep 29, 2023
1 parent 2a1d446 commit a6b6c7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,6 @@ void initialise_end_values(PrivateKernelInputsInit<NT> const& private_inputs,

namespace aztec3::circuits::kernel::private_kernel {

// using plonk::stdlib::merkle_tree::

// // TODO: NEED TO RECONCILE THE `proof`'s public inputs (which are uint8's) with the
// // private_call.call_stack_item.public_inputs!
// CT::AggregationObject verify_proofs(Builder& builder,
// PrivateKernelInputsInit<CT> const& private_inputs,
// size_t const& num_private_call_public_inputs,
// size_t const& num_private_kernel_public_inputs)
// {
// CT::AggregationObject aggregation_object = Aggregator::aggregate(
// &builder, private_inputs.private_call.vk, private_inputs.private_call.proof,
// num_private_call_public_inputs);

// Aggregator::aggregate(&builder,
// private_inputs.previous_kernel.vk,
// private_inputs.previous_kernel.proof,
// num_private_kernel_public_inputs,
// aggregation_object);

// return aggregation_object;
// }

void validate_this_private_call_against_tx_request(DummyCircuitBuilder& builder,
PrivateKernelInputsInit<NT> const& private_inputs)
{
Expand Down Expand Up @@ -171,9 +149,6 @@ void update_end_values(DummyCircuitBuilder& builder,
// https://github.com/AztecProtocol/aztec-packages/issues/660
}

// NOTE: THIS IS A VERY UNFINISHED WORK IN PROGRESS.
// TODO(mike): is there a way to identify whether an input has not been used by ths circuit? This would help us
// more-safely ensure we're constraining everything.
KernelCircuitPublicInputs<NT> native_private_kernel_circuit_initial(DummyCircuitBuilder& builder,
PrivateKernelInputsInit<NT> const& private_inputs)
{
Expand Down Expand Up @@ -205,13 +180,8 @@ KernelCircuitPublicInputs<NT> native_private_kernel_circuit_initial(DummyCircuit
private_inputs.tx_request.tx_context.contract_deployment_data,
private_inputs.tx_request.function_data);

// We'll skip any verification in this native implementation, because for a Local Developer Testnet, there won't
// _be_ a valid proof to verify!!! auto aggregation_object = verify_proofs(builder,
// private_inputs,
// _private_inputs.private_call.vk->num_public_inputs,
// _private_inputs.previous_kernel.vk->num_public_inputs);

// TODO(dbanks12): kernel vk membership check!
// This is where a real circuit would perform recursive verification of the previous kernel proof and private call
// proof.

// In the native version, as there is no verify_proofs call, we can initialize aggregation object with the default
// constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace aztec3::circuits::kernel::private_kernel {

using aztec3::circuits::abis::KernelCircuitPublicInputs;
using aztec3::circuits::abis::private_kernel::PrivateKernelInputsInit;
// using abis::private_kernel::PublicInputs;
using DummyBuilder = aztec3::utils::DummyCircuitBuilder;

KernelCircuitPublicInputs<NT> native_private_kernel_circuit_initial(DummyBuilder& builder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,6 @@ void initialise_end_values(PreviousKernelData<NT> const& previous_kernel, Kernel

namespace aztec3::circuits::kernel::private_kernel {

// // TODO: NEED TO RECONCILE THE `proof`'s public inputs (which are uint8's) with the
// // private_call.call_stack_item.public_inputs!
// CT::AggregationObject verify_proofs(Builder& builder,
// PrivateInputs<CT> const& private_inputs,
// size_t const& num_private_call_public_inputs,
// size_t const& num_private_kernel_public_inputs)
// {
// CT::AggregationObject aggregation_object = Aggregator::aggregate(
// &builder, private_inputs.private_call.vk, private_inputs.private_call.proof,
// num_private_call_public_inputs);

// Aggregator::aggregate(&builder,
// private_inputs.previous_kernel.vk,
// private_inputs.previous_kernel.proof,
// num_private_kernel_public_inputs,
// aggregation_object);

// return aggregation_object;
// }

void pop_and_validate_this_private_call_hash(
DummyCircuitBuilder& builder,
PrivateCallData<NT> const& private_call,
Expand Down Expand Up @@ -115,9 +95,6 @@ void validate_inputs(DummyCircuitBuilder& builder, PrivateKernelInputsInner<NT>
common_validate_0th_nullifier(builder, private_inputs.previous_kernel.public_inputs.end);
}

// NOTE: THIS IS A VERY UNFINISHED WORK IN PROGRESS.
// TODO(mike): is there a way to identify whether an input has not been used by ths circuit? This would help us
// more-safely ensure we're constraining everything.
KernelCircuitPublicInputs<NT> native_private_kernel_circuit_inner(DummyCircuitBuilder& builder,
PrivateKernelInputsInner<NT> const& private_inputs)
{
Expand Down Expand Up @@ -153,13 +130,8 @@ KernelCircuitPublicInputs<NT> native_private_kernel_circuit_inner(DummyCircuitBu
private_call_stack_item.public_inputs.contract_deployment_data,
private_call_stack_item.function_data);

// We'll skip any verification in this native implementation, because for a Local Developer Testnet, there won't
// _be_ a valid proof to verify!!! auto aggregation_object = verify_proofs(builder,
// private_inputs,
// _private_inputs.private_call.vk->num_public_inputs,
// _private_inputs.previous_kernel.vk->num_public_inputs);

// TODO(dbanks12): kernel vk membership check!
// This is where a real circuit would perform recursive verification of the previous kernel proof and private call
// proof.

// Note: given that we skipped the verify_proof function, the aggregation object we get at the end will just be
// the same as we had at the start. public_inputs.end.aggregation_object = aggregation_object;
Expand Down

0 comments on commit a6b6c7b

Please sign in to comment.