Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 8, 2024
1 parent 5be1bae commit 3b8264d
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 9 deletions.
3 changes: 3 additions & 0 deletions noir-projects/noir-protocol-circuits/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[workspace]
members = [
"crates/types",
"crates/parity-base",
"crates/parity-lib",
"crates/parity-root",
"crates/private-kernel-lib",
"crates/private-kernel-init",
"crates/private-kernel-init-simulated",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dep::parity_lib::base::{BaseParityInputs, BaseParityPublicInputs};
use dep::parity_lib::{BaseParityInputs, ParityPublicInputs};

fn main(inputs: BaseParityInputs) -> pub BaseParityPublicInputs {
fn main(inputs: BaseParityInputs) -> pub ParityPublicInputs {
inputs.base_parity_circuit()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod base_parity_inputs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
global NUM_MSGS_PER_BASE_PARITY: Field = 2;

struct BaseParityInputs {
msgs: [Field; NUM_MSGS_PER_BASE_PARITY],
}
Empty file.
12 changes: 12 additions & 0 deletions noir-projects/noir-protocol-circuits/crates/parity-lib/src/lib.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Base parity
mod base;

// Root parity
mod root;

mod parity_public_inputs;

use crate::base::base_parity_inputs::BaseParityInputs;
use crate::root::root_parity_input::RootParityInput;
use crate::root::root_parity_inputs::RootParityInputs;
use crate::parity_public_inputs::ParityPublicInputs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use dep::types::{
constants::NUM_FIELDS_PER_SHA256,
mocked::AggregationObject,
};

struct ParityPublicInputs {
aggregation_object: AggregationObject,
sha_root: [Field; NUM_FIELDS_PER_SHA256],
converted_root: Field,
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
mod root_parity_inputs;
mod root_parity_public_inputs;

use root_parity_inputs::RootParityInputs;
use root_parity_public_inputs::RootParityPublicInputs;
mod root_parity_input;
mod root_parity_inputs;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use dep::types::mocked::Proof;
use crate::parity_public_inputs::ParityPublicInputs;

struct RootParityInput {
proof: Proof,
public_inputs: ParityPublicInputs,
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use crate::root::root_parity_input::RootParityInput;

struct RootParityInputs {
children: [RootParityInput; 2],
}
Empty file.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dep::parity_lib::root::{RootParityInputs, RootParityPublicInputs};
use dep::parity_lib::{RootParityInputs, ParityPublicInputs};

fn main(inputs: RootParityInputs) -> pub RootParityInputsPublicInputs {
fn main(inputs: RootParityInputs) -> pub ParityPublicInputs {
inputs.root_parity_circuit()
}

0 comments on commit 3b8264d

Please sign in to comment.