Skip to main content

Storage

The storage component in the Calimero Network is essential for managing and maintaining the data generated and utilized by decentralized applications (DApps). It ensures data integrity, security, and efficient access, enabling seamless operation of applications within the network.

Core Capabilities​

  • Generic Storage Interface: Calimero provides a flexible storage interface that allows app developers to choose their preferred database. By default, Calimero uses RocksDB, but it can also support LevelDB, Sled, TigerBeetle, SQLite, or even cloud storage solutions like S3.

  • Context State Storage: The context state is backed by a Patricia-Trie structure flattened into the key-value map of the datastore. This structure ensures efficient state management and retrieval.

  • Data Blobs: The storage system handles non-state-transitional, encrypted blobs of data, similar to BitTorrent or IPFS. Nodes can lazily share these data blobs without needing centralized storage, ensuring efficient and secure data distribution across the network. By default, the blobstore is the local filesystem, but it can be configured to use any cloud storage option or content-addressed storage like IPFS.

  • Data Encryption: All data stored within the network is encrypted at rest, ensuring that sensitive information remains protected. This includes both state-transitional data and non-state-transitional data like attached files in DMs or collaborative document assets.

  • Efficient Data Operations: The storage component is optimized for quick data operations, ensuring that applications can access, retrieve, and update the data they need promptly. Caching mechanisms are employed to further improve data access speeds.

  • Garbage Collection: The system includes mechanisms for garbage collection using reference counting for trie data, allowing for the cleanup of obsolete or redundant data. This helps in maintaining optimal storage performance and resource utilization.

  • Metrics and Monitoring: The storage component provides detailed metrics on storage usage, including total usage and breakdowns by context. This allows for effective monitoring and management of storage resources.

Was this page helpful?
Need some help? Check Support page