Why can’t Filecoin storage users pay directly to miners?

Loading

The Filecoin network is a decentralized network, that is to say, there is no sovereign overseeing the entire system, and the system is completely maintained by consensus and algorithmic operation;

Filecoin storage miners need to endorse themselves. The method of endorsement is to mortgage FIL into the network, as a guarantee of their own promises, and agree that the mortgage will be confiscated when their promises cannot be fulfilled ;

The mining of Filecoin miners is based on the successful provision of storage services. Therefore, mining and the provision of services are complementary;

The Filecoin network provides a transparent storage market in which miners and users can trade freely.

Filecoin存储用户为什么不能直接付款给矿工?

In the Filecoin market, miners are the main role. When miners want to provide storage services, they need to do the following things:

1) Storage miners register on the network (execute the instructions to create miners on the Filecoin node). At this time, the role of the corresponding miner will be added to the Filecoin chain.

2) The storage miner promises the available storage space and pledges it, which is called Pledge Collateral.

3) Store the miner’s pending order, declare the price stored by the unit, and declare how long the price is valid.

4) After that, the storage user can ask the network which miners are currently providing services.

5) After comparison, a miner is selected and a transaction request is made.

6) The storage miner receives the transaction application, responds and concludes the transaction.

Although there is only one instruction to complete the transaction, it involves many details. Generally include the following aspects:

Query the blockchain to see if the miners and their pending orders involved in the instruction are valid; if valid, continue, if invalid, return an error;

Connect to the node where the miner is located. If you cannot connect, an error will be returned, you can connect and continue;

Wait for the miner to return and agree to the storage application

Transfer files to be stored to miners;

Create a payment channel, and the customer pays the payment channel (note that it is not directly paid to the miner);

After receiving the data, the miner starts to seal;

The miner is packaged and the verification data is kept intact;

Within the range required for storage transactions, miners continue to prove that the storage is intact and receive rewards from the payment channel.

Filecoin存储用户为什么不能直接付款给矿工?

Why do Filecoin storage customers pay payment channels instead of miners? Then, what is the payment channel?

The payment channel is a very critical role in this network. Note that it is a role. Of course, miners are also a role in the network. We can think of the payment channel as a person. In fact, it is a smart contract. When a customer applies for a transaction, the smart contract is automatically established and executed afterwards.

In other words, the customer’s fee is paid to the smart contract, and the smart contract will only pay to the miner if the miner can successfully prove that he continues to retain the data. All storage charges for miners are not directly from users, but from payment channels.

Filecoin implements payment channels directly on the chain. Of course, the easiest way is to create a payment channel for the storage of a file, that is, to run a smart contract. This seems simple and easy to implement. However, when the Filecoin network becomes larger, the payment channels on the blockchain will become too many. Repeated execution will result in a large transaction volume, which will reduce the transaction rate of the entire network. There is congestion. This is no stranger to blockchain, and Filecoin seems inevitable.

Is there a better way? Of course, since the payment channel is realized, why not realize the off-chain transaction. Many small transactions can be carried out completely off-chain, signed by both parties, and reach a certain amount on the chain.

Another way, a user may trust a few specific miners, then their transactions will be many , the system can provide a way to merge payment channels to achieve a unified one-time transaction of multiple channels, which will greatly reduce the amount of transaction information And actual transaction volume.