-
Notifications
You must be signed in to change notification settings - Fork 599
fix: Patches to cycle_group and cycle_group fuzzer #12385
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
Changes from all commits
9f962a8
d5a6c55
01e2367
e52d99d
a1b8d75
552214f
03479d4
9112e0f
81e911a
1aa2081
96c0656
4ed0510
b50c80e
6816467
9e3c662
f260f60
1022444
c0f16c6
3284a8f
afbcab1
af74a20
0a3e45d
47053a0
55bad89
ea4d9ea
c8c8be2
7653b8d
380ec4e
3348ddb
2c11ad0
bed01b2
ccb3f79
4e0ce11
90bf51d
507e0ab
10790af
815ddbd
9450eb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,8 +157,11 @@ join_split_outputs join_split_circuit_component(join_split_inputs const& inputs) | |
|
|
||
| // When allowing chaining, ensure propagation is to one's self (and not to some other user). | ||
| group_ct self = input_note_1.owner; | ||
| allow_chain_1.must_imply(output_note_1.owner == self, "inter-user chaining disallowed"); | ||
| allow_chain_2.must_imply(output_note_2.owner == self, "inter-user chaining disallowed"); | ||
|
|
||
| group_ct output_note_1_owner = output_note_1.owner; | ||
| group_ct output_note_2_owner = output_note_2.owner; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
| allow_chain_1.must_imply(output_note_1_owner == self, "inter-user chaining disallowed"); | ||
| allow_chain_2.must_imply(output_note_2_owner == self, "inter-user chaining disallowed"); | ||
|
|
||
| // Prevent chaining from a partial claim note. | ||
| is_defi_deposit.must_imply(!allow_chain_1, "cannot chain from a partial claim note"); | ||
|
|
@@ -190,7 +193,9 @@ join_split_outputs join_split_circuit_component(join_split_inputs const& inputs) | |
| */ | ||
|
|
||
| // Verify input notes have the same account public key and account_required. | ||
| input_note_1.owner.assert_equal(input_note_2.owner, "input note owners don't match"); | ||
| group_ct input_note_1_owner = input_note_1.owner; | ||
| group_ct input_note_2_owner = input_note_2.owner; | ||
| input_note_1_owner.assert_equal(input_note_2_owner, "input note owners don't match"); | ||
| input_note_1.account_required.assert_equal(input_note_2.account_required, | ||
| "input note account_required don't match"); | ||
|
|
||
|
|
@@ -199,7 +204,7 @@ join_split_outputs join_split_circuit_component(join_split_inputs const& inputs) | |
| inputs.account_private_key.assert_is_not_zero("account private key is zero"); | ||
| auto account_public_key = group_ct(grumpkin::g1::affine_one) * | ||
| group_ct::cycle_scalar::create_from_bn254_scalar(inputs.account_private_key); | ||
| account_public_key.assert_equal(input_note_1.owner, "account_private_key incorrect"); | ||
| account_public_key.assert_equal(input_note_1_owner, "account_private_key incorrect"); | ||
| inputs.account_required.assert_equal(input_note_1.account_required, "account_required incorrect"); | ||
|
|
||
| // Verify output notes creator_pubkey is either account_public_key.x or 0. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.