Original title: "This is how Filecoin designs the Staking mechanism..." 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 mechanismThe 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.
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 MiningFilecoin 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 StakingFilecoin'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 poolsDecentralization 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:
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?
The Czech National Bank (Czech Central Bank) has ...
In addition to one's own eight-character fort...
Editor's note: On December 31, 2016, the Guiy...
The root of the mountain should not be broken, su...
According to Bitpush data, there are only four da...
Everyone is familiar with moles, which can be fou...
Since Meta announced its entry into the Metaverse...
During the Asian session on Monday, many digital ...
Everyone's palm lines are different, and the ...
If the blockchain industry were written into a st...
Financial luck has always been a topic of concern...
What does it mean when a woman’s right heart line...
Can ETFs, the Fed’s rate cuts, and the election h...
Palmistry and face reading are the most common me...