ZK Compression

Canopy Depth

The number of top levels of a Concurrent Merkle Tree that are cached on-chain within the CMT account, reducing the Merkle proof size that clients must include in transactions. A canopy depth of D means the top D levels (2^D - 1 nodes) are stored on-chain, so clients only need to supply (tree_depth - D) sibling hashes instead of the full tree_depth. Deeper canopies reduce transaction size and compute costs but increase the CMT account's rent-exempt balance. Choosing optimal canopy depth is a cost trade-off between on-chain storage rent and per-transaction proof overhead.

IDcanopy-depth

Plain meaning

Start with the shortest useful explanation before going deeper.

The number of top levels of a Concurrent Merkle Tree that are cached on-chain within the CMT account, reducing the Merkle proof size that clients must include in transactions. A canopy depth of D means the top D levels (2^D - 1 nodes) are stored on-chain, so clients only need to supply (tree_depth - D) sibling hashes instead of the full tree_depth. Deeper canopies reduce transaction size and compute costs but increase the CMT account's rent-exempt balance. Choosing optimal canopy depth is a cost trade-off between on-chain storage rent and per-transaction proof overhead.

Mental model

Use the quick analogy first so the term is easier to reason about when you meet it in code, docs, or prompts.

Think of it as a building block that connects one definition to the larger Solana system around it.

Technical context

Place the term inside its Solana layer so the definition is easier to reason about.

Compressed state, proofs, and scale-oriented storage patterns.

Why builders care

Turn the term from vocabulary into something operational for product and engineering work.

This term unlocks adjacent concepts quickly, so it works best when you treat it as a junction instead of an isolated definition.

AI handoff

AI handoff

Use this compact block when you want to give an agent or assistant grounded context without dumping the entire page.

Canopy Depth (canopy-depth)
Category: ZK Compression
Definition: The number of top levels of a Concurrent Merkle Tree that are cached on-chain within the CMT account, reducing the Merkle proof size that clients must include in transactions. A canopy depth of D means the top D levels (2^D - 1 nodes) are stored on-chain, so clients only need to supply (tree_depth - D) sibling hashes instead of the full tree_depth. Deeper canopies reduce transaction size and compute costs but increase the CMT account's rent-exempt balance. Choosing optimal canopy depth is a cost trade-off between on-chain storage rent and per-transaction proof overhead.
Related: Canopy (Merkle Tree), Concurrent Merkle Tree, Merkle Proof
Glossary Copilot

Ask grounded Solana questions without leaving the glossary.

Use glossary context, relationships, mental models, and builder paths to get structured answers instead of generic chat output.

Explain this code

Optional: paste Anchor, Solana, or Rust code so the Copilot can map primitives back to glossary terms.

Ask a glossary-grounded question

Ask a glossary-grounded question

The Copilot will answer using the current term, related concepts, mental models, and the surrounding glossary graph.

Concept graph

See the term as part of a network, not a dead-end definition.

These branches show which concepts this term touches directly and what sits one layer beyond them.

Branch

Canopy (Merkle Tree)

The canopy is an optional on-chain cache of the upper N levels of a Concurrent Merkle Tree's nodes, stored within the CMT account itself, which eliminates the need for clients to pass those N levels as part of their Merkle proof in transactions, thereby reducing transaction size and cost. A canopy of depth D means the top D levels of the tree (2^D - 1 nodes) are always available on-chain; for a depth-20 tree with a canopy of 14, clients only need to supply 6 sibling hashes rather than 20, saving approximately 448 bytes of transaction data per instruction. Storing a deeper canopy increases the CMT account's rent-exempt balance linearly but makes interactions cheaper in compute units and transaction space, so selecting the optimal canopy depth is a cost trade-off for tree designers.

Branch

Concurrent Merkle Tree

A Concurrent Merkle Tree (CMT) is a specialized on-chain Solana data structure that allows multiple state updates to the same Merkle tree within a single block without conflicting, by recording a changelog buffer of recent root transitions that validators use to reconcile parallel proof submissions. A CMT is parameterized by its maximum depth (max_depth, determining tree capacity of 2^max_depth leaves), max_buffer_size (number of concurrent changes the changelog can track, directly controlling how many operations per slot the tree can safely absorb), and an optional canopy_depth. The SPL Account Compression program manages CMTs, and they are the foundational storage primitive for both Metaplex compressed NFTs and Light Protocol compressed accounts.

Branch

Merkle Proof

