[blockchain] understanding IPFs



IPFs project introduction

IPFs introduction: IPFs (inter planar file system) is a global, point-to-point distributed version of the file system, the goal is to supplement (or even replace) the current rule of the Internet Hypertext Transfer Protocol (HTTP), all with the same file system computing devices connected together. The principle uses content-based address instead of domain name based address, that is, the user is not looking for an address but the content stored in a certain place. It does not need to verify the identity of the sender, but only needs to verify the hash of the content. In this way, the web page can be faster, more secure, more robust and more durable.

What is IPFs

The interplanetary file system (IPFs) is a point-to-point distributed file system. Most Internet users may be unfamiliar with it, but just like Hypertext Transfer Protocol (HTTP), which has been used by many people for more than ten years, they need to input every time they open a web page, and they don’t know what it is.

IPFs is also a kind of underlying protocol. Through the underlying protocol, the files stored in the IPFs system can be quickly extracted anywhere in the world, which is not affected by the firewall, so that users can access the data faster, more secure, and more open.

[blockchain] understanding IPFs

The rapid development of the Internet is based on the HTTP protocol. The design purpose of Hypertext Transfer Protocol (HTTP) is to ensure the communication between the client machine and the server. For example, the browser of the client submits the HTTP request to the server, and then the server returns the response to the client. This is a way that has been used since the birth of the Internet. However, with the change of the Internet user level, as well as more and more prominent network security issues, the development of the Internet today, HTTP also began to gradually expose the shortcomings.

HTTP as a underlying protocol is not very secure, it is a clear text transmission protocol, but it can not encrypt data. Most ordinary Internet users do not have enough ability to protect their browsing behavior. Therefore, when the browser user and the website are HTTP linked, the data transmitted between them is easy to be peeped, stolen or even tampered.

IPFs uses the content to find the address, and the content is used as the unique representation to access. It will check whether the ID has been stored in advance. If it has been stored before, it will read directly from other nodes, so that there is no need to store repeatedly, and the problem of waste of storage space is solved.

The characteristics of IPFs in the application level make it a perfect combination with the current blockchain. The essence of blockchain is distributed ledger. The storage capacity of traditional ledger can provide distributed cache solution for traditional applications to a certain extent.

Background and application of IPFs

HTTP hypertext transfer protocol has played an irreplaceable role in the development of the Internet industry since it was founded in 1999. However, under the Internet operation mechanism of centralized storage, the defects such as high operation cost, low efficiency, poor security and easy data loss are unavoidable and being solved.

In order to change the disadvantages of the Internet, Juan Bennett, who graduated from Stanford University, founded the protocol laboratory in 2015 and released IPFs (interstellar file system). The goal is to replace HTTP and become the next generation of Internet underlying communication protocol.

IPFs (inter planar file system) is a kind of hypermedia transmission protocol based on content addressing, versioning and peer-to-peer. It integrates P2P network technology, BitTorrent transmission technology, GIT version control, self certified file system and other technologies. It is a new generation of communication protocol benchmarked with HTTP.

IPFs has fundamentally changed the way users search. We know that when searching for files through HTTP browser, we first find the server location, and then use the path name to search for files on the server. However, through the protocol IPFs, users can directly search for content. How is this achieved?

First, the one and only one hash value in the IPFS network is given. This hash value is similar to our ID number. It is unique. It is calculated from the file content.

Then, when the user asks the IPFs distributed network for hash, it can quickly find the node that owns the data by using a distributed hash table, so as to retrieve the data. In short, we used to find a file by jumping to a multi-layer website, but we only need to query the hash value of the file stored on IPFs to find it quickly.

For some large files, IPFs will automatically cut them into small pieces, so that IPFs nodes can not only download files from one server like HTTP, but also download files synchronously from hundreds of servers. Therefore, as long as the stored node is powered on and the network is normal, the access speed can be very fast.

What is the difference between IPFs and blockchain?

The differences between IPFs and blockchain mainly include:

1. Blockchain is a technology to record transaction data and maintain history in blocks. IPFs is designed to replace http. It is a protocol and network, designed as a point-to-point method for sharing and storing media.

2. Blockchain technology is not suitable for storing large amounts of data. IPFs is used by blockchain applications that need publicly accessible databases. IPFs stores a large amount of data on different nodes. It uses the token economy of blockchain (its incentive layer, filecoin) to keep these nodes online.

3. After data is entered on the blockchain; it cannot be updated or deleted, creating a new block using the link to the previous block hash function. In IPFs, network data can be deleted only when another node chooses not to re host. At the same time, IPFs supports version control.

4. Blockchain stores data in blocks with data, hash functions and previous hashes. The file is stored in the IPFs object. These objects can store up to 256 KB of data, and can also be linked to other IPFs object files stored in IPFs objects. These objects can store up to 256 KB of data and can be linked to other IPFs objects.

These features make IPFs an ideal place for distributed data storage, which can use blockchain technology for reference and timestamp.

[blockchain] understanding IPFs

IPFs is not a blockchain project, but its incentive layer filecoin is a real blockchain project.

