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

Is the man with both hands connected good luck?

Is it good for a man to have two broken palms? Wh...

Justin Sun has not changed, but the world has changed

From criticizing "competitors named Bo"...

Bitcoin breaks new high, will the US dollar be driven out?

Translation: Com|DaLing Think Tank Original link:...

Where is the career line for women?

In palmistry , the same lines on the palms of men...

Are bigger apple cheeks better for men?

Are bigger apple cheeks better for men? The apple...

A woman with a sharp tongue and a soft heart

A woman with a sharp tongue and a soft heart In r...

How to judge the appearance of a scumbag from his face

The scumbag is what women are most afraid of meet...

How to stay forward-looking in crypto investing?

During the online discussion last Saturday, an au...

What does a curved career line mean?

There are countless lines in the palm of the hand...

MIT and Ripple collaborate to test four-node blockchain

MIT and technology startup Ripple are collaborati...

What does wrinkles on a man's forehead mean?

1. Men's forehead lines In physiognomy, there...

Analysis of the facial features, personality and fortune of women with thick lips

As one of the traditional physiognomy techniques, ...

Moles reveal what setbacks you will encounter in life

We will encounter many setbacks in our lives. Som...