scalus.crypto.tree.IncrementalMerkleTree
See theIncrementalMerkleTree companion object
class IncrementalMerkleTree
Off-chain incremental Merkle tree.
Fixed-depth binary Merkle tree backed by a persistent (structurally-shared) tree.
appendreplaces one leaf and rebuilds O(depth) nodes on the path — everything else is shared with the previous version.rootHashis O(1) — just the root node's hash.proveMembership/proveAppendwalk root→leaf collecting siblings — O(depth).- Empty subtrees are shared: an empty tree of depth 20 uses only 21 node objects.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article