-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement recursive verification in the parity circuits #6006
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
f57cf23
Test refactor
PhilWindle fbe88f8
Tests
PhilWindle d4b4b34
More tests
PhilWindle 8f65274
Review changes
PhilWindle 082dd2f
Minor test change
PhilWindle bbd5852
Formatting
PhilWindle 250986b
Debug CI
PhilWindle 8462762
Test refactoring
PhilWindle ffc2fee
More test refactoring
PhilWindle a6bdcb4
More cleanup
PhilWindle 3b1e7ed
More cleanup
PhilWindle 1cf82f4
Debugging
PhilWindle dd83b2e
More debugging
PhilWindle 85148c6
Generate vks
PhilWindle 0ebd7a1
More fixes
PhilWindle 9c72103
Merge branch 'master' into pw/public-krnel-proving
PhilWindle ab3a8d3
Formatting
PhilWindle e38f7dc
Merge branch 'pw/public-krnel-proving' of github.com:AztecProtocol/az…
PhilWindle 5d1fcb3
Test fixes
PhilWindle 77c0b5f
Merge branch 'master' into pw/public-krnel-proving
PhilWindle 8d28bc3
Formatting
PhilWindle ab751ef
Attempt to get parity recursion working
PhilWindle 012abde
Cleanup
PhilWindle 7185130
Cleanup
PhilWindle 6382cce
Merge branch 'master' into pw/parity-recursion
PhilWindle 08d1b25
Cleanup
PhilWindle 5dc5779
Merge fixes
PhilWindle 8ca90c7
More fixes
PhilWindle 0690092
More cleanup
PhilWindle 1ae8447
Fixes
PhilWindle 6734ffa
Test fixes
PhilWindle 3629a22
Cleanup
PhilWindle 8620d4e
Cleanup
PhilWindle 5cd3cc7
Review changes
PhilWindle e08f32e
Merge branch 'master' into pw/parity-recursion
PhilWindle e9ceff4
Fixed merge conflicts
PhilWindle 51ebdd4
More merge fixes
PhilWindle 70a2b48
Merge fixes
PhilWindle 9816196
Added negative proving tests
PhilWindle fc307b8
Increase test timeout
PhilWindle 789aba3
Formatting
PhilWindle e402c25
Revert some verification key changes. Assert vk equivalence in circuits
PhilWindle 033d424
Reverted some previous changes
PhilWindle f784f93
Fixes
PhilWindle f25680f
Fix
PhilWindle c5a310f
Test fixes
PhilWindle f200538
Merge branch 'master' into pw/parity-recursion
PhilWindle c6dc44e
Updated comment
PhilWindle 4b7fded
Review changes
PhilWindle 292e78c
Merge branch 'master' into pw/parity-recursion
PhilWindle 8d7ab6f
Merge branch 'master' into pw/parity-recursion
PhilWindle c574400
Test fix
PhilWindle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
3 changes: 2 additions & 1 deletion
3
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,6 @@ | ||
use dep::parity_lib::{BaseParityInputs, ParityPublicInputs}; | ||
|
||
fn main(inputs: BaseParityInputs) -> pub ParityPublicInputs { | ||
#[recursive] | ||
fn main(inputs: BaseParityInputs) -> distinct 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
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
32 changes: 24 additions & 8 deletions
32
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 |
---|---|---|
@@ -1,17 +1,33 @@ | ||
use dep::types::{mocked::AggregationObject, traits::Empty}; | ||
use dep::types::{traits::{Empty, Serialize, Deserialize}}; | ||
|
||
struct ParityPublicInputs { | ||
aggregation_object: AggregationObject, | ||
sha_root: Field, | ||
converted_root: Field, | ||
sha_root: Field, | ||
converted_root: Field, | ||
} | ||
|
||
impl Empty for ParityPublicInputs { | ||
fn empty() -> Self { | ||
ParityPublicInputs { | ||
aggregation_object: AggregationObject::empty(), | ||
sha_root: 0, | ||
ParityPublicInputs { | ||
sha_root: 0, | ||
converted_root: 0, | ||
} | ||
} | ||
} | ||
} | ||
|
||
impl Serialize<2> for ParityPublicInputs { | ||
fn serialize(self) -> [Field; 2] { | ||
let mut fields = [0; 2]; | ||
fields[0] = self.sha_root; | ||
fields[1] = self.converted_root; | ||
fields | ||
} | ||
} | ||
|
||
impl Deserialize<2> for ParityPublicInputs { | ||
fn deserialize(fields: [Field; 2]) -> Self { | ||
ParityPublicInputs { | ||
sha_root: fields[0], | ||
converted_root: fields[1], | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
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,2 +1,3 @@ | ||
mod root_parity_input; | ||
mod root_parity_inputs; | ||
mod root_rollup_parity_input; |
13 changes: 6 additions & 7 deletions
13
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
use dep::types::{ | ||
mocked::Proof, | ||
traits::Empty | ||
}; | ||
use dep::types::{traits::Empty, recursion::{verification_key::VerificationKey, proof::RecursiveProof}}; | ||
use crate::parity_public_inputs::ParityPublicInputs; | ||
|
||
struct RootParityInput { | ||
proof: Proof, | ||
proof: RecursiveProof, | ||
verification_key: VerificationKey, | ||
public_inputs: ParityPublicInputs, | ||
} | ||
|
||
impl Empty for RootParityInput { | ||
fn empty() -> Self { | ||
RootParityInput { | ||
proof: Proof::empty(), | ||
proof: RecursiveProof::empty(), | ||
verification_key: VerificationKey::empty(), | ||
public_inputs: ParityPublicInputs::empty(), | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably temporary until we get a long lasting process version running.