Skip to main content

Consensus mechanism

Concept

Digital cryptocurrency and blockchain are complementary to each other. At the same time, blockchain is the underlying technical architecture of cryptocurrency, and forming the basis of blockchain is the consensus mechanism. As a system of decentralised bookkeeping based on the Internet, the blockchain is maintained without the control of a strong centralised role, and all nodes in the blockchain need to agree on a common cognitive mechanism to establish a relationship of mutual trust.

Raindrop Consensus Protocol

Transformers uses the Raindrop Consensus Protocol as the consensus method in the consensus layer, where the current mainstream consensus mechanism cannot balance efficiency and decentralization. It is more efficient than traditional POW[^11] and does not generate arithmetic competition. Each node has its own unique node ID in the network, and each node is verified by a discrete random number selected in the main network.

The Raindrop Consensus protocol used by Transformers performs data verification of multilinear broadcasts with a discrete random number algorithm from randomly elected verification nodes in the verification pool, and determines the legitimacy of the block through the signature verification that is ultimately satisfied.

ED22519 Curve

ED25519 is an EdDSA signature, based on SHA-512 and Curve25519. it can be seen that his naming is taken from the first and second halves of EdDSA and Curve25519. edDSA (Edwards-curve Digital Signature Algorithm) is a class of signature algorithms based on twisted Edwards curves ( twisted Edwards curves), while Curve25519 is a type of twisted Edwards curves. In the VRF process we introduced earlier, ED22519 is involved in creating VRF or verifying VRF. In the process of creating VRF, the hash of the transaction or block will be encrypted with the sha256 hash of the private key for one time ED22519, and on the contrary, the verification will verify the signature result with ED22519.

Digital signatures

The basic characteristics of a digital signature: non-forgerability, non-repudiation, message integrity.

Digital signatures (also known as public key digital signatures, e-signatures) are distinct from physical signatures written on paper, and use techniques from the field of public key cryptography, a method used to authenticate digital messages. A digital signature usually defines two complementary operations, one for signing and the other for verification. A digital signature is a string of numbers that only the sender of a message can generate that no one else can forge, and this string of numbers also serves as a valid proof of the authenticity of the message sent by the sender of the message. Digital signature is the application of asymmetric key cryptography and digital digest technology. Digital signature is an encryption process and digital signature verification is a decryption process.

Transformers adopts digital signature because of its unforgeability, because others can't fake the sender's private key signature. The sender encrypts the message with his private key and it can be decrypted only by using the sender's public key. It guarantees the integrity of the message. One time digital signature uses a specific hash function which produces different values for digital digests for different files.

The Raindrop Consensus protocol used by Transformers performs data verification of multilinear broadcasts with a discrete random number algorithm on randomly elected verification nodes from a verification pool, and determines the legitimacy of the block by a signature verification that is finally satisfied.

VRF Verifiable Random Function Algorithm

Verifiable Random Function (abbreviated VRF) is a cryptographic scheme that maps inputs to verifiable pseudo-random outputs.

VRF random verification algorithm is indispensable in the entire Transformers Raindrop Consensus protocol, basically involves the random selection of nodes in the scene will use the VRF random algorithm. Whether the transaction flow or block flow process has VRF participation, in the creation of VRF, will be the current node's private key, transaction or block hash as an input parameter, the hash string itself for a time to obtain sha256 encryption, and the encryption results with the private key as a VRF signature (proof). The result of the signature (proof) is again encrypted with sha256, and the result is used as an outgoing parameter to create the VRF.

When verifying the VRF, the process is reversed. Pass in the signature result and the current block or transaction hash as incoming parameters and compare the verification result with the sha256 hash of the private key. If it matches then the VRF is verified successfully.

Encryption Algorithm and Security Considerations

Transformers adopts the security algorithms that have been widely used and passed extensive tests in order to protect the security of the assets on the chain. It consists of two main aspects: the ED25519 conic curve signature algorithm and the Verifiable Random Function (VRF).

The ED25519 conic curve has been widely recognised for its security in both mathematical and practical vectors, and also has an extremely fast generation and verification speed, which improves the verification speed of the transaction under the premise of ensuring security. More about ED25519 conic curve[^12] can be found in the related literature.

Transformers chain uses a lot of random in the transaction flow process to ensure its fairness, but the ordinary random method cannot prevent the evil behaviour generated by modifying the source code. Therefore, Transformers chain introduces VRF[^13] to verify the random results. Its related principles can also be found in the related documents.