27 releases (8 stable)

new 2.0.0-alpha.8 Apr 14, 2025
2.0.0-alpha.6 Mar 31, 2025
1.4.0 Apr 8, 2025
1.3.1 Mar 21, 2025
0.82.0-alpha.0 Dec 26, 2024

#796 in Magic Beans

Download history 130/week @ 2024-12-23 35/week @ 2024-12-30 905/week @ 2025-01-06 453/week @ 2025-01-13 437/week @ 2025-01-20 207/week @ 2025-01-27 46/week @ 2025-02-03 365/week @ 2025-02-10 351/week @ 2025-02-17 408/week @ 2025-02-24 556/week @ 2025-03-03 325/week @ 2025-03-10 726/week @ 2025-03-17 455/week @ 2025-03-24 403/week @ 2025-03-31 616/week @ 2025-04-07

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

MIT/Apache

5MB
108K 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
~713K SLoC