Consensus algorithm (RpoS)

The COFFE Multichain blockchain currently uses the same consensus algorithm as EOS-DPoS (Delegated proof-of-stake). This year, we plan to switch to our own RpoS (Random proof-of-stake) consensus algorithm.

RpoS (Random proof-of-stake) is an algorithm based on the principle of decentralized obtaining of a random number (random). Obtaining a random number in a decentralized environment is reduced to obtaining the sum of random numbers from all the consensus participants. An important factor to pay attention to is the impossibility of predicting the resulting number, even if all the consensus participants are playing dishonestly.

The essence of the consensus algorithm is reduced to the choice of a block producer using a decentralized random algorithm. None of the participants in the process can predict the resulting random number in advance. The number received by each participant dramatically affects the overall result, based on this, the final choice of block producers depends on everyone. Since the entire pool of block producers is calculated mathematically from the resulting number.

All licensed nodes that are candidates for block producers participate in the selection of a producer or producers. The candidate must be selected by a decentralized random in order to get into the number of producers.

The selected node gets into the list of 21 producers, one of which creates the next batch of blocks and the other 20 confirm the created blocks. In the COFFE Multichain network, only the producer who produced the blocks is rewarded, so each of the 21 producers will confirm the blocks until it gets a choice and produces the next batch of blocks. The next producer who creates blocks is chosen by 21 producers using a decentralized random who participate in the production and confirmation of the next batch of blocks.

The producer who has finished the production of blocks is eliminated from the list of producers and participates in the selection of the next producer.

If a producer skips a block, it is excluded from the list of candidates for producers until a special notification that such a producer must send to the blockchain to confirm the intention to continue operations. This ensures the smooth operation of the network and minimizes the number of blocks skipped by excluding unreliable producers from the consensus algorithm.

Transaction confirmation

In the RpoS algorithm, all block producers participate in the confirmation of blocks. A transaction can be considered confirmed with a probability of 99.9% within 1.5 seconds from the moment it was sent.

There is a possibility of some extraordinary situations caused by a software failure, disconnection from the Internet or intentional sabotage on the part of the block producer - in this case, a branch (fork of the chain) occurs. For absolute confidence in the irreversibility of the transaction, the network node may need to wait for confirmation from 15 of the 21 block producers. For the standard COFFE Multichain configuration, this will take 45 seconds under normal conditions. By default, all nodes will consider the block irreversible after receiving confirmation from 15 of the 21 producers and will not switch to a branch that does not have this block regardless of the branch length.

The network node has the ability to warn users about the high probability of being on a minority branch within the first 9 seconds from the moment of switching to such a branch. After 2 sequentially skipped blocks, the probability of finding a node on the minority branch is 95%. After 3, the probability reaches 99%. It is possible to create a reliable forecasting model that, based on information about disconnected nodes, recent participation ratings and other factors, could promptly warn users about problems.

The response to such warnings depends entirely on the nature of business transactions, but the simplest reaction is to wait for 15 out of 21 confirmations, after which the warning will disappear.

Transactions as Proof of Ownership of a Share (TaPoS)

COFFE Multichain requires the inclusion of a hash from the header of the previous block in each transaction. This hash performs two functions:

  • Prevents the repetition of a transaction in a branch that does not include the mentioned block;
  • Notifies the network about the presence of a certain user and his/her share on a certain branch.

Over time, all users will directly confirm the blockchain as the main one which makes it difficult to fake the chain due to the attacker's lack of the ability to transfer transactions from the real chain.

Still need help? Get in touch!
Last updated on 31st Dec 2021