Parallelise note commitment tree point conversions #5425
Labels
A-cryptography
Area: Cryptography related
A-state
Area: State / database changes
C-enhancement
Category: This is an improvement
I-cost
Zebra infrastructure costs
I-slow
Problems with performance or responsiveness
Motivation
We can speed up note commitment tree updates by running point conversions in parallel with tree updates.
Designs
Run the following operations in parallel rayon iterators or threads:
cm_x.into()
)self.inner.append(...)
)We can start appending notes as soon as the first point conversion is completed.
This change can be made for Sprout, Sapling, and Orchard. Sprout is a lower priority because it's not currently being used much.
Orchard example:
zebra/zebra-chain/src/orchard/tree.rs
Lines 309 to 310 in 267db7f
zcashd
example of out of order note insertion usingshardtree
:zcash/incrementalmerkletree#50
The text was updated successfully, but these errors were encountered: