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

How UBS will change the business model of the world's largest bank

Rage Commentary : According to news reports, UBS ...

What is the appearance of a woman with a small nose?

Some people have small noses, some have big noses...

How to tell if someone is smart by palmistry

From a person's palm, we can see a person'...

How to tell if a man is unmarriable? What kind of man is unmarriable?

In fact, many people know the importance of facia...

Palmistry for a Happy Marriage Palmistry for a Happy Marriage

Marriage is one of the most important things in o...

It is easier to develop a face when working in other places

Some people have been working locally for many ye...

What does a mole on a girl's chest mean?

Moles can be found all over the body, and a woman...

Is your marriage happy?

Is your marriage happy? People with clear and str...

Bitcoin News of the Week: Mt Gox and Dark Web Markets

Despite some high-profile developments in the Bit...

Is it good for a man to have a peach blossom face?

Is it good for a man to have a peach blossom face...