R²S(Reputation Rotational Consensus)

R²S(Reputation rotational consensus) is an important component of CESS protocol. Different from the Polkadot consensus mechanism, reputation rotation consensus changes the process of verifying node elections.

Overall Process

  1. A node stakes 3,000,000 CESS to register as a consensus node.

  2. Each era validator nodes will rotate, and the rotation rule is credit ranking. Select the top 11 nodes with the highest final credits (4 nodes in the CESS test network) from all consensus nodes as the validator nodes for this era.

  3. Block producer selection mechanism is the same as BABE, where each block producer is randomly selected from 11 validation nodes through VRF.

  4. The method of confirming blocks is the same as GRANDPA.

  5. At the 5th epoch of each era, the validator node of the next era will be selected.

The final credit is determined by the reputation credits, staking score and the random credits :

final credits = reputation credits* 50% + staking score* 30% + random credits* 20%

Please refer to the reputation model for reputation credits calculation, Staking score for staking score calculation and random credits are generated through VRF.

Reputation Model

Each consensus node entering the CESS network needs to maintain the network state and also undertake the task of data storing and scheduling. In order to encourage consensus nodes to do so, we have designed a reputation model. In our model, each consensus node has a reputation value, which is directly determined by the workload of the TEE worker. Specifically, it includes the following items:

  1. The total number of bytes processed for service files.

  2. Number of timeout penalties for random file validation challenges.

The reputation value is calculated as follows:

reputation value = 1000 * processing bytes ratio - (10 * penalty times)

Staking Score

  1. Holders staking no less than 300,000 CESS can become candidate nodes. The root account invokes the staking.setStakingConfigs transaction to set minValidatorBond to 300,000.

  2. Consensus nodes can choose to enable the financing for staking. CESS Holders (individuals) can participate as nominators, with each nominator being able to nominate at most one consensus node. The combined staked amount of a consensus node and its nominators serves as the staked amount for the election of rotation nodes.

  3. The staked amount threshold for rotation node candidacy is 3,000,000 CESS. The staked amount of rotation node candidates affects their staking score during the election, which in turn influences the final credits.

  4. At the moment of election triggering, candidate nodes with a staked amount less than 3,000,000 cannot participate in the election. Among all candidate nodes, the node with the highest staked amount will have a staking score of 100, and its staked amount serves as the baseline value of 100 points. The staking score of other nodes is calculated as follows:

Staking Score = (Node's Staked Amount / Maximum Staked Amount) * 100.

For example:

node

staked amount

staking score

A

1,000,000

N/A (directly disqualified)

B

3,000,000

30

C

10,000,000

100

There is no upper limit on the staked amount for consensus nodes.