InterPlanetary File System (IPFS)

Expercoin Republics
Expercoin
Published in
3 min readAug 1, 2018

Expercoin’s IPFS System

IPFS is a protocol and network designed to create a content-addressable, peer-to-peer method of storing and sharing hypermedia in a distributed file system. Using IPFS to store non-critical information, instead of storing it on the chain, is far more economical and scalable from a storage perspective. When a data object is created within a Pillar or a third-party DApp — for example, a course with corresponding videos; an assessment with questions and answers; or a project with price and details of its deliverables — it is stored on the IPFS. This data object is referenced using a unique IPFS content hash, which is then stored on the Ethereum blockchain.

A cryptographic keypair that allows an IPFS node to cryptographically sign the content and messages.

When we add contents of a file to IPFS a hash is created as follows:

QmZtmD2qt… is the content’s cryptographic hash returned by IPFS. If the file’s content changes, the hash will also change, but if the file’s content remains the same, the hash will always be the same.

Now, if we change the contents of mytextfile.txt in this example, the hash pointing to it also changes:

If you have two different files containing identical content, IPFS will track that content with one hash. The filenames may be different, but because the content is the same, the hash of the content will be identical.

IPFS provides a high-throughput, content-addressed block storage model, with content-addressed hyperlinks. This forms a generalized Merkle directed acyclic graph (DAG), where each node is accessed via its name. Each branch of Merkle is the hash of its local contents, naming children by their hash instead of their full contents. Therefore, after creation there is no way to edit a node. This prevents cycles (assuming there are no hash collisions), since one cannot link the first created node to the last node to create the last reference. In general, for any Merkle to create a new branch or verify an existing branch, a hash algorithm is used on some combination of the local contents, such as a list of child hashes and other bytes.

IPFS combines a distributed hash table, an incentivized block exchange, and a self-certifying namespace. IPFS has no single point of failure, and nodes do not need to trust each other, except for every node they are connected to. Distributed Content Delivery saves bandwidth and prevents DDoS attacks, which HTTP struggles with. The filesystem can be accessed in a variety of ways, including via FUSE and over HTTP. Files are distributed using a BitTorrent-based protocol. Other users viewing the content also aid in serving the content to others on the network.

--

--

Expercoin Republics
Expercoin

Protocol to launch AI-powered network of marketplaces on the Ethereum blockchain in partnership with Experfy in Harvard Innovation Lab.