A Merkle proof is the minimal set of sibling node hashes (the proof path) along the branch from a specific leaf to the tree root, allowing anyone to independently verify that a given leaf is part of a Merkle tree by recomputing the root from the leaf hash and the sibling hashes without needing any other tree data. In Solana's state compression, every compressed account or compressed NFT interaction requires the caller to supply a valid Merkle proof; the on-chain program hashes the proof against the current root stored in the Concurrent Merkle Tree account to confirm inclusion before executing the state change. Proof size scales linearly with tree depth (e.g., a depth-20 tree requires up to 20 sibling hashes, each 32 bytes), so the canopy is used to pre-store upper-level nodes on-chain to reduce the proof data that must be passed in transactions.

Next concepts to explore

Keep the learning chain moving instead of stopping at one definition.

These are the next concepts worth opening if you want this term to make more sense inside a real Solana workflow.

ZK Compression

Canopy (Merkle Tree)

The canopy is an optional on-chain cache of the upper N levels of a Concurrent Merkle Tree's nodes, stored within the CMT account itself, which eliminates the need for clients to pass those N levels as part of their Merkle proof in transactions, thereby reducing transaction size and cost. A canopy of depth D means the top D levels of the tree (2^D - 1 nodes) are always available on-chain; for a depth-20 tree with a canopy of 14, clients only need to supply 6 sibling hashes rather than 20, saving approximately 448 bytes of transaction data per instruction. Storing a deeper canopy increases the CMT account's rent-exempt balance linearly but makes interactions cheaper in compute units and transaction space, so selecting the optimal canopy depth is a cost trade-off for tree designers.

ZK Compression

Concurrent Merkle Tree

A Concurrent Merkle Tree (CMT) is a specialized on-chain Solana data structure that allows multiple state updates to the same Merkle tree within a single block without conflicting, by recording a changelog buffer of recent root transitions that validators use to reconcile parallel proof submissions. A CMT is parameterized by its maximum depth (max_depth, determining tree capacity of 2^max_depth leaves), max_buffer_size (number of concurrent changes the changelog can track, directly controlling how many operations per slot the tree can safely absorb), and an optional canopy_depth. The SPL Account Compression program manages CMTs, and they are the foundational storage primitive for both Metaplex compressed NFTs and Light Protocol compressed accounts.

ZK Compression

Merkle Proof

A Merkle proof is the minimal set of sibling node hashes (the proof path) along the branch from a specific leaf to the tree root, allowing anyone to independently verify that a given leaf is part of a Merkle tree by recomputing the root from the leaf hash and the sibling hashes without needing any other tree data. In Solana's state compression, every compressed account or compressed NFT interaction requires the caller to supply a valid Merkle proof; the on-chain program hashes the proof against the current root stored in the Concurrent Merkle Tree account to confirm inclusion before executing the state change. Proof size scales linearly with tree depth (e.g., a depth-20 tree requires up to 20 sibling hashes, each 32 bytes), so the canopy is used to pre-store upper-level nodes on-chain to reduce the proof data that must be passed in transactions.

ZK Compression

Compressed Account

A compressed account is a Solana account whose state is stored as a leaf in an on-chain Concurrent Merkle Tree rather than as a dedicated on-chain account, making it 100–1,000x cheaper to create and maintain because no rent-exempt lamport balance is required per account. Compressed accounts are identified by a hash of their data and position in the tree; to interact with one, a client must supply a Merkle proof (or rely on the canopy) showing the leaf is part of the current tree root, which the on-chain program verifies before processing the state change. Light Protocol's compressed account model supports arbitrary data, discriminators, and owner programs, making it a general-purpose replacement for expensive on-chain accounts in high-volume use cases.

Commonly confused with

Terms nearby in vocabulary, acronym, or conceptual neighborhood.

These entries are easy to mix up when you are reading quickly, prompting an LLM, or onboarding into a new layer of Solana.

ZK Compressioncanopy

Canopy (Merkle Tree)

The canopy is an optional on-chain cache of the upper N levels of a Concurrent Merkle Tree's nodes, stored within the CMT account itself, which eliminates the need for clients to pass those N levels as part of their Merkle proof in transactions, thereby reducing transaction size and cost. A canopy of depth D means the top D levels of the tree (2^D - 1 nodes) are always available on-chain; for a depth-20 tree with a canopy of 14, clients only need to supply 6 sibling hashes rather than 20, saving approximately 448 bytes of transaction data per instruction. Storing a deeper canopy increases the CMT account's rent-exempt balance linearly but makes interactions cheaper in compute units and transaction space, so selecting the optimal canopy depth is a cost trade-off for tree designers.

Related terms

Follow the concepts that give this term its actual context.

Glossary entries become useful when they are connected. These links are the shortest path to adjacent ideas.

ZK Compressioncanopy

Canopy (Merkle Tree)

