A Solana program suite for efficient on-chain data compression and verification. This project includes multiple programs for handling account data compression, registry management, and state verification.
- Efficient on-chain data compression using multiple algorithms (LZ4, Snappy, Zstd)
- Configurable compression parameters
- Concurrent compression support
- Data integrity verification
- Compression queue management
- Rust 1.70.0 or later
- Solana CLI tools v1.16 or later
- Anchor framework
- Node.js v16+ (for deployment scripts)
- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install Solana CLI tools:
sh -c "$(curl -sSfL https://release.solana.com/v1.16.0/install)"
- Install project dependencies:
cargo build
- Configure your Solana cluster:
solana config set --url localhost
- Start a local validator:
solana-test-validator
- Build the programs:
./scripts/build.sh
cargo test --test integration_tests
cargo test --test compression_performance_tests
cargo test --test security_tests
cargo bench
- Build the programs:
./scripts/build.sh
- Deploy to localnet:
./scripts/deploy-local.sh
- Deploy to devnet:
./scripts/deploy-devnet.sh
- Deploy to mainnet:
./scripts/deploy-mainnet.sh
src/lib.rs
: Main program entrypoint and instruction processingsrc/error.rs
: Custom error typessrc/state.rs
: Program state managementsrc/processor.rs
: Instruction processing logic
tests/integration/
: Integration testssrc/lib.rs
: Main test suitesrc/compression_performance_tests.rs
: Performance benchmarkssrc/security_tests.rs
: Security and edge cases
scripts/build.sh
: Build all programsscripts/clean.sh
: Clean build artifactsscripts/test.sh
: Run all testsscripts/format.sh
: Format code using rustfmtscripts/lint.sh
: Run clippy lintsscripts/deploy-local.sh
: Deploy to local validatorscripts/deploy-devnet.sh
: Deploy to devnetscripts/deploy-mainnet.sh
: Deploy to mainnet
Program configurations can be modified in their respective src/lib.rs
files:
pub const MAX_COMPRESSION_RATIO: f64 = 10.0;
pub const MIN_CHUNK_SIZE: usize = 1024;
pub const MAX_CHUNK_SIZE: usize = 32768;
pub const MAX_CONCURRENT_COMPRESSIONS: u32 = 8;
Available compression algorithms:
- LZ4: Fast compression/decompression
- Snappy: Optimized for speed
- Zstd: Better compression ratios
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Run tests (
cargo test
) - Run clippy (
cargo clippy
) - Format code (
cargo fmt
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
For security concerns, please open an issue or contact the maintainers directly.
This project is licensed under the MIT License - see the LICENSE file for details.
- Solana Labs for the blockchain platform
- The Rust community for excellent compression libraries
- Contributors and maintainers