32 releases (11 stable)

new 2.0.0-alpha.10 May 1, 2025
2.0.0-alpha.6 Mar 31, 2025
1.5.1 Apr 30, 2025
1.3.1 Mar 21, 2025
0.82.0-alpha.0 Dec 26, 2024

#46 in Magic Beans

Download history 968/week @ 2025-01-09 536/week @ 2025-01-16 197/week @ 2025-01-23 101/week @ 2025-01-30 61/week @ 2025-02-06 550/week @ 2025-02-13 338/week @ 2025-02-20 566/week @ 2025-02-27 389/week @ 2025-03-06 523/week @ 2025-03-13 578/week @ 2025-03-20 443/week @ 2025-03-27 622/week @ 2025-04-03 651/week @ 2025-04-10 760/week @ 2025-04-17 257/week @ 2025-04-24

2,335 downloads per month
Used in 35 crates (17 directly)

MIT/Apache

5MB
109K SLoC

penumbra-tct

The tiered state commitment tree for Penumbra.


lib.rs:

The tiered commitment tree for Penumbra.

Eternity┃           ╱╲ ◀───────────── Anchor
    Tree┃          ╱││╲               = Global Tree Root
        ┃         * ** *           ╮
        ┃      *   *  *   *8 levels
        ┃   *     *    *     *     ╯
        ┃  ╱╲    ╱╲    ╱╲    ╱╲
        ┃ ╱││╲  ╱││╲  ╱││╲  ╱││╲ ◀─── Global Tree Leaf
                        ▲             = Epoch Root
                     ┌──┘
                     │
                     │
   Epoch┃           ╱╲ ◀───────────── Epoch Root
    Tree┃          ╱││╲
        ┃         * ** *           ╮
        ┃      *   *  *   *8 levels
        ┃   *     *    *     *     ╯
        ┃  ╱╲    ╱╲    ╱╲    ╱╲
        ┃ ╱││╲  ╱││╲  ╱││╲  ╱││╲ ◀─── Epoch Leaf
                 ▲                    = Block Root
                 └───┐
                     │
                     │
   Block┃           ╱╲ ◀───────────── Block Root
    Tree┃          ╱││╲
        ┃         * ** *           ╮
        ┃      *   *  *   *8 levels
        ┃   *     *    *     *     ╯
        ┃  ╱╲    ╱╲    ╱╲    ╱╲
        ┃ ╱││╲  ╱││╲  ╱││╲  ╱││╲ ◀─── Block Leaf
                                      = Note Commitment

Builders for individual epochs and blocks: useful when constructing a Tree in parallel, but unnecessary in a single thread. Build individual epochs to insert into Trees. Build individual blocks to insert into epoch::Builders or Trees.

Dependencies

~39MB
~715K SLoC