Back to News

Lens Storage Nodes: A Deep Dive

The problem with digital storage and the path forward.

JoshbyJoshon
Lens Storage Nodes: A Deep Dive

The Current State of Digital Storage & Its Limitations

Data powers the internet, shaping everything from social networks to e-commerce. Yet, the infrastructure that manages this data is dominated by centralized platforms, profiting from user-generated content and data while offering little in return. Storage plays a pivotal role in this control, determining who owns, accesses, and benefits from the digital economy. Despite the strides made by blockchain technology in ownership, control, and transparency, storage solutions have lagged behind, presenting significant challenges for decentralized social platforms such as Lens.

Today's digital storage landscape consists of three primary solutions, each with distinct trade-offs:

  1. Centralized Storage: centralized systems offer speed and editability, but they are vulnerable to unauthorized modifications, censorship, and a lack of true user ownership or control.

  2. IPFS: this technology introduces decentralization but fails to guarantee permanence. Content can disappear unless actively pinned, leaving users reliant on additional infrastructure to maintain availability.

  3. Decentralized Permanent Storage: other decentralized storage providers offer permanent immutable storage but the costs to store files can be very expensive, and in turn, doesn’t scale for app operation costs. Additionally, they do not support modification or deletion of content.

Lens utilizes blockchain technology to unlock new paradigms of ownership and transparency. However, storage remained a critical gap during Lens' early days, with content still reliant on offchain systems. With Storage Nodes, we address this problem by introducing decentralized storage, enabling users to own not just their connections but their content as well. This new development is en par with Lens’ vision of a fully resilient social network.

Lens Storage Nodes combine decentralized infrastructure with blockchain-enforced ownership to align content storage with Web3's core tenets.

Exploring Lens Storage Nodes

Lens Storage Nodes provide decentralized storage at the cost of centralized providers, while delivering enterprise-grade performance and seamless scalability. This technology is designed to integrate seamlessly with the Lens ecosystem, addressing the limitations of traditional decentralized storage while maintaining user ownership, flexibility, and security.

The core innovation of Lens Storage Nodes is an architecture that enable users to upload, edit, and delete content in IPFS clusters, with all modifications cryptographically validated by blockchain-based smart contracts or EVM-based wallet signatures. This infrastructure integrates IPFS for data persistence, utilizes multi-chain RPC blockchain nodes or offchain signatures for validation, and exposes data interfaces via a REST-like JSON API, validating that only authorized actions are permitted and safeguarding user control over their data.

Layers

The Storage Nodes customizable Access Control Layer templates and a cost-effective infrastructure enable developers to adopt web3 storage without sacrificing performance or accessibility, effectively bridging the gap between centralized and decentralized solutions. This approach offers the security and ownership benefits of blockchain technology with the flexibility and cost-effectiveness of traditional storage solutions.

More importantly, Storage Nodes provide users with full control over their content through blockchain-enforced ownership, and flexible permissions for modifying or deleting data.

Storage Nodes Architecture

Lens Storage nodes are comprised of the following sub-components:

  1. Lens Node: a kubo-based IPFS cluster for data persistence, providing a decentralized and scalable foundation for storage.

  2. Lens Link: a microservice that resolves mutable URIs into immutable IPFS-hosted content, enabling efficient content retrieval.

  3. Challenge Validator: a component that validates content modifications by verifying cryptographic message properties.

  4. ACL Validator: a multi-chain-aware service applying Access Control Layer templates onchain or offchain.

  5. Blockchain Node: an RPC layer used by validators for onchain validation, inheriting the security and reliability of EVM-based contract calls and ECDSA signature verification.

Architecture

Lens Node

Lens Storage Nodes utilize a standard kubo IPFS node within a self-hosted replica set, serving as the foundation for immutable data and metadata. The nodes operate on a private IPFS network, preventing unauthorized connections and protecting data integrity. Future plans include decentralizing the infrastructure to enable broader participation.

Storage nodes will have a caching layer that efficiently handles requests to the Lens IPFS network. By serving frequently accessed content from edge locations, this will reduce latency and network load, ensuring users enjoy fast and seamless access to their data.

Lens Link

Lens Link is a microservice with the purpose of managing mutable pointers to immutable content stored on Lens nodes.

The current implementation is a database that maps keys to an immutable content identifier on the Lens Node IPFS network.

Currently, a new iteration of Lens Link is actively being tested and benchmarked which aims to improve the performance and decentralization by utilizing a global key-value store and peer-to-peer broadcasting.

Lens Link Flow

Challenge Validator

Lens Storage Nodes allow for mutability through an Access Control Layer (ACL). By attaching an ACL template during the initial upload, files or folders can be modified by any party that meets the conditions defined in the ACL template.

In order to modify or delete any given data secured by an ACL template, it is required to complete a challenge response handshake with the API. This is done by requesting a new challenge from the API, signing a containing message with an Ethereum-based private key and sending back the signed challenge to the API which then calls multiple validators with it. The generated challenge is stored immutably on IPFS. This architecture allows secure validation of any user input against an immutable challenge entry.

Challenge Validator Flow

ACL Validator

The Challenge Validators are responsible for validating that only authorized users can make changes to their content. Once the signer address is verified, the ACL (Access Control Layer) Validators can confirm that the signer is actually allowed to perform the edit or delete action.

To validate permissions, ACL Templates are used. These templates are pre-configured settings that handle who can access or modify content without needing complex setup. For example, a user can select a "Team Content" template to allow their team members to edit certain posts, or choose a "Public Portfolio" template to make their work visible to everyone. This system simplifies the process of controlling access, allowing both non-technical users and developers to securely manage permissions effortlessly.

ACL Validator Flow

Blockchain Nodes

Blockchain nodes provide a reliable and accessible interface for managing data. In Lens Storage Nodes, blockchains are utilized to apply ACL (Access Control Layer) metadata by validators through JSONRPC method calls.

Designed for compatibility with multiple blockchain networks, the architecture is both flexible and scalable, allowing Lens to easily integrate new blockchains as needed. The ACL metadata structure is designed to integrate seamlessly with various blockchain VMs, including:

  • Ethereum
  • Solana
  • Aptos
  • Bitcoin

As market demand grows, Lens can expand its blockchain support easily, maintaining consistent functionality and meeting the growing needs of its users.

Outlook

Lens Storage Nodes will seek to address the scalability challenges of decentralized storage by adopting an S3-compatible standard. This integration will enable seamless connection with high-performance, enterprise-grade storage platforms, allowing efficient management and access to large volumes of data without the typical limitations faced by traditional decentralized systems.

A caching layer will also be implemented on top of the IPFS storage infrastructure, delivering content rapidly and reducing latency. This approach combines the robustness of cloud-based storage with the security and ownership benefits of decentralized systems, providing additionally providing users with a smooth and responsive experience comparable to centralized platforms.

A New Era of Digital Ownership

Lens Storage Nodes are a new, groundbreaking model for web3 content management, combining the scalability of centralized systems with the ownership and transparency of blockchain technology. By enabling mutable storage, smart contract governance, and seamless enterprise integration, they bridge the gap between offchain limitations and blockchain ideals.

This is the future of digital storage—one where users not only own their data but can manage it flexibly and affordably, all while staying true to the principles of decentralization. Lens Storage Nodes are more than a solution; they are the foundation for the next generation of decentralized applications and user empowerment.