DECENT Witnesses System
Some people have PMed me at bitcointalk about how witness mechanism works in DECENT. This might be some other people's curiosity too, so I decided to write at Steemit as well.
DECENT
I am going to present an overview on the role of witnesses on DECENT Blockchain. If you want to know more about DECENT, please read this article I wrote previously, the official website or the article I wrote about PUBLIQ, which is going to be one of the possible use cases of DECENT Blockchain.
https://steemit.com/cryptocurrency/@jvper/decent-decentralized-content-distribution-to-be-launched-on-friday-june-30th
https://www.decent.ch
https://steemit.com/steemit/@jvper/publiq-a-steemit-competitor
Witness
A witness is not a part of a transaction. For example, consider A is selling a house for B. B is buying a house from A for an agreed amount of money. The witness (or the witnesses) signs the document and helps turning this piece of paper into a legally binding document. However, the witness is not a part of the transaction. This concept is similar to the role a a witness in DECENT Blockchain, where witnesses are block producers.
DPoS - A consensus mechanism based on votes
First of all: The words miner and witness are interchangeable in DECENT. They mean block producer under DPoS consensus mechanism.
It is not proof of work, so just forget everything you know about mining rigs, hashpower and so on.
DPOS is an algorithm whereby stakeholders elect an odd number of block producers (note it is not a matter of hashpower, but rather being voted by stakeholders). Each round the block producers are shuffled and assigned a time slot in which they should produce a block. In DECENT, a block is produced every 5 seconds. With this process in place, the longest chain is considered the best chain. It is clearly impossible for a minority of block producers to create a longer chain because they would be producing fewer blocks per minute than the majority blockchain.
Voting system
There is a rank. The most voted witness is number 1. The second most voted witness is number 2, and so it goes.
At this moment, the number of witnesses is 53. As a result one need to be in the top 53 most voted miners to be assigned blocks. The probability of being assigned a block is 1/53 for every block if you are on the active miners list (top 53) or zero if you are out of the list. It doesn't make any difference if you are number one or number 53 in the rank. You are either in or out of the list.
Every 24 hours the votes are calculated. So it is impossible to see new votes increasing the "total_votes" figure until 0:00 GMT.
If you have X DCT your votes will be X*100000000 (one satoshi of a DCT results in one vote). You can vote for as many witnesses you want with the same votes. You don't split votes. The voting power is the same regardless of how many miners you voted for. For example, if you vote for yourself with 5000000 votes, you can vote for me and we both will have 5000000 votes each. You will not lose a single vote for voting for me.
The number of active witnesses
We are on the early days of DECENT. The more witnesses we have, the more decentralized is block production. I personally believe 53 is too many active miners. Consensus is achieved with 2/3 + 1 of the producers, so we need at least 36 blocks for consensus to be finally achieved. This is similar to the 6 blocks confirmation in Bitcoin. This means the last 35 blocks are considered reversible. This process takes 3 minutes. Not much compared to Bitcoin, but it could be reduced to 2 minutes if we had around 35 witnesses instead of 53. The community will probably vote for less than 53 witnesses in the near future, because a high number causes this trouble.
The intent was writing a summary. Please comment below any doubt or anything you want further clarification.
jvper
Quite old, but a good starting point for beginners to check how DPoS works at all. DECENT implemented that quite well and probably learned from Bitshares/Graphene.