What is IPFS?
IPFS (InterPlanetary File System, "interplanetary file system") is an open source hypermedia communication protocol with which peer nodes store and distribute data in a single distributed file system.
The author of the solution, Juan Benet , founder and head of Protocol Labs, an American startup , called it the “Distributed, Permanent Web”, meaning that the site created in IPFS can never be closed by anyone.
“In a way, IPFS is like the Internet, but IPFS can be thought of as a single swarm of BitTorrent sharing objects in a single Git repository. In other words, IPFS represents a high-performance block storage model with content-addressable hyperlinks , ”he explained in the whitepaper of the project.
How does IPFS work?
When loading information into IPFS, the address for accessing an object, file or user data in the system is formed not binding to the server, but to its unique cryptographic hash identifier (Content Identifier, CID).
When the file is reloaded, the CID does not change, and new hash identifiers are assigned to updated versions of the file. In order for users who have access to an earlier version of the file to have later versions, the InterPlanetary Naming System (IPNS) name service is used - an analogue of DNS on the traditional Internet.
Files larger than 256 Kb in the system are divided into parts, hashed and organized into IPLD objects (InterPlanetary Linked Data), consisting of two components: the data itself and links to parts of the file, interconnected through the use of a directed acyclic graph of the Merkle tree (Merkle DAG )
Then, the software responsible for communication in the system, the IPFS daemon (IPFS daemon), temporarily caches the data or, at the user's choice, “pins” it to itself on an ongoing basis and distributes it to other nodes upon request. In the future, such nodes can serve as content providers or remain its recipients.
After requesting the content in the distributed hash table (Distributed Hash Table, DHT) of the system, the nodes closest to the user are searched with a copy of the data to be searched - and they are the ones that give the parts of the file.
Example hyperlink in IPFS:
How to use IPFS?
The IPFS protocol and implementation is still under development and may contain bugs and hidden vulnerabilities. However, it is suggested that IPFS can be convenient for storing important information and creating static sites. In practice, its use increases the data transfer rate and network bandwidth, reduces the load on the nodes due to its distribution, allows you to bypass censorship, avoid DDoS attacks and the appearance of "dead" links. There is no point of failure in the system, and the nodes do not need to trust each other. In addition, in theory, IPFS content can be stored forever.
The first web resource with IPFS support in 2015 was the Neocities hosting service. Based on IPFS, the decentralized video platform DTube, the online trading platform OpenBazaar, and other solutions have been created.
The IPFS link added to the cryptocurrency transaction allows you to save huge arrays of data protected from changes in the blockchain without burdening it. For example, in the spring of this year, after the arrest of Julian Assange, one of the developers of Bitcoin Cash posted a full archive of Wikileaks documents, about 30 GB, as a link on the BCH blockchain on the Wikileaks.cash website in IPFS.
Since 2014, the Protocol Labs development team has also been working to create a decentralized IPFS-based Filecoin file hosting. The project is preparing to launch a test and main network, however, back in 2018, Juan Benet discovered that his company's achievements inspired the creators of TRON: several sheets from the Filecoin and IPFS documentation in a slightly modified form were included in the whitepaper of this Chinese project. And in the spring of 2019, TRON announced its intention to launch its own version of IPFS based on BitTorrent - BTFS.