spl_account_compression

Module concurrent_tree_wrapper

source
Expand description

This module provides a wrapper around the ConcurrentMerkleTree struct from the spl_concurrent_merkle_tree crate. It provides a set of functions that can be called from the Anchor program to interact with the tree. The functions are used to initialize the tree, set a leaf, fill empty or append a leaf, and prove a leaf. As the tree is generic over the depth and buffer size, the functions are implemented using macros that infer the depth and buffer size from the header information stored on-chain. Usage of the macros directly is discouraged, as they have huge match statements with every case taking it’s own stack frame. Instead, use the exported functions from this module and refenrece or Box the arguments to the functions to avoid the stack frame explosion.

Re-exports§

Structs§

  • Exported for Anchor / Solita Conurrent Merkle Tree is a Merkle Tree that allows multiple tree operations targeted for the same tree root to succeed.
  • Exported for Anchor / Solita Arguments structure for filling an empty leaf or appending a new leaf to the tree.
  • Exported for Anchor / Solita Arguments structure for initializing a tree with a root.
  • Exported for Anchor / Solita Arguments structure for proving a leaf in the tree.
  • Exported for Anchor / Solita Arguments structure for setting a leaf in the tree.

Enums§

Constants§

  • Exported for Anchor / Solita An empty node is a 32 byte array of zeroes

Functions§

Type Aliases§

  • Exported for Anchor / Solita Abstract type for 32 byte leaf data