Skip to content

Commit

Permalink
refactor: validating private call data (#6316)
Browse files Browse the repository at this point in the history
Please read [contributing guidelines](CONTRIBUTING.md) and remove this
line.
  • Loading branch information
LeilaWang authored May 10, 2024
1 parent a0f82db commit 84b9fcd
Show file tree
Hide file tree
Showing 15 changed files with 1,118 additions and 887 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ impl KernelCircuitPublicInputsComposer {

fn silo_note_hashes(&mut self) {
let first_nullifier = self.public_inputs.end.new_nullifiers.get_unchecked(0).value();
assert(first_nullifier != 0, "The 0th nullifier in the accumulated nullifier array is zero");

// This check is unnecessary. The 0th nullifier will always be set a non-zero value in private_kernel_init.
// assert(first_nullifier != 0, "The 0th nullifier in the accumulated nullifier array is zero");

let note_hashes = self.public_inputs.end.new_note_hashes.storage;
for i in 0..MAX_NEW_NOTE_HASHES_PER_TX {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
mod kernel_circuit_public_inputs_composer;
mod private_call_data_validator;
mod private_kernel_circuit_public_inputs_composer;
mod private_kernel_init;
mod private_kernel_inner;
mod private_kernel_tail;
mod private_kernel_tail_to_public;
mod tests;

use private_kernel_init::PrivateKernelInitCircuitPrivateInputs;
use private_kernel_inner::PrivateKernelInnerCircuitPrivateInputs;
use private_kernel_tail::PrivateKernelTailCircuitPrivateInputs;
use private_kernel_tail_to_public::PrivateKernelTailToPublicCircuitPrivateInputs;

// TODO: rename to be precise as to what its common to.
mod common;
Loading

0 comments on commit 84b9fcd

Please sign in to comment.