Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align note commitment ranges for subtree construction to subtree boundaries #1682

Open
nuttycom opened this issue Jan 20, 2025 · 0 comments
Open

Comments

@nuttycom
Copy link
Contributor

In https://github.com/zcash/librustzcash/blob/main/zcash_client_sqlite/src/lib.rs#L1175, we set and use a fixed power-of-two chunk size for note commitment tree subtree construction. A minor performance improvement would be to use the power-of-two boundaries in the note commitment tree to make it so that insertion of a subtree can consist of insertion of just a single node in the circumstance that there are no marked (or checkpointed) children. This may require this calling code to avoid creating checkpoints except within 100 blocks of the current chain tip; we should make sure we're not creating excessive checkpoints anyway so that we minimize the amount of pruning that is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant