IPFS/FIL officially launches Filecoin tutorial | Lesson 2 Preparation and Data Transfer

IPFS/FIL officially launches Filecoin tutorial | Lesson 2 Preparation and Data Transfer

On July 6, 2020, Filecoin officially launched the Filecoin tutorial to verify the storage on Filecoin.

It provides a beginner-friendly, code-free experience with Filecoin’s proof system and explores how Proof of Replication (PoRep), Proof of Storage (PoSt), and zkSNARKs make it possible to trust each other in an incentivized distributed storage system.

Next, we start learning the second lesson.

Verifying Storage on Filecoin | Lesson 2 of 6 Preparing and Transferring Data

1. Prepare the data to be stored

Before a system file (such as puppy.gif) can be stored on the Filecoin network, it must first be converted into a Filecoin Piece.

In the first phase of this conversion, the system files are chunked together with UnixFS to create an IPLD DAG (directed acyclic graph) . You can learn more about DAGs (a form of merkle tree) in our decentralized data structures tutorial. The payload CID (content identifier) ​​of this IPLD DAG is the same as the IPFS CID and represents the root of the DAG.

The IPLD DAG is then serialized into a CAR file and bit-filled to make a Filecoin Piece. The work has a unique work CID (content identifier), also known as CommP (work commitment).

Since the payload CID and fragment CID are cryptographic hashes of the data itself, they are unique and having the same CID guarantees that the content is identical. The same IPLD DAG will produce the same payload CID, and the same fragment will produce the same fragment CID, no matter who stores or retrieves them.

2. Negotiate storage transactions and transfer data

When clients negotiate storage deals with miners, they hire them to store blocks of data, which could be a whole or partial file. Miners store these pieces from one or more clients in sectors, the basic unit of storage used by Filecoin. Sectors vary in size, and clients can store a maximum size of data per transaction.

A CID (Content Identifier) ​​is packaged with other transaction parameters to create a transaction proposal. The transaction CID contains information about the data itself, in the form of a block CID, the identity of the miner and client, and other important transaction details.

The client sends this transaction proposal to the miner who agrees to store their data. After the miner confirms it, the client will transfer its data to the miner. Once the miner has the data and verifies that it matches the CID recorded in the transaction proposal, they publish the transaction proposal on Filecoin's blockchain and commit both parties to the transaction.

<<:  "How can ordinary miners safely hoard coins without being treated as leeks" - Do you have the fastest and most stable app for hoarding coins?

>>:  2020 IPFS Ecosystem and Distributed Storage Industry Summit was a complete success, gathering momentum to create an innovative future

Recommend

Second! General Motors is considering Bitcoin as a payment method

After Tesla launched the vision of buying cars wi...

Latest development: FCoin has been criminally investigated in Hunan

According to news from Bixin, FCoin was filed a cr...

What kind of woman looks divorced?

Everyone hopes to have a happy marriage, but some...

What kind of woman has a happy marriage?

Of course, we all hope that our marriage will be ...

Face analysis: Which industry is more suitable for you based on your face

Face analysis: Which industry is more suitable fo...

What kind of woman can be happy even if she marries late?

Many people think that the time of getting marrie...

What is the fate of a person with a bag on the forehead?

In fact, we can tell a lot from the forehead. And...

Are people with moles on their eyebrows more utilitarian?

The quality of a mole depends on its location and ...

Men with thin upper lip and thick lower lip

Men with thin upper lip and thick lower lip 1. Li...