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:
the use of faster decryption algorithms when more than 1 account is involved
fewer (de)serializations of account keys
better batching of decrypt requests, and larger batches of encrypted notes with less memory overhead
Testing Plan
Unit tests
Documentation
N/A
Breaking Change
SDK breaking change:
the signature for WorkerPool.decryptNotes() has changed
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)
toO(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:
WorkerPool.decryptNotes()
has changedDecryptNotesRequest
has changedDecryptNoteOptions
was removed