Verifying Storage on Filecoin | Preparing and Transferring Data

Verifying Storage on Filecoin | Preparing and Transferring Data

On the Filecoin network, anyone in the world can provide storage space. But to maintain trust on a decentralized network like Filecoin, you need a way to establish trust on the global network itself.

Filecoin’s proof system does this by building trust into the protocol layer of the Filecoin blockchain. The Filecoin protocol utilizes proof of storage as the core mechanism for achieving consensus in the Filecoin blockchain.

In the previous article, we talked about incentivized and decentralized storage, and discussed centralized and decentralized storage, incentivized storage, and cryptographic proofs. Next, we will explain: how to verify storage transactions.

Preparing data for storage

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 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-padded to make a Filecoin Piece. (Bit-padding adds extra bits to make the piece fit the standard size.) The piece has a unique piece CID, also known as a CommP (piece 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.

Negotiate storage deals and transfer data

When clients negotiate a storage deal with a miner, they hire them to store a block of data, which could be a whole or partial file. Miners store the pieces from one or more clients in sectors, the basic unit of storage used by Filecoin. Sectors vary in size, and clients can store up to a certain size of data per deal. (Learn more about sector sizes and storing large files.)

The CID piece 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. Once the miner confirms, the client will transfer their data to the miner. Once the miner has the data and verifies that it matches the CID noted in the transaction proposal, they publish the transaction proposal on Filecoin's blockchain and commit both parties to the transaction.

——End——


<<:  [100 Questions and Answers about Filecoin in Pictures] Question 36: What is the Filecoin network benchmark?

>>:  Rationally analyzing the cooperation between Google and EOS, there are still many things you don’t know

Recommend

Can the purple-red Bitcoin really turn “green”?

Original title: Bitcoin is red. Can it be green? ...

Mole position and destiny - what does a mole on the foot mean

People with moles on their feet generally do not ...

How to read women's faces, what are the palm lines of happy women

A happy woman can be seen from her hands. If you w...

What does a person with scoop ears look like?

If a person has protruding ears, it is usually no...

What kind of man has wealth?

Everyone wants to gain more wealth, and everyone ...

Japanese cryptocurrency exchange loses $305 million in hacker attack

This is the third major cryptocurrency exchange h...

Where does a man's mole grow to bring him better luck in life?

Family fortune is actually closely related to a p...

What does the intersection of the love line and the wisdom line mean?

The love line is one of the three main lines on o...

What kind of people are suitable for dating?

When we judge whether a person is suitable for da...

The five most difficult faces to save money

Ordinary working class people budget carefully ev...

What does it mean when the nose is thick? Will the relationship be smooth?

Interesting things happen at every stage of life,...