Expand description
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
Modules§
- Builders for individual epochs and blocks: useful when constructing a
Tree
in parallel, but unnecessary in a single thread. - internal
internal
The internal implementation of the tree, exposed here for documentation. - r1cs
r1cs
This module defines how to verify TCT auth paths in a rank-1 constraint system. - Incremental serialization and non-incremental deserialization for the
Tree
. - A dynamic representation of nodes within the internal tree structure.
- Validation checks to ensure that
Tree
s are well-formed.
Structs§
- Forgotten
internal
A version tracking when a particular piece of the tree was explicitly forgotten. - The index of a [
Commitment
] within aTree
. - The root hash of a
Tree
. - A commitment to a note or swap.
- A sparse merkle tree witnessing up to 65,536 epochs of up to 65,536 blocks of up to 65,536 [
Commitment
]s.
Enums§
- When inserting a
Commitment
into aTree
, should weKeep
it to allow it to be witnessed later, orForget
about it after updating the root hash of the tree?
Statics§
- DOMAIN_
SEPARATOR internal
The domain separator used for leaves in the tree, and used as a base index for the domain separators of nodes in the tree (nodes get a domain separator of the formDOMAIN_SEPARATOR + HEIGHT
).