50ea2a5b0f
This change modifies the implementation of `get_spendable_sapling_notes` and `select_spendable_sapling_notes` to only return notes at positions where the associated note commitment tree shard has been fully scanned. This is slightly more conservative than it needs to be, because there could be cases where witnesses imported into the tree in the `shardtree_support` migration cover the complete range of a subtree (and hence that subtree doesn't need to be re-scanned). However, we can't detect or depend upon that condition in general without attempting to create a witness for each note retrieved. A possible alternative to this approach would be to not bound our query results on the requested total, and instead attempt to construct a witness for each note we retrieve, skipping the note if we cannot construct a witness. However, given that accessing the note commitment tree can be a costly operation requiring nontrivial deserialization costs, the more conservative database-oriented approach is perhaps better. |
||
---|---|---|
.github | ||
components | ||
librustzcash | ||
zcash_client_backend | ||
zcash_client_sqlite | ||
zcash_extensions | ||
zcash_history | ||
zcash_primitives | ||
zcash_proofs | ||
.gitattributes | ||
.gitignore | ||
.gitlab-ci.yml | ||
COPYING.md | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
rust-toolchain.toml |
README.md
Zcash Rust crates
This repository contains a (work-in-progress) set of Rust crates for working with Zcash.
Security Warnings
These libraries are currently under development and have not been fully-reviewed.
License
All code in this workspace is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Downstream code forks should note that some (but not all) of these crates
and components depend on the 'orchard' crate, which is licensed under the
Bootstrap Open Source License.
A license exception is provided allowing some derived works that are linked or
combined with the 'orchard' crate to be copied or distributed under the original
licenses (in this case MIT / Apache 2.0), provided that the included portions of
the 'orchard' code remain subject to BOSL.
See https://github.com/zcash/orchard/blob/main/COPYING for details of which
derived works can make use of this exception, and the README.md
files in
subdirectories for which crates and components this applies to.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.