The canopy is an optional on-chain cache of the upper N levels of a Concurrent Merkle Tree's nodes, stored within the CMT account itself, which eliminates the need for clients to pass those N levels as part of their Merkle proof in transactions, thereby reducing transaction size and cost. A canopy of depth D means the top D levels of the tree (2^D - 1 nodes) are always available on-chain; for a depth-20 tree with a canopy of 14, clients only need to supply 6 sibling hashes rather than 20, saving approximately 448 bytes of transaction data per instruction. Storing a deeper canopy increases the CMT account's rent-exempt balance linearly but makes interactions cheaper in compute units and transaction space, so selecting the optimal canopy depth is a cost trade-off for tree designers.

ZK Compressionconcurrent-merkle-tree

Concurrent Merkle Tree

A Concurrent Merkle Tree (CMT) is a specialized on-chain Solana data structure that allows multiple state updates to the same Merkle tree within a single block without conflicting, by recording a changelog buffer of recent root transitions that validators use to reconcile parallel proof submissions. A CMT is parameterized by its maximum depth (max_depth, determining tree capacity of 2^max_depth leaves), max_buffer_size (number of concurrent changes the changelog can track, directly controlling how many operations per slot the tree can safely absorb), and an optional canopy_depth. The SPL Account Compression program manages CMTs, and they are the foundational storage primitive for both Metaplex compressed NFTs and Light Protocol compressed accounts.

ZK Compressionmerkle-proof

Merkle Proof

A Merkle proof is the minimal set of sibling node hashes (the proof path) along the branch from a specific leaf to the tree root, allowing anyone to independently verify that a given leaf is part of a Merkle tree by recomputing the root from the leaf hash and the sibling hashes without needing any other tree data. In Solana's state compression, every compressed account or compressed NFT interaction requires the caller to supply a valid Merkle proof; the on-chain program hashes the proof against the current root stored in the Concurrent Merkle Tree account to confirm inclusion before executing the state change. Proof size scales linearly with tree depth (e.g., a depth-20 tree requires up to 20 sibling hashes, each 32 bytes), so the canopy is used to pre-store upper-level nodes on-chain to reduce the proof data that must be passed in transactions.

More in category

Stay in the same layer and keep building context.

These entries live beside the current term and help the page feel like part of a larger knowledge graph instead of a dead end.

ZK Compression

State Compression

State Compression is Solana's technique for storing the cryptographic fingerprint (root hash) of a Merkle tree on-chain while keeping the actual leaf data off-chain in the Solana ledger's account data logs, reducing the cost of storing large datasets by orders of magnitude. A compressed NFT collection of 1 million items costs roughly 50 SOL to mint versus ~12,000 SOL with standard SPL accounts, because only a single Concurrent Merkle Tree account occupies on-chain storage. Any data change requires updating the root hash and supplying a Merkle proof to the on-chain program, which verifies inclusion without reading the full dataset.

ZK Compression

ZK Compression

ZK Compression, pioneered by Light Protocol, extends Solana's state compression model beyond NFTs to general-purpose compressed accounts by using zero-knowledge proofs (specifically Groth16 SNARKs verified via the alt_bn128 syscall) to prove the validity of state transitions without storing full account state on-chain. Compressed accounts live in on-chain Merkle trees but their data is reconstructed from the Solana ledger by indexers like Photon, enabling developers to build applications that use thousands of accounts at a fraction of the normal rent cost — often 1,000x to 5,000x cheaper than regular accounts. The protocol introduces compressed tokens, compressed PDAs, and a system of nullifiers to prevent double-spends while maintaining Solana's throughput.

ZK Compression

Compressed Account

A compressed account is a Solana account whose state is stored as a leaf in an on-chain Concurrent Merkle Tree rather than as a dedicated on-chain account, making it 100–1,000x cheaper to create and maintain because no rent-exempt lamport balance is required per account. Compressed accounts are identified by a hash of their data and position in the tree; to interact with one, a client must supply a Merkle proof (or rely on the canopy) showing the leaf is part of the current tree root, which the on-chain program verifies before processing the state change. Light Protocol's compressed account model supports arbitrary data, discriminators, and owner programs, making it a general-purpose replacement for expensive on-chain accounts in high-volume use cases.

ZK Compression

Concurrent Merkle Tree

A Concurrent Merkle Tree (CMT) is a specialized on-chain Solana data structure that allows multiple state updates to the same Merkle tree within a single block without conflicting, by recording a changelog buffer of recent root transitions that validators use to reconcile parallel proof submissions. A CMT is parameterized by its maximum depth (max_depth, determining tree capacity of 2^max_depth leaves), max_buffer_size (number of concurrent changes the changelog can track, directly controlling how many operations per slot the tree can safely absorb), and an optional canopy_depth. The SPL Account Compression program manages CMTs, and they are the foundational storage primitive for both Metaplex compressed NFTs and Light Protocol compressed accounts.