Decentralized Validator
In the current Layer2 solution, how to decentralize the sequencer is a prominent challenge. On one hand, If the sequencer cannot be decentralized, there is a single point of risk that the whole network will be unavailable when the sequencer is down, and on the other hand, there is also the risk of sequencer fraud. Before transactions are written in batches to the data availability layer and the consensus layer, the sequencer can fraud by dropping transactions or adjusting the order of transactions.
Rooch was designed at the beginning with this in mind, trying to build a decentralized validator network.
Validator Role Definition
- Sequencer: order and executes transactions, compute the root of the state tree, and the root of the transaction accumulator.
- Verifier: Fetches transactions from the consensus and data availability layers, executes and verifies them, and initiates fraud proofs to the arbitration layer if the results are found to be incorrect.
The Sequencer and Verifier are called Validator in Rooch.
Decentralized Solutions
Since Layer2 consensus only needs to determine the order of transactions, the correctness of transaction execution can be guaranteed by challenge deterrence. To ensure the order of transactions, it is only necessary to write the transactions (or the transaction hash) to Layer1, which has the role of consensus layer.
Therefore, Layer2 or the execution layer does not need to build a PBFT consensus network to decide the transaction order and execution results to achieve decentralization, but only needs to design a rotation mechanism of the sequencer and a data synchronization protocol on the P2P network.
The initial design idea is as follows.
- Anyone can register as a validator on the chain by depositing a certain amount of Token.
- Each Epoch, the smart contract on the chain randomly selects a validator as a sequencer.
- Nodes that are not selected as sequencer automatically become verifier.
- All the verifiers form a P2P network, and the transactions received by the verifier will be forwarded to the sequencer. The Sequencer will then verify and order all the transactions, as well as forward them to the other verifiers with the State Tree Root and the Sequence Proof.
Sequencer Rotation Mechanism based on Bitcoin Timestamp
TODO: This section of the document needs improvement
- Explaination of the sequencer rotation mechanism.
Sharded Application Subnet
TODO: This section of the document needs improvement
- Explaination of the sharded application subnet.