Core Concepts

Overview to ZK Compression's Core Concepts. Get a high-level system overview and learn about the compressed account model, lifecycle of a transaction, and considerations.

ZK Compression is an account primitive on Solana that drastically reduces on-chain state costs while maintaining Solana's security, composability, and performance.

High Level System Overview

This is how it works at a high level:

1

Storage of Compressed State

Compressed accounts store state as call data in , removing rent per account

2

Accessing Compressed State

Transactions specify state they access (read/write) and include it in the transaction payload

3

State Validation

Solana Programs the to update compressed state

  1. The protocol validates the state (validity of existing state, sum checks, ownership checks)

  2. The protocol enforces a schema: Classic Accounts → Compressed Accounts. Compressed accounts have a layout similar to classic accounts.

4

State Updates

At the end of an instruction, the new state is recorded as a log on the Solana ledger

5

Photon RPC Nodes

index the state changes, making the compressed account state available to clients via the ZK Compression RPC API.

6

Forester Nodes

Keeper nodes that interact with the to empty queues and rollover state trees.

Next Steps

In the following sections, we'll dive into the core concepts that make ZK Compression possible:

  • Compressed Account Model: Understand how compressed accounts differ from regular Solana accounts (not much!) and how they enhance efficiency.

  • State Trees: Learn about the Merkle tree structure used to store compressed accounts and how it minimizes on-chain storage.

  • Validity Proofs: Explore how the protocol uses zero-knowledge proofs to verify data validity while keeping proof sizes small.

  • Lifecycle of a Transaction: Follow the journey of a ZK-compressed transaction from creation to execution.

  • Considerations: Discover the trade-offs and scenarios where ZK Compression may or may not be the best solution.

Compressed Account Model

Last updated