https://github.com/andrewwhitehead/brangetree
https://github.com/andrewwhitehead/brangetree
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrewwhitehead/brangetree
- Owner: andrewwhitehead
- License: apache-2.0
- Created: 2020-05-18T02:42:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T23:13:44.000Z (about 5 years ago)
- Last Synced: 2025-01-11T22:13:40.896Z (5 months ago)
- Language: Rust
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# brangetree - Binary Range Tree
Support for creating binary Merkle tree hashes from a list of sorted leaf nodes, at high speed and
with minimal memory consumption.## Generating test data
The `scripts/gen-data.py` utility can be used to generate test data. Each data file is a gzipped
series of bits, where 0 bits represent non-revoked credentials and 1 bits represent revoked
credentials. The test data spreads the revocations over the entire range (assuming every
credential has been issued) which represents close to worst case performance for the particular
registry size.## Python utilities
From the `python` directory, `scripts/brt-hash.py` can be used to produce the hash for a number
of data files provided as arguments to the script. Similarly, `scripts/inspect-data.py` can be
used to provide statistics about a particular data file.## Rust utilities
From the `rust` directory, resources can be built using `cargo build --release`. There are
currently two executables: `brt-hash` hashes and prints statistics for a set of data files,
while `brt-find` can be used to obtain the hash chain for a particular (non-revoked)
credential index. These executables may be run using (for example):
`cargo run --release --example brt-hash -- ../data/22bits_*`.