iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
964 stars 577 forks source link

Change `DecryptNotesRequest` to require a common list of accounts and options #5048

Closed andiflabs closed 2 weeks ago

andiflabs commented 3 weeks ago

Summary

All the use cases for DecryptNotesTask involve passing a bunch of notes to decrypt for the same account(s), and with the same options. To save bandwidth, and to allow future optimizations, it makes sense to group all account keys into a single input parameter, so that they don't have to be repeated for each and every note.

This changes the request serialization size from O(accounts * notes) to O(accounts + notes).

This change may not offer a huge performance boost by itself, but it allows future improvements, including:

Testing Plan

Unit tests

Documentation

N/A

Breaking Change

SDK breaking change: