A three-minute hardcore summary of the highly anticipated Filecoin staking mining mechanism

A three-minute hardcore summary of the highly anticipated Filecoin staking mining mechanism

Unlike traditional PoW miners who use computing power mining machines to "decrypt" the Hash value of random difficulty, Filecoin adopts the FIL (Filecoin network token) staking mining method, supplemented by proof of replication (PoRep) and proof of space and time (PoSt) calculations. The goal is to avoid waste of resources due to invalid calculations and give Filecoin miners more roles to improve network security and stability.

Original title: "This is how Filecoin designs the Staking mechanism..."
Author: Jianguang Temple

Not long ago, the Protocol Labs team announced that the Filecoin testnet will be launched on December 11, 2019, and the mainnet is expected to be launched in the first quarter of 2020. This major progress of the decentralized storage star project immediately caused numerous responses. As an open source storage project led by Protocol Labs, the IPFS protocol has been running smoothly for two years. Filecoin has added a token reward mechanism based on the IPFS protocol to provide a more private and stable usage scenario.

Unlike traditional PoW miners who use computing power mining machines to "decrypt" the random difficulty Hash value, Filecoin creatively adopts the FIL (Filecoin network token) staking mining method , supplemented by Proof of Replication (PoRep) and Proof of Spacetime (PoSt) calculations, which not only avoids the waste of resources caused by invalid calculations, but also gives Filecoin miners more roles, thereby improving network security and stability. This article will combine the current open source code to explore the block mechanism of the Filecoin network.

EC consensus mechanism

The Filecoin network consensus is called Expected Consensus, or EC consensus for short. There are two roles in the Filecoin network: storage miners and retrieval miners.

In the EC consensus, retrieval miners will randomly challenge storage miners within a fixed time (currently 6 days) to prove that storage miners can continue to provide retrieval services for stored data - this is Filecoin's unique proof of replication (PoRep) and proof of space-time (PoSt) algorithms. The proof itself also relies on a certain CPU performance, so completing the proof efficiently can also increase the chance of participating in block elections. The block structure of Filecoin can be seen in the Git repository address.

  • Tickets: The node will calculate the corresponding ticket value when generating each round of blocks

  • ElectionProof VRFPi: The currently calculated election parameters for the leader participating in the packaging

According to the notes and white paper, Filecoin can generate multiple blocks in each round of block packaging time, and multiple blocks form a TipSet. The structure in which TipSets are connected in sequence through the hash algorithm constitutes the blockchain structure we usually understand.

The election logic of the node packaging leader can be found in the IsElectionWinner function in https://github.com/filecoin-project/go-filecoin/blob/master/consensus/election.go:

As shown in the figure, the CompareElectionPower function generates a ticket for verification within each round of block generation time (currently set to 30s), and then compares the electionProof, the miner's effective storage and the entire network storage to determine whether the node has obtained the packaging authority for this round.

Among them, electionProof is obtained by signing the ticket generated in each round. The process of comparing vrfPi and miner computing power can be seen in the CompareElectionPower function in https://github.com/filecoin-project/go-filecoin/blob/master/consensus/election.go:

Therefore, the logic of leader election can be understood as follows: When lhs < (miner effective storage / total network storage), that is, the ticket value is less than the ratio of node effective storage to total network storage, the node becomes the leader and is eligible to package blocks. Improving the effective storage of the node can obtain a higher probability of block explosion. Referring to the white paper, it can be seen that the effective storage of miner nodes is related to multiple parameters (CPU/memory/bandwidth/hard disk capacity/FIL quantity).

Filecoin and PoW Mining

Filecoin storage miners are similar to PoW miners. As described in the white paper, once the available capacity provided by the storage node is exhausted, the effective storage of the storage node cannot be further added. As the computing power of the entire network increases, PoW miners need to provide higher computing power. EC miners need to continue to increase the available storage resources in order to continue to participate in mining and obtain network distribution benefits while keeping other performance unchanged .

Filecoin and PoS Staking

Filecoin's retrieval miners are closer to PoS's validator nodes. Staking operators in PoS do not need to purchase expensive mining machines, they only need to maintain full nodes and stake tokens to participate in mining.

Filecoin nodes pledge a certain amount of FIL to become retrieval miners, initiate random challenges to storage miners, and can also obtain system rewards.

Filecoin and mining pools

Decentralization has always been the core focus of public chains. Compared with PoW and PoS networks, the pursuit of interests by miners will also drive Filecoin to produce organizations similar to mining pools. We speculate that the mining pool design can meet the following three points:

  • How can mining pools share CPU and memory resources between mining machines to complete PoRep and PoSt proofs faster, thereby improving the efficiency of storing data?

  • Can the dynamic growth rate of storage resources provided by the mining pool increase the proportion of storage resources in the entire network?

  • Both storage miners and retrieval miners need to pledge a certain amount of FIL tokens. The retrieval miners holding tokens and the storage miners holding mining machines are matched through the mining pool platform, which is a mutually beneficial cooperation model.

Nowadays, the PoW cloud computing platform has greatly lowered the threshold for ordinary investors to participate in mining. Since Filecoin mining machines are more complex to manufacture, occupy more space, and consume more electricity, the Filecoin mining pool model is very likely to draw on this model, which is easier to implement in design than the model of connecting mining machines to mining pools.

Source link: mp.weixin.qq.com


<<:  Why do people say that Bitcoin futures have burst the Bitcoin bubble?

>>:  As Bitcoin prices continue to fall, will mining machines shut down?

Recommend

A diagram of a woman with a mole on her nose

The root of the mountain should not be broken, su...

What about a woman with a mole on the right corner of her mouth?

Everyone is familiar with moles, which can be fou...

How is The Sandbox land valued? What drives land prices?

Since Meta announced its entry into the Metaverse...

How to look at a man's career line? Which is a man's career line?

Everyone's palm lines are different, and the ...

Which moles represent good fortune?

Financial luck has always been a topic of concern...

What does the three-forked love line on a woman's right hand mean?

What does it mean when a woman’s right heart line...