-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: removing redundant key fetching (#8043)
Fixes #7954 I replaced the use of `encode_and_encrypt_note` with `encode_and_encrypt_note_with_keys` in most of the places as it allowed for reusing the obtained keys. Note that there is only 1 legimate place remaining where it made sense to keep on using `encode_and_encrypt_note` and that is [here](https://github.com/AztecProtocol/aztec-packages/blob/34ae51df5d45973deb3408075a50070c781f7a48/noir-projects/noir-contracts/contracts/app_subscription_contract/src/main.nr#L47). All the other places are either test contracts or the token blacklist contract which is very outdated by now and hence it didn't seem to be worth it to update it. Given this I think we should nuke `encode_and_encrypt_note` to keep the API simpler and to make devs write efficient code. Does the reviewer agree? (possibly also `encode_and_encrypt_event`) Token::transfer(...) gates before were 49296 and after 38903. Diff of **10393 gates**.
- Loading branch information
Showing
2 changed files
with
35 additions
and
11 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
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