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

What does a broken career line mean in palmistry?

Each of us has many lines on our hands, and these...

Analysis of the facial features of people with sword-shaped eyebrows

1. Career fortune analysis In physiognomy, people...

Our Network creator: 10 reasons why Ethereum can break through $10,000

This has been a roller coaster year for Ethereum,...

How to tell a person's life span by face analysis

We all hope that we can live long, to see our chi...

Australian Craig Wright: I am Satoshi Nakamoto

The British Broadcasting Corporation BBC reported...

Facial features of people who like to sleep in

Generally speaking, laziness is indeed a specialt...

Palmistry: Who are the people worth dating?

Palmistry: palmistry tells you who is worth datin...

Former Barclays CEO joins Bitcoin firm Blockchain board

According to foreign media reports, Antony Jenkin...

What does a retracted chin mean?

In physiognomy, the chin is related to a person&#...

Facial features that indicate longevity

From the perspective of physiognomy, what kind of...

Can ETH and ETC coexist for a long time?

How big is the Ethereum market? Judging from its ...

Palmistry marriage line forked at the end

Palmistry marriage line forked at the end Marriag...

Hongluan enters the life palace_face analysis

Hongluan is a lucky star that represents marriage...