#hashing #merkle-tree #blake3 #range #order #byte #group

bao-tree

BLAKE3 verfiied streaming with custom chunk groups and range set queries

36 releases (12 breaking)

0.13.0 Apr 10, 2024
0.11.1 Mar 23, 2024
0.9.1 Sep 28, 2023
0.5.3 Jul 31, 2023
0.1.5 Mar 31, 2023

#251 in Data structures

Download history 1050/week @ 2024-06-07 1233/week @ 2024-06-14 1225/week @ 2024-06-21 1298/week @ 2024-06-28 1754/week @ 2024-07-05 1199/week @ 2024-07-12 1535/week @ 2024-07-19 1212/week @ 2024-07-26 1423/week @ 2024-08-02 2862/week @ 2024-08-09 1717/week @ 2024-08-16 881/week @ 2024-08-23 1160/week @ 2024-08-30 894/week @ 2024-09-06 931/week @ 2024-09-13 548/week @ 2024-09-20

3,687 downloads per month
Used in 9 crates (4 directly)

MIT/Apache

255KB
5.5K SLoC

bao-tree

Actions Status docs.rs crates.io

The merkle tree used for BLAKE3 verified streaming.

This is a slightly different take on blake3 verified streaming than the bao crate.

The network wire format for encoded data and slices is compatible with the bao crate, except that this crate has builtin support for runtime configurable chunk groups.

It also allows encoding not just single ranges but sets of non-overlapping ranges. E.g. you can ask for bytes [0..1000,5000..6000] in a single query.

The intention is also to support both sync and async en/decoding out of the box with maximum code sharing.

It allows to define both pre- and post order outboard formats as well as custom outboard formats. Post order outboard formats have advantages for synchronizing append only files.

For more detailed info, see the docs

Dependencies

~2.5–3.5MB
~72K SLoC