Viewing blockchain consensus from the perspective of blockchain application
secondary title
The following is the full review of this AMA
What is blockchain consensus?
The consensus mechanism is the soul of the blockchain. Just like the laws of a country, it maintains the normal operation of the blockchain world. The earliest consensus of the blockchain is Proof of Work (POW), which is adopted by both Bitcoin and Ethereum.
A popular trend right now is Proof of Stake (POS). Ethereum 2.0 will adopt the POS consensus, as well as the latest public chains such as Tezos, Polkadot, Algorand and so on.
Proof of Stake also includes Delegated Proof of Stake (DPOS), which means that the public chain has EOS. FileStorm is currently adopting the DPOS consensus, and the alliance chain also has PBFT, RBFT and other consensus. Consensus is the soul of blockchain and the foundation of blockchain value.
secondary title
https://www.jianshu.com/p/2f29f3909b11
Why is consensus needed?
Technically, because the blockchain is decentralized. All participating nodes need to have a consensus in order to maintain a unique chain. The way to choose the only chain is a rule, which can be obtained through competition or voting.
This rule is consensus. Therefore, it can also be said that the purpose of blockchain consensus is to determine the right to generate blocks.
The basic idea of proof of work is to use computing power to determine the right to produce blocks. If you can be the first to solve the computational puzzle of POW, you can produce a block.
At each point in time, everyone is calculating the problem, and then at about the same time, everyone calculates the problem and publishes the calculation result. This is actually a voting process. The blocks that are published are the votes cast. The final selected vote comes from the mining machine that calculates the result the fastest. As for the nodes that do not publish blocks, it is equivalent to abstaining.
One of the biggest advantages of proof-of-work is that the votes cast and the voting rights are bound. And once the vote is successful, even the voter himself cannot modify the content of the vote. Because generally before the block is produced, the node has already packaged a block, and then does the proof of work for this block, and casts it out immediately after completion. At this time, there is no way to modify the packaged block. Therefore, the security of workload proof is very guaranteed.
The disadvantage is that the delay is relatively high, because after we pack the transaction into a block, we need to complete a proof of work before this block can be called a candidate block. The time for proof of work cannot be set particularly short, otherwise it is easy to fork.
Therefore, at least during the period from when the block is packaged to when the proof of work of the block is completed, the transaction can be confirmed.
Another point of criticism of the POW mechanism is that it consumes a lot of energy and is not environmentally friendly. Because the hash operation consumes power. Therefore, in order for the blockchain to support large-scale commercial use, POW needs to be changed. So, there is POS.
Unlike POW, which does not know how many mining machines are involved in mining, the POS protocol must know the number of all consensus participants and their currency holdings, and then allocate packaging rights and voting rights.
Therefore, the consensus of POS is based on how much everyone invests in a chain economically. In POW, packaging rights and voting rights are together, but in POS, the two can be separated.
Who has voting rights is known before there is a block. After getting the right to vote, I can vote at will, which means that I can choose a larger strategy space, and the whole game will become more complicated.
In general, a large policy space is bad for security because it leaves more room for an attacker to operate. This is a challenge to the security of the chain, because nodes can do evil by voting more than one vote, or abstaining from voting.
But in the POS system, the nodes have pledged, and if it is detected that some participants have violated the POS consensus agreement, they can be punished. Delegated Proof of Stake DPOS is a variant of POS.
Because in the decentralized mechanism, we need to elect who is responsible for packaging and who is responsible for voting. Sometimes for the sake of efficiency, everyone will first elect a relatively small committee, and then they will be responsible for voting. Such committees are usually chosen randomly and rotated frequently for fairness.
Or you can use the DPOS mechanism of Proxy Proof of Stake to select a relatively fixed committee to be responsible for packaging and voting. In this way, although some degree of decentralization is lost, the efficiency can be greatly improved.
secondary title
Can you introduce in detail some of the more popular consensus mechanisms in today's blockchain?
The earliest consensus of the blockchain is proof of work, which is well known to everyone. Most of BTC, ETH, and many public chains released before 2017 use proof-of-work.
Most of the new public chains use POS, so here I mainly introduce several POS consensuses, mainly to understand their basic principles and their differences.
1、Tendermint
This is the consensus adopted by the cross-chain platform Cosmos. It can be used as an introductory consensus for understanding POS. Tendermint publishes new blocks by unfixed nodes every time, and then allows all other nodes to vote and verify the blocks through PBFT. More than 2/3 of the approval votes are passed, and it is the final confirmation of the block, unlike POW, which has to wait for several blocks. But the disadvantage is that if the vote fails, you have to wait forever.
2、Polkadot
Polkadot is also a cross-chain platform, and its relay chain uses Nominated Proof of Stake, which is "nominated proof of equity". Participants become nominators by staking, and then elect verifiers from the nominators, and the verifiers are responsible for producing blocks.
The number of verifiers can be controlled, and democratic centralization will make the efficiency much higher. NPOS is very similar to DPOS in that they select a small number of selected nodes to produce blocks, but DPOS selects all big chaebols and requires a lot of pledges. NPOS is more democratic, grassroots participation in politics is easier, and validator rotation is more frequent.
3、Algorand
As mentioned earlier, an essential problem of the POS consensus is that the right to generate blocks is determined by everyone’s vote, so everyone knows who is the block node before the block is generated, which is easy to be attacked; and the block generation nodes can also choose various packaging strategies Maximize your own interests.
Then if there is a mechanism that can randomly generate a node, this randomness cannot be easily predicted, but it can be easily verified by everyone, then this method can be used to elect block nodes.
Algorand has found such a way to generate random nodes. This method is actually very close to the POW method. Everyone can package and submit candidate blocks, but in the end it is not to see who can solve the problem the fastest, but to select the only next block through a true random number.
4、Casper
Casper is the consensus method that Ethereum 2.0 will adopt. Casper has equity pledge and voting mechanism, but it is still a mixture of POW and POS, and will gradually develop into a complete POS protocol in the future.
Because it needs to upgrade the existing POW-based Ethereum, it considers more about the availability of the chain than the final consistency. Casper blocks will still go through POW, and then voted by POS nodes.
Voting nodes are a bit like gambling, you can vote for any block at will, but if you don’t vote for the last selected block, you will be punished, so in the end everyone will tend to vote for a block on the longest chain.
5、FileCoin
This is a star project in our distributed storage industry. It adopts a new consensus mechanism called expected consensus. This can be understood as a new POW or POS model. It is POW because it changed computing power mining to storage mining. It is POS because the reason for giving voting rights is not to look at the tokens in Staking Number, but to see your effective storage.
In fact, the consensus of each project is very complicated, so here is just a superficial talk.
From the previous sharing, you can see that in fact, POW, POS, including DPOS are not perfect. In the future, FileStorm will continue to study a theoretically impeccable and practical blockchain consensus.
secondary title
Looking at blockchain consensus from the perspective of blockchain application implementation, can you talk about the relationship between implementation and consensus?
We have been talking about consensus just now, why is consensus needed? Because what the blockchain changes is the human production relationship. In the future, there will be no bosses and employees, no one will work for whom, but everyone will work together for a common goal.
But everyone's demands are different, and the willingness to pay for one thing is also different. If you want to achieve a fair distribution of benefits through the incentive mechanism of the blockchain, everyone needs to highly agree with the blockchain. This Recognition is consensus.
POW achieves consensus through computing power investment, POS consolidates consensus through capital investment, and the value of consensus is reflected through tokens. The stronger the consensus, the higher the value of the token. However, if this pass cannot be truly applied, then this pass is an air coin, and it will return to zero sooner or later.
Because Bitcoin is the world's first implementation of the blockchain, the consensus is strong, so although it has not yet achieved the mission of becoming a peer-to-peer electronic payment system entrusted by Satoshi Nakamoto, it is still valuable. It is the gold of cryptocurrencies.
But the value of Ethereum comes from its implementation of smart contracts. This smart contract makes it possible to develop blockchain-based applications. Token issuance and decentralized finance are all its applications.
The value of FileStorm comes from the fact that the issued tokens can be used for storage. Users use tokens to purchase storage, and miners earn tokens by providing storage services, forming a closed economic loop. This economic closed loop can reflect the value of blockchain. Unfortunately, there are very few blockchain applications that achieve economic closed-loop today, and FileStorm is one of the few.
secondary title
How to achieve landing application through a strong consensus? How does FileStorm do it?
How to build a strong consensus, we think there are two important points, one is technology and the other is governance.
FileStorm's pursuit of innovation in the consensus mechanism is to optimize our consensus foundation technically. We mentioned earlier that we want to build a public chain of independent innovation of our nation and go to the world. This is not a slogan, but that we really want to compete technically with internationally renowned public chain projects. In the future, everyone will definitely see the core technologies that we gradually introduce, which will make everyone's eyes shine.
In addition, blockchain projects must be open source. This is the correct way to open a public chain project. FileStorm has dozens of technological innovations, github has released millions of lines of code, and has not applied for a single patent.
Excellent blockchain projects are all open source.
The more open source, the safer: Bitcoin is more and more difficult to be attacked due to code loopholes because of its open source. The more open source, the bigger the ecology: Ethereum is open source, and countless projects plagiarize, but it gets the most blockchain developers in the world to serve him.
In terms of governance, the evolution and upgrade capabilities of the future blockchain in continuous development will become a key factor in whether it can survive the competition of interests it controls.
Therefore, the foundation of blockchain governance comes from the fact that a blockchain system has many stakeholders, miners, mine owners/nodes, investors, users and developers. They gain value by interacting with the blockchain and become stakeholders.
Stakeholders must maintain their own interests, and their interests are different, so they must let the blockchain serve them.
Therefore, if the entire blockchain system is to survive for a long time, there needs to be relevant processes to eliminate these differences. Creating and executing this process is governance.
I learned that Comunion values its efforts in the field of community governance and community assistance. Our ideals are the same, and the blockchain should develop in this way.
With a strong technology and a strong community, the implementation of the application is not a matter of the project party alone. All participants will contribute to the project and look for opportunities for implementation.
With the development of the blockchain today, there are many projects that are pursuing things that are too ambitious, talk about the vision, and talk about the lofty, but they cannot be realized in the foreseeable future. Such a project needs a strong consensus beyond imagination, or the trust and endorsement of the country and large investment institutions, in order to have a chance to survive. If you don't be down-to-earth and just brag, it will be over soon.
secondary title
Can you talk about the characteristics of FileStorm storage technology?
First of all, FileStorm combines its own technical characteristics, puts forward the following values, and introduces a "core value of data storage". We are still discussing with the entire industry. The core values of data storage proposed now are to protect privacy, confirm data rights, encourage practicality, and open source technology.
The core values of data storage reflect the rich connotation and practical requirements of the data storage field, and are highly condensed and concentrated expressions of human demands for data creation and use.
Our innovative technology is as follows: To protect privacy is to achieve data encryption. Data encryption is well known to everyone, and there are many ready-made technical implementations. But efficiently searching and computing encrypted data is difficult. We cooperate with top experts from universities and research institutions to jointly innovate homomorphic encryption and zero-knowledge verification technology, so that encrypted data search calculations are the same as ordinary data.
With encrypted data search, we can target Google and Baidu on distributed storage. To confirm the right of data is to time stamp the data and intelligently identify the content, which requires strong blockchain technology and big data technology. These two sections are the strengths of FileStorm. (It is also the technical core of web3.0)
In addition, data rights verification cannot be achieved by one application, but many different applications. FileStorm's future multi-chain ecosystem is built for this purpose.
To encourage practicality is to make the data move. FileStorm's retrieval mining is a consensus algorithm that gives rewards according to the data usage rate, which encourages a large amount of data to be copied and distributed in large quantities. Cold data can be deduplicated and stored. But only flowing live data can be more practical and create more value.
Open source technology has been mentioned earlier, without open source, shouting about decentralization, and taking the path of centralization, there is no future!
secondary title
Q&A
Q1: The premise of consensus is the need for a consensus person. How do you generally find a consensus person? How to design consensus for non-public chain projects?
You have two problems here:
How does the public chain find consensus. In fact, ICO is a good way for a public chain to find a consensus person, because the consensus person is bound economically from the very beginning. ETH is a very successful case. It's a pity that it was broken later. In fact, DPOS is also a very good method, you can find the funder as an ally in the early stage to promote it together. But the downside is that allies can become conflicting interests. Too much power will affect the development of consensus.
How to design consensus for non-public chain projects: This can be achieved in the form of alliance chains. In fact, it is simpler than the public chain.
Q2: Can you comment on the POC consensus?
The POC you mentioned refers to proof of capacity hard disk storage space mining, right? This is very close to our storage mining industry, because it uses hard disk space for consensus.
It is different from bitcoin mining with computing power. POC completes the hash calculation in advance and stores it in the hard disk, like storing a bunch of lottery tickets. Then draw a lottery, and whoever wins the draw will produce a block.
Q3: How do you view centralization and efficiency, voting and consensus?
This question is very good. It's something we often discuss too. Centralization improves efficiency, but at the expense of decentralization. Voting is democratic, but less efficient.
I think each project should choose a consensus according to the specific situation. It depends on whether the focus is on efficiency or democracy.
Not every project pursues high TPS. In this case, it is good to choose a slower blockchain. FileStorm wants to build a multi-chain ecology because every project is different. In the future, we hope to support applications based on various consensuses.
Q4: Do you think consensus and efficiency can coexist? If so, is there any way?
Now it is coexistence. It's just coexisting in a way of playing games with each other. The efficiency of the alliance chain is very high. If this consensus can be recognized, the alliance chain is enough!
As a fundamental believer in the blockchain, I actually support the public chain more. Until I saw Google's Libra, a huge alliance chain platform, as long as there are many people who support it, the consensus is also very strong.
Q5: Besides IPSF, are there other underlying components or protocols similar to blockchain-based distributed storage?
There are many underlying protocols, and IPFS is not necessarily required. FileStorm has also made a lot of transformations on the basis of IPFS, which is FileStorm's latest data dissemination protocol layer architecture.


