-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
noir-projects/noir-protocol-circuits/crates/parity-base/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod base_parity_inputs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
12
noir-projects/noir-protocol-circuits/crates/parity-lib/src/lib.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
10 changes: 10 additions & 0 deletions
10
noir-projects/noir-protocol-circuits/crates/parity-lib/src/parity_public_inputs.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
7 changes: 2 additions & 5 deletions
7
noir-projects/noir-protocol-circuits/crates/parity-lib/src/root.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
7 changes: 7 additions & 0 deletions
7
noir-projects/noir-protocol-circuits/crates/parity-lib/src/root/root_parity_input.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
2 changes: 2 additions & 0 deletions
2
noir-projects/noir-protocol-circuits/crates/parity-lib/src/root/root_parity_inputs.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
4 changes: 2 additions & 2 deletions
4
noir-projects/noir-protocol-circuits/crates/parity-root/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |