28 releases (8 stable)

new 2.0.0-alpha.9 Apr 17, 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

#163 in Magic Beans

Download history 45/week @ 2024-12-28 814/week @ 2025-01-04 509/week @ 2025-01-11 450/week @ 2025-01-18 212/week @ 2025-01-25 58/week @ 2025-02-01 245/week @ 2025-02-08 445/week @ 2025-02-15 416/week @ 2025-02-22 560/week @ 2025-03-01 316/week @ 2025-03-08 603/week @ 2025-03-15 593/week @ 2025-03-22 359/week @ 2025-03-29 673/week @ 2025-04-05 839/week @ 2025-04-12

2,613 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
~714K SLoC