Skip to main content

Consensus process

Node Roles

There are four node roles in the Transformers network, but a node role is just a role that a node plays in a transaction process, not an identity. That is:

Initiating Node: the node that initiates the transaction. Organises the transaction and sends it to the packing node.

Packaging node (proxy node): the node responsible for initiating the flow of transactions and packaging them into blocks. After the transaction is packaged into blocks, it will send the blocks to the validation node, and then broadcast the blocks to the whole network after the validation is passed.

Verification Node (Candidate Generation Sending Node): the node that verifies the blocks sent by the packaging node. If the validation passes, the packaged node is notified.

Other nodes: nodes that are not involved in the transaction process. These nodes are only responsible for storing the broadcasted blocks into the database.

Each node in Transformers has the possibility to play the above four roles, and a node may play all four roles at the same time during the transaction process.

Transaction process

Throughout the transaction process, a number of nodes need to be selected within the nodes of the entire network. All the selection process follows the principle of fair and random, using VRF for selection and verification. The process is as follows:

  1. The initiating node A selects the packing node via VRF based on the block information and sends the transaction to packing node B.

  2. Packing node B performs VRF verification to ensure that it is the node selected by initiating node A and selects a number of nodes among the nodes in the whole network and sends the transaction to these nodes.

  3. The node that receives the transaction verifies the transaction and VRF. If the validation is successful, it notifies the packaged node B.

  4. When the number of notifications received by Packing Node B reaches the consensus number, it puts the transaction in the cache. Packing node B packs all the transactions in the cache into blocks every specific time period.

  5. Packing node B uses VRF to select a number of nodes as validation nodes and sends the blocks to the validation nodes.

  6. The validation node validates the block and VRF. If the validation is successful, it notifies the packaged node B.

  7. When the number of notifications received by packaged node B reaches the consensus number, it broadcasts across the network.

  8. Other nodes receive the broadcast and perform VRF verification to determine that packaged node B (i.e., the initiator of the broadcast) is the packaged node specified by initiating node A.