-
Notifications
You must be signed in to change notification settings - Fork 597
feat: unconstraining keys in unconstrained encryption #7912
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
f16a8e9
bd0a81c
a77896d
5b18af0
7ff6752
2864c1e
cf530e6
d1ad0a8
116f281
90a4f8f
3b3336d
6cd407f
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 |
|---|---|---|
|
|
@@ -13,7 +13,8 @@ contract TokenBlacklist { | |
| use dep::aztec::{ | ||
| hash::compute_secret_hash, | ||
| prelude::{AztecAddress, Map, NoteGetterOptions, PrivateSet, PublicMutable, SharedMutable}, | ||
| encrypted_logs::encrypted_note_emission::encode_and_encrypt_note, utils::comparison::Comparator | ||
| encrypted_logs::encrypted_note_emission::{encode_and_encrypt_note, encode_and_encrypt_note_unconstrained}, | ||
| utils::comparison::Comparator | ||
| }; | ||
|
|
||
| use dep::authwit::{auth::{assert_current_call_valid_authwit, assert_current_call_valid_authwit_public}}; | ||
|
|
@@ -214,8 +215,8 @@ contract TokenBlacklist { | |
| } | ||
|
|
||
| let amount = U128::from_integer(amount); | ||
| storage.balances.sub(from, amount).emit(encode_and_encrypt_note(&mut context, from, from)); | ||
| storage.balances.add(to, amount).emit(encode_and_encrypt_note(&mut context, from, to)); | ||
| storage.balances.sub(from, amount).emit(encode_and_encrypt_note_unconstrained(&mut context, from, from)); | ||
| storage.balances.add(to, amount).emit(encode_and_encrypt_note_unconstrained(&mut context, from, to)); | ||
|
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. Did this change because it worked as a workaround around the Noir issue which reoccurred in this function (see here for context). I didn't want this PR to be blocked no more and we did this change in the standard token so I think it's an ok change to do.
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. So if we do constrained encryption this breaks?
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. Yes, it's a house of cards |
||
| } | ||
|
|
||
| #[aztec(private)] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.