
Hello everyone, my name is Konstantin, I am a programmer from Kazakhstan. Now I am creating my own blockchain platform and would like to share thoughts about the existing consensus algorithms and what I have invented for my network.
Perhaps my idea is not new, I will be glad if you share with me information about where you have already met a similar implementation.
So, on the topic. Anyone who is at least familiar with the blockchain technology and peer-to-peer networks know about consensus algorithms. In short, the algorithm of consensus helps to come to an agreement on a network where all nodes are equal. This is vital when working with information, because there may be intruders on the network who will try to forge data. In order to protect themselves from this, the nodes need to somehow determine which data is correct and which is not; for this purpose, algorithms of consensus were invented.
')
At this point, the most common are the following implementation:
1.
PoW (proof of work) proof of work. The correctness of the data confirms the node that performed a certain work to solve a complex problem, the result of which is easy to verify. The algorithm provides security by the fact that if an attacker wants to deceive the network, he will need computational power beyond the power of the rest of the network. This algorithm has flaws and opponents, there is a lot of material about it on the Internet, now we will not dwell on it.
2.
PoS (proof of stake) proof of ownership. The data is confirmed by a random node that has coins of this network. The more coins, the higher the chance that it is you who will confirm the data. In my opinion, this is far from the best algorithm, because the rich will become even richer and as a result almost all power can be concentrated in one hand. Maybe I misunderstood something, you can correct me in the comments.
3.
PoI (proof of importance) proof of importance. In fact, the same PoS only takes into account, in addition to the number of coins, the number of completed transactions and the duration of stay in the network.
4.
PoA (proof of Authority) proof of authority. The new block is generated only by those nodes that were initially given this right. And here, as you understand, there can be no talk of complete decentralization. But is it bad?
Anarchy will not bring to good
There was always a leader in any community: leader in the tribes, mayors in the cities, rulers, presidents, parliament, etc. in the states. They are simply necessary to maintain order and further development of society. Another thing is that a manager can abuse powers and this, in my opinion, is the main problem of the PoI algorithm. That is, the nodes that confirm the data can be programmed as you like. This does not mean that they will steal your money, no, it means that they can ignore some data (transactions) or confirm the data in the order that is favorable to them, or something else.
I have been thinking for a long time about how to organize a network so that it remains decentralized (at least partially), but at the same time it was impossible to abuse power. Although if you consider that people voluntarily donate their money to banks and do not particularly think about what is happening to them, the dictatorship in financial matters of people is not so much concerned. But back to the topic.
PoG (proof of genesis) proof of origin
As you probably know, the first block in the blockchain network is called genesis. I decided that it would be logical to give the right to confirm the correctness of the information to the creator of the network, because if you do not trust the creator, then why even use this network? It is the developer (creator) who works on maintaining and developing the network, and it makes no sense for him to try to deceive the participants. All he needs is a stable, transparent operation of the network, its further development and ... A small reward for transactions. This by the way already refers to the monetization of the platform, because money is needed for the development and maintenance of the system. The commission will also help get rid of DDOS. If someone wants to spam a network with a bunch of transactions, he will have to pay a lot for it.
The principle of PoG is simple : in the genesis of the block, 2 addresses are indicated - the first will sign blocks of the blockchain, the second is necessary for protection. If in some way the signature of the first address is reproduced or stolen, the next genesis of the block is released, where the second address becomes the main address, an additional address is created again and a timestamp to cancel all blocks created after it.
The fact that blocks are not signed by a specific node, namely the owner of the genesis, will make the network more resilient, since blocks can be signed from any node in the network. So, if the main node fails, or it is blocked, or something else happens to it, I simply start generating blocks from another computer on the network.
What we have
- There is a peering network whose members send transactions.
- Transactions diverge over the network and hang in the unconfirmed.
- At a certain length of time, a block is formed of unconfirmed transactions and is also sent over the network.
- The nodes that received the new block check that it is valid and signed by the genesis and, if everything is correct, delete the transactions already recorded in the block from the unconfirmed ones.
- Transaction fees protect the network from spam.
- The absence of a tight binding of the signature to a specific node makes the network more fault tolerant, because a new unit can appear from different ends of the network.
- If the signature genesis is stolen, then a new genesis block is released, which cancels the fake blocks.
- Developers do not need to reject transactions, because he will lose the commission and trust of users, and he will not be able to forge data, because when a block is received by other nodes on the network, it is checked.
Afterword
I would be happy to answer your questions and
skip past the ears to hear constructive criticism.