Go to file
Kris Nuttycombe 24e8c82546 zcash_client_backend: Get commitment tree depth for a given number of confirmations from the database.
This fixes the following bug:

Due to complexities related to non-linear scanning, checkpoints are only
added to the wallet's commitment tree in cases where there are notes
discovered within a scanned block. At present, the `shardtree` API only
makes it possible to add multiple checkpoints of the same tree state
when adding checkpoints at the chain tip, and this functionality is not
used by `zcash_client_backend` because we perform checkpoint insertion
in batches that may contain gaps in the case that multiple blocks
contain no Sapling notes. While it would be possible to fix this by
altering the `shardtree` API to permit explicit insertion of multiple
checkpoints of the same tree state at a given note position, this fix
takes a simpler approach.

Instead of ensuring that a checkpoint exists at every block and
computing the required checkpoint depth directly from the minimum number
of confirmations required when attempting a spend, we alter the
`WalletCommitmentTrees` API to allow internal information of the note
commitment tree to be used to determine this checkpoint depth, given the
minimum number of commitments as an argument. This allows us to select a
usable checkpoint from the sparse checkpoint set that resulted from the
sparse insertion of checkpoints described above.
2023-09-11 18:38:54 -06:00
.github build(deps): bump actions/checkout from 3 to 4 2023-09-05 05:54:36 +00:00
components Render byte slices as hex more often in `Debug` impls 2023-08-30 20:41:27 +00:00
librustzcash Remove librustzcash crate 2020-03-14 10:50:04 +13:00
zcash_client_backend zcash_client_backend: Get commitment tree depth for a given number of confirmations from the database. 2023-09-11 18:38:54 -06:00
zcash_client_sqlite zcash_client_backend: Get commitment tree depth for a given number of confirmations from the database. 2023-09-11 18:38:54 -06:00
zcash_extensions zcash_proofs 0.13.0-rc.1 2023-09-08 19:48:55 +00:00
zcash_history Bump MSRV for `zcash_primitives` and dependents to 1.65 2023-05-16 15:37:07 +00:00
zcash_primitives zcash_primitives 0.13.0-rc.1 2023-09-08 19:45:54 +00:00
zcash_proofs zcash_proofs 0.13.0-rc.1 2023-09-08 19:48:55 +00:00
.gitattributes zcash_client_backend: Add gRPC bindings behind feature flag 2022-11-02 06:22:02 +00:00
.gitignore Add `Cargo.lock` to repository 2023-09-11 22:12:52 +00:00
.gitlab-ci.yml Remove duplicate test stage for rust lastest 2018-10-09 09:34:10 -07:00
COPYING.md Ensure that GitHub's "View license" link points to complete license information. 2022-01-18 14:19:53 +00:00
Cargo.lock cargo update 2023-09-11 22:12:52 +00:00
Cargo.toml Migrate to `incrementalmerkletree 0.5`, `orchard 0.6` 2023-09-08 18:57:25 +00:00
LICENSE-APACHE Add license files. 2017-03-17 11:09:05 -06:00
LICENSE-MIT Update copyright year in LICENSE-MIT. 2022-01-18 14:19:53 +00:00
README.md Address feedback about the use of "permissive". 2022-06-28 16:46:13 +01:00
rust-toolchain.toml Bump MSRV for `zcash_primitives` and dependents to 1.65 2023-05-16 15:37:07 +00:00

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

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.