Create a Program with Compressed PDAs
Overview to compressed PDA core features and guide for program development.
Compressed PDAs provide full functionality of accounts at PDAs, without per-account rent cost.
100-byte PDA
~ 0.0016 SOL
~ 0.00001 SOL
160x
Compressed PDAs are derived using a specific program address and seed, like regular PDAs. Custom programs invoke the to create and update accounts, instead of the System program.
Compressed PDAs at a Glance
Rent free PDAs
Create accounts at program-derived addresses without upfront rent exempt balance.
Full PDA Functionality
Persistent unique identification and program ownership.
Composable
CPI support between compressed and regular PDAs.
Start Building
Developing with compressed PDAs works similar to regular PDAs and involves minimal setup:
Prerequisites
Install Solana CLI:
sh -c "$(curl -sSfL https://release.solana.com/v2.2.15/install)"Install Anchor CLI:
cargo install --git https://github.com/coral-xyz/anchor avm --force
avm install latest
avm use latestInstall the Light CLI:
npm -g i @lightprotocol/zk-compression-cli### verify installation
light --versionCommon Errors
Program Examples
Full compressed account lifecycle (create, increment, decrement, reset, close) using Anchor framework
Native Solana program implementation with Rust tests
Pinocchio implementation using light-sdk-pinocchio with Rust tests
Create new compressed accounts and update existing ones within a single instruction and one validity proof
Create compressed accounts and read them on-chain
Compare compressed accounts with standard Solana accounts
Program that uses zero-knowledge proofs for identity verification with compressed accounts
Next Steps
Get an overview of the SDKs or Program Examples.
Last updated
Was this helpful?