librustzcash/zcash_history
Kris Nuttycombe 4127e96082 Reduce the size of proptest-generated history trees.
After replacing `quickcheck` with `proptest` in `zcash_history`, memory
consumption of the property tests grew substantially as a consequence of
sample generation exploring the upper bounds of sample ranges;
previously, the large operation counts would have occurred only with low
probability. However, the correctness of the operations on the `Tree`
data structure should not depend upon the tree size, so it's fine to
reduce the number of operations in order to bound the memory
consumption. As the documentation on `Tree` notes, this data structure
is not intended to be used stand-alone because doing so may result in
unbounded memory use; the property tests were doing exactly this and so
were producing this exact pathological memory behavior.
2023-04-14 14:31:32 -06:00
..
examples Fix clippy complaints. 2022-12-09 09:32:34 -07:00
src Reduce the size of proptest-generated history trees. 2023-04-14 14:31:32 -06:00
.gitignore Add 'zcash_history/' from commit 'e2c131fdc308265adcab774e54d4d5804c23b368' 2020-03-03 17:51:19 -07:00
CHANGELOG.md Bump MSRV for `zcash_primitives` and dependents to 1.60 2023-01-19 23:48:24 +00:00
COPYRIGHT Rename zcash_mmr to zcash_history. 2020-03-03 18:14:40 -07:00
Cargo.toml Use `proptest` instead of `quickcheck` for `zcash_history` tests. 2023-04-14 14:31:32 -06:00
LICENSE-APACHE Add 'zcash_history/' from commit 'e2c131fdc308265adcab774e54d4d5804c23b368' 2020-03-03 17:51:19 -07:00
LICENSE-MIT Add 'zcash_history/' from commit 'e2c131fdc308265adcab774e54d4d5804c23b368' 2020-03-03 17:51:19 -07:00
README.md Rename zcash_mmr to zcash_history. 2020-03-03 18:14:40 -07:00

README.md

zcash_history

Special implementation of Merkle mountain ranges (MMR) for Zcash!

Build Status

The main design goals of this MMR implementation are

  • Allow zero-cache and avoid db callbacks. As it is implemented, calling side must just smartly pre-load MMR nodes from the database (about log2(tree length) for append, twice as much for deletion).

  • Reuse as much logic between rust and c++ clients and place it here and librustzcash.

  • Close to zero memory consumption.

License

zcash_history is distributed under the terms of both the MIT license and the Apache License (Version 2.0), at your choice.

See LICENSE-APACHE, and LICENSE-MIT for details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in zcash_history by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.