Storage Architecture
AttestProtocol uses a hybrid storage architecture that combines on-chain immutability with off-chain scalability. This approach ensures cryptographic integrity while providing fast access and cost-effective operations.Storage Components
On-Chain Storage
Immutable attestation recordsCore attestation data stored directly on blockchain networks for cryptographic integrity and decentralized verification.
Indexing Layer
Fast query optimizationHigh-performance indexing services that enable rapid attestation discovery and complex query operations.
IPFS Integration
Distributed content storageLarge attestation data and metadata stored on IPFS for decentralized, content-addressed retrieval.
Caching Systems
Performance accelerationMulti-tier caching for frequently accessed attestations and schema definitions.
Blockchain-Specific Storage
Stellar (Soroban) Storage
Stellar uses Soroban smart contracts for attestation storage:- Cost: ~0.00001 XLM per attestation
- Finality: 3-5 seconds
- Query Speed: Direct contract calls
- Scalability: 1000+ TPS theoretical
Solana Storage
Solana uses Program Derived Addresses (PDAs) for attestation storage:- Cost: ~0.002 SOL per attestation
- Finality: 400ms average
- Query Speed: RPC + PDA derivation
- Scalability: 50,000+ TPS theoretical
Starknet Storage (Coming Soon)
Cairo-based storage with zero-knowledge capabilities:Data Storage Patterns
Full On-Chain Storage
Store complete attestation data on-chain:- Complete decentralization
- Cryptographic integrity
- No external dependencies
- Higher storage costs
- Size limitations
- Privacy concerns
Hash-Based Storage
Store data hashes on-chain with full data off-chain:- Lower on-chain costs
- Enhanced privacy
- Unlimited data size
- External dependencies
- Data availability concerns
- Additional complexity
Hybrid Storage
Combine public and private data:Indexing and Querying
Horizon Indexer (Stellar)
AttestProtocol’s custom indexer for Stellar attestations:- Real-time indexing
- Complex query support
- Aggregation capabilities
- Historical data access
Solana Indexing
Using Solana’s account scanning and filtering:- PDA-based organization
- Account scanning with filters
- Custom RPC endpoints
- Geyser plugin integration
Custom Query APIs
High-level query interfaces:Performance Optimization
Caching Strategies
Multi-tier caching for optimal performance:Batch Operations
Optimize for high-throughput scenarios:Connection Pooling
Optimize blockchain connections:Data Lifecycle Management
Archival Strategies
Manage long-term data storage:Pruning and Cleanup
Remove expired or revoked attestations:Privacy and Encryption
Field-Level Encryption
Encrypt sensitive fields before storage:Zero-Knowledge Storage
Store proofs without revealing data:Cross-Chain Storage
Multi-Chain Synchronization
Keep attestations synchronized across networks:Bridge Attestations
Create attestations that reference cross-chain data:Backup and Recovery
Distributed Backups
Implement robust backup strategies:Disaster Recovery
Plan for catastrophic failures:Monitoring and Analytics
Storage Metrics
Track storage health and performance:Best Practices
Storage Design
Storage Design
- Choose appropriate storage patterns based on data sensitivity
- Implement proper data lifecycle management
- Use caching strategically to improve performance
- Plan for cross-chain synchronization early
Performance
Performance
- Batch operations when possible
- Implement multi-tier caching
- Use connection pooling for blockchain clients
- Monitor and optimize query patterns
Security
Security
- Encrypt sensitive data before storage
- Implement proper access controls
- Use checksums for data integrity
- Plan for disaster recovery scenarios
Scalability
Scalability
- Design for horizontal scaling
- Implement data partitioning strategies
- Use appropriate indexing for query patterns
- Plan archive and cleanup procedures