IPFS on Calculus — Optimal Economy & Ecology, Verified Immutability

Calculus_io
calcu_io
Published in
5 min readJun 11, 2021

Interplanetary File System, a.k.a IPFS — the paradigm shift to data storage, access, and retrieval. No matter how much it sounds like a derivative from the intergalactic planet of Star Wars, IPFS is very much real, with an extensive suite of real-world use cases.

Calculus as a decentralized data storage network employs IPFS as one of the core technologies besides Distributed Hash Table (DHT), TEE and more. Thus, IPFS forms an essential block for the Calculus ecosystem, which is why our community must understand its intrinsic mechanism and what it has to offer.

The Data Crisis

Let’s look at a few statistics before we deliberate further –

  • The amount of data gathered by humanity was roughly estimated to be 44 Zettabytes in 2020.
  • Based on how quickly we generate and hoard data, it is estimated that by 2025, 463 Exabytes of data will be generated every day globally.
  • By 2040, humanity would have already gathered three septillion data bits on the Earth.

With more data comes more congestion, lack of scalability, and need for more hardware and computing power. If you are not horrified yet, let’s look at something else that makes things even more complicated –

The Threat of Centralization

Data crisis and congestion is just one overtone of the impending plight. Centralization seems to be the immediate hitch! Your data is simply not your own; it is owned and controlled by the provider that is currently hosting it for you. Not to mention that if this single provider goes down, all of us and our stored information go down with them.

The system is failing us in one too many ways!

The Internet’s Structure is “Ancient”

HyperText Transfer Protocol or HTTP is the technological infrastructure that is currently driving the internet. HTTP was fundamentally designed to maintain the communication between Web browsers and servers. It incorporates a model called Client-to-Server. This simply means that a client establishes a connection to further a request and waits for a response back.

HTTP uses a location identifier, which might have been useful a few years ago, for computers to host a file and interact with it. But this implementation fails in offline cases or in a large, distributed condition, where minimizing the load across the network is the immediate need. This also means that if a specific server shuts down, your content becomes inaccessible.

1996 — that was the year when HTTP was completely adopted as the primary technological layer for the web. It has been 25 years since, which means in the world of technology, HTTP is primitive, it’s archaic.

Why settle for redundancy, congestion, censorship when you have a better, more efficient, and failure-proof technology — IPFS, the new web layer!

What is IPFS?

IPFS is a Peer-to-Peer versioned file system that holds the ability to store and track the software alterations over time. Introduced in 2014, IPFS has become the cornerstone for a distributed and perpetual web.

In the near future, IPFS shall connect all computing devices with a universal system of files, which aligns perfectly well with the original vision of the web. By adopting IPFS as a fundamental technology on the Calculus network, we will restructure the broken internet of today, thus complementing or even replacing the redundant HTTP.

IPFS holds a few key characteristics-

  • Complete Distribution of the Web — decentralization; content is retrieved from multiple peers’ networks and not servers.
  • Eliminates a single-center, absolutely no origin point
  • Websites can run on the servers of Clients
  • Websites do not depend on a single server
  • High immutability — storing humanity’s information in a failure-proof environment
  • Prevents duplication of data — each piece of content creates a hash that needs to be stored only once.

In our previous article, we left a tiny rant about the inefficiencies in addressing content via location. We also talked about a breakthrough called — addressing content with the content itself- Content Identifiers or CIDs. Calculus implements that via the IPFS technology. Hop on to this quick read to know how 👉Here

IPFS on Calculus

Blockchain forms the most intrinsic layer of the Calculus consensus network. Moreover, IPFS and blockchain share a very similar structure, which means we are able to implement IPFS on Calculus with many synergies. In fact, this synergy between blockchain technology and IPFS, as said by Juan Benet (the founder of IPFS) is a — “great marriage.”

When a user needs to store a file in the Calculus network, the cost is paid to the network based on the system pricing formula and the storage order is broadcasted to the entire network. The order submits the basic information of the file to the blockchain, including the Hash value of the file, the file size, the number of super nodes that can be rewarded, and so on. After receiving the broadcast order information, the super node in the network can search the corresponding file in the IPFS network, download it and save it in the node server of the super node.

When a supernode submits the storage certificate of the saved file to the blockchain, the storage order of this user becomes effective. To ensure that a super node can search for files that users need to store, users need to upload files locally. IPFS will also play a significant role in Calculus’s Native NFT certification, allowing participants on the network to convert authentic data into NFT data and commercialize.

The Future of IPFS on Calculus

For IPFS to run successfully in a blockchain database, it would require tag data represented between on-chain and/or off-chain. The on-chain data is crucial for super nodes, validator nodes, and common nodes to be retained locally for mining. The on-chain shares a direct association with transactions on the network. On the other hand, the off-chain data is added by the users and does not require any influence from the nodes.

Moreover, one of the most profound obstacles preventing the mass adoption of IPFS is the need to keep files available for the users at all times. Since files are retrieved and stored by a network of nodes, if all nodes which hold the files and its copies were to go offline, the file shall become effectively unavailable for the users on the network. To effectively prevent such a scenario from ever arising and propel the maturation of IPFS, Calculus provides incentives to nodes that store and retrieve data on the network.

Moreover, Calculus’s module has a penalty mechanism for validator nodes. At the end of each cycle, the network will check for and identify/detect the validator nodes. When it is detected that the validator nodes are offline or have maliciously attacked the network, the penalty mechanism will be triggered, and the penalty amount will be calculated. Penalties include the proportional deduction of Staked CAL token and the removal of node identity. Our original proof mechanism — called the POSS consensus algorithm, shall maintain the efficiency and integrity of IPFS on the network.

Calculus provides such a setting for IPFS to flourish and potentially aid in reforming the dilapidated Web.

--

--