librustzcash icon indicating copy to clipboard operation
librustzcash copied to clipboard

Ignore subtree roots in the unstable chain region on the Rust side

Open str4d opened this issue 1 year ago • 1 comments

The gRPC method to get subtree roots from lightwalletd takes a start index and returns every subtree root from there on. However, if we know that we won't use the most recent subtree root because there is a chance we rewind across a subtree boundary, then we may instead choose to ignore the subtree root update and rely on leaf insertions. This would reduce the number of subtree roots we need to insert into the cap tree, reducing overhead. We just need to ensure that we always end up at the same subtree root as we would have if we inserted the ignored root.

str4d avatar Jan 23 '24 23:01 str4d