Filecoin is an incentive layer running on IPFs. It is a distributed storage network based on blockchain. It turns cloud storage into an algorithm market, where the token (FIL) plays a very important role. Token is an intermediary bridge between resource (storage and retrieval) users (IPFs users) and resource providers (filecoin miners). Filecoin protocol has two trading markets – data retrieval and data storage, in which both parties submit their own needs and conclude transactions. IPFs and filecoin promote each other and grow together, solving the problems of data storage and data distribution on the Internet. Especially for countless blockchain projects, IPFs and filecoin will exist as an infrastructure. This is why we see that more and more blockchain projects adopt IPFs as a storage solution, because it provides a cheaper, secure and fast integrated storage solution.

What changes does IPFs bring to blockchain?

The birth of blockchain is to achieve decentralization, reach a consensus without a central organization, and jointly maintain an account book. Its design motivation is not for efficiency, low energy consumption, or scalability (if the pursuit of efficiency, low energy consumption and scalability, centralized program may be a better choice).

The collaborative work of IPFs and blockchain can supplement the two major defects of blockchain: one is the low storage efficiency and high cost of blockchain; the other is the cross chain needs the cooperation between various chains, which is difficult to coordinate.

IPFs ecology

Application layer DAPP

[blockchain] understanding IPFs

DAPP schematic diagram with IPFs Technology

DAPP example

(1) Openbazaar is an open source open market (C2C). It has no central server and relies on the automatic maintenance of distributed nodes. BTC is used for transaction payment and both parties are anonymous. The website does not have a domain name. Instead, it uses onename similar to blockchain technology.

In version 1.0, openbazaar was known as the “black market”. At that time, IPFs was not applied, and zeromq was used to realize P2P transactions. The transaction fees were given to users as dividends. At the same time, bitcoin was used as a payment channel to make a sensation, and the number of users increased rapidly in a short time.

After the release of version 2.0, a layer of review mechanism has been added. At the same time, it supports BCH and other digital currencies other than bitcoin, and integrates and reconstructs IPFs to replace zeromq.

Now, many stores in the market can be run on the host even if there is no user online. In the past, you had to log in at the same time before you could trade. Now using IPFs is equivalent to realizing offline stores. This means that the more people visit your store, the more store data is copied, which is conducive to high-quality store publicity and promotion. This is also a return of value in a certain sense.

(2) Peerpad is a collaborative real-time editor, it does not use a third party, all the participating nodes talk directly, and does not need a central server. At the same time, peerpad is open source, showing how developers can use IPFs to build their own server free, real-time, offline priority, multi person collaborative distributed applications, which are built by protocol lab and IPFs community. Four functions can be realized

1. Meeting notes

Whether it’s plain text, markdown or rich text, you can share meeting minutes with colleagues in real time.

2. Collaborate or share code snippets

Peerpad has a built-in code editor that can be used to collaborate with colleagues when editing the same file.

3. Write and share

You can publish a snapshot of pad to IPFs to make it available on the Internet. Choose who to share by sharing the read key of the decrypted content.

4. Working with multiple users at the same time

Peerpad can modify documents with many users at the same time to deal with each other’s changes in real time.

At present, the application layer of IPFs is mostly the blockchain version of the outstanding products of the current Internet business, including audio and video entertainment services, e-commerce, etc. However, combined with the characteristics of IPFs and the pain points of the centralized society, in the future, all businesses involving the basic demands of “large amount of data”, “bandwidth pressure”, “data security” and “file version” will move closer to decentralization or even IPFs, and in the future, the application layer of IPFs will be more competitive Here’s a peek ahead.

Network incentive layer — filecoin

At present, there are many projects to explore the application of IPFs incentive layer at home and abroad. The most concerned one is the protocol lab’s self built filecoin, which aims to improve the global application scope of IPFs protocol. This popularization process takes several years or even decades. Filecoin itself has formed an application ecology, including storage network and economic system , technical architecture, etc.

The relationship between IPFs and filecoin

IPFs is a network transfer protocol for creating persistent and distributed storage and sharing files. It is a content addressable peer-to-peer hypermedia distribution protocol.

The data of app, website and circle of friends are stored in a centralized server cluster, and then accessed by locating resources through URL, URI and domain name system. IPFs is not based on such domain name addressing, but content addressing. It calculates a hash value from the content of a resource, which directly reflects the content of the resource. An IPFs client stores a large file resource to the IPFs network. When the resource is large, IPFs splits the resource file, calculates the hash, and uses Merkle DAG (GIT data format) organizes the resource file. Each partition may have one or more nodes, and it may be multiple copies to ensure that when some nodes fail, other nodes can get the file partition.

Filecoin is a decentralized storage network, also known as the blockchain of filecoin. The token name of filecoin is fil. Filecoin and IPFs are two projects, and IPFs is the underlying protocol. Miners in filecoin blockchain can obtain fil by providing storage for customers. Instead, customers can use the fil to hire miners to store or distribute data.

Filecoin is another project for ICO based on IPFs. In essence, filecoin is the right project for ICO IPFs is an incentive layer of IPFs network. IPFs can be understood as a BT software. For many years, the unsolved problem of BT software is how to motivate resource contributors, how to motivate participants to provide better disks, better network, and provide users with better experience and stable quality.

Filecoin decentralized storage network (DSN). In this network, we are going to build two markets, namely “storage market” and “retrieval market”, in order to reward the storage miners to provide better quality storage services. At the same time, we are going to encourage the miners with better network or better response performance to obtain rewards in the retrieval market.

This article is based on ipfsmain