Alliance chain multi-chain system based on Snowman consensus and its interaction and deployment method
By introducing the Snowman consensus and Casper FFG protocol into the alliance chain system, the horizontal expansion and shared security of the multi-chain architecture are achieved, the problems of low node verification efficiency and limited throughput in the existing technology are solved, and the transaction processing rate and System security.
Patent Information
- Application Number
- CN202211201448.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-09-29
AI Technical Summary
The existing consortium chain system requires all nodes in the network to reach consensus, resulting in low efficiency and limited throughput. Especially when the number of nodes increases, verification efficiency decreases, and it is difficult to achieve shared security and expansion among multiple chains.
Adopting a consortium chain multi-chain system based on Snowman consensus, through the platform chain, contract execution chain, subnet and Snowman consensus module, each subnet is allowed to independently verify and share security, only some nodes need to reach consensus, and combined with the Casper FFG protocol to prevent forks , to achieve horizontal expansion and customization of multi-chain architecture.
It improves transaction verification efficiency and system throughput, achieves shared security among multiple chains, avoids chain forks, is suitable for payment scenarios, enhances the security of the main network consensus, and allows users to customize the blockchain environment.
Smart Images

Figure CN115603903B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain, and in particular to a consortium chain multi-chain system based on Snowman consensus and an interaction and deployment method thereof. Background Art
[0002] Patent document CN107124460A discloses a consortium chain system, which includes: multiple accounting nodes, the multiple accounting nodes include a target accounting node and other accounting nodes, the remaining accounting nodes are accounting nodes other than the target accounting node among the multiple accounting nodes; the target accounting node is used to obtain transaction information sent by the transaction node, initiate consensus on the transaction information to the remaining accounting nodes, and if the consensus is successful, store the obtained transaction information in the corresponding block; wherein, at least two of the multiple accounting nodes correspond to enterprises with different geographical locations, and the multiple accounting nodes are in the same local area network.
[0003] The alliance chain in the existing technology has the disadvantage that it requires all nodes in the network to reach a consensus. Summary of the invention
[0004] In view of the defects in the prior art, the purpose of the present invention is to provide a consortium chain multi-chain system based on Snowman consensus and its interaction and deployment method.
[0005] According to the present invention, a consortium chain multi-chain system based on Snowman consensus is provided, comprising:
[0006] Platform chain: carries the metadata of the alliance chain multi-chain network, coordinates verification nodes and creates subnets for transactions received from users, where the transactions include registering subnets and / or registering subnet verifiers;
[0007] Contract execution chain: The subchain acts as a contract execution chain and is responsible for the execution of transactions;
[0008] Subnet: Each blockchain can only be verified by one subnet, and validators on each subnet are allowed to verify multiple subnets;
[0009] Validator module: exists in each subnet. The validators in the subnet verify the user's transactions, package the transactions on the chain, and reach a consensus;
[0010] Snowman consensus module: The consensus executed on the platform chain and contract execution chain includes Snowman consensus;
[0011] Casper FFG finalization module: After executing Snowman consensus on the platform chain and contract chain, Casper FFG consensus is executed to finalize the block.
[0012] Preferably, users only need to register with the platform chain to register a subnet and join the alliance chain multi-chain network.
[0013] Preferably, subnets of the same validator set can forward and share data with each other.
[0014] Preferably, users who register for a subnet need to stake points on the platform chain.
[0015] Preferably, users are allowed to customize the execution environment of the sub-chain, wherein the execution environment includes the consensus algorithm and encryption algorithm that the user needs to use.
[0016] Preferably, each subnet is allowed to have multiple execution chains, allowing each execution chain to execute its own consensus protocol and encryption algorithm.
[0017] Preferably, in the Casper FFG finalization module, after executing the Snowman consensus, a random portion of nodes in the network execute the Casper FFG consensus to finalize the blocks that reach the Snowman consensus threshold, and the finalized blocks cannot be forked after reaching the finalized state.
[0018] Preferably, the Snowman consensus is used to ensure that the validators in the subnet do not need to connect to all nodes in the main network when verifying the transactions of their own subnet, that is, they can verify the transactions in the main network at the same time; using the subnet architecture, the validators of the subnet simultaneously participate in the Snowman consensus in the main network, wherein the main network includes a platform chain and a contract execution chain.
[0019] According to a consortium chain multi-chain interaction method based on Snowman consensus provided by the present invention, interactive communication is performed based on the consortium chain multi-chain system based on Snowman consensus.
[0020] A multi-chain alliance chain deployment method based on Snowman consensus provided by the present invention includes a deployment platform chain, a contract execution chain, a subnet, a validator module, a Snowman consensus module, and a Casper FFG finalization module;
[0021] Platform chain: carries the metadata of the alliance chain multi-chain network, coordinates verification nodes and creates subnets for transactions received from users, where the transactions include registering subnets and / or registering subnet verifiers;
[0022] Contract execution chain: The subchain acts as a contract execution chain and is responsible for the execution of transactions;
[0023] Subnet: Each blockchain can only be verified by one subnet, and validators on each subnet are allowed to verify multiple subnets;
[0024] Validator module: exists in each subnet. The validators in the subnet verify the user's transactions, package the transactions on the chain, and reach a consensus;
[0025] Snowman consensus module: The consensus executed on the platform chain and contract execution chain includes Snowman consensus;
[0026] Casper FFG finalization module: After executing Snowman consensus on the platform chain and contract chain, Casper FFG consensus is executed to finalize the block.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] 1. The present invention uses Snowman consensus to verify a transaction. It does not require all nodes in the network to reach a consensus, but only requires a part of the nodes to pass the verification. The network will not reduce the efficiency of verification due to the increase in the number of nodes. Based on the Snowman consensus protocol, a verifier can join multiple different subnets, so that shared security can be achieved between each subnet.
[0029] 2. In today’s alliance chain system architecture, the multi-chain and multi-subnet framework has been innovated. The platform chain manages multiple subnets and validators. Based on the multi-chain and multi-subnet architecture, while multiple subnets achieve shared security, it can also customize its own blockchain according to user needs, while horizontally expanding the number of chains, and infinitely expanding the TPS of the entire alliance chain system architecture.
[0030] 3. After executing Snowman consensus on the platform chain and contract chain, execute Casper FFG consensus to finalize the block, avoiding chain system forks to suit payment scenarios.
[0031] 4. Snowman consensus and subnet architecture complement each other, which is beneficial for validators in subnets to verify transactions in their own subnets without connecting to all nodes in the main network. They can verify transactions in the main network at the same time. In addition, more nodes in the subnet architecture participate in the main network Snowman consensus, which improves the security of the main network consensus. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0033] Figure 1 It is a schematic diagram of the principle of the present invention.
[0034] Platform chain means platform chain;
[0035] Execute chain represents the contract execution chain;
[0036] subchain means subchain
[0037] subnet represents a subnet DETAILED DESCRIPTION
[0038] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0039] like Figure 1 As shown, the present invention provides a consortium chain multi-chain system based on Snowman consensus, including: a main network, a subnet, a validator module, a Snowman consensus module, and a Casper FFG finalization module. The main network includes a platform chain and a contract execution chain.
[0040] Platform chain: carries the metadata of the multi-chain network and is used to coordinate verification nodes and create subnets. To join the alliance chain multi-chain network, you need to send a transaction to the platform chain first. The types of transactions can include: adding a subnet, registering a validator, etc.
[0041] Contract execution chain: Each sub-chain is a contract execution chain. Users can customize the execution environment of the sub-chain, including the consensus algorithm and encryption algorithm they need to use.
[0042] Subnet: A network consisting of a series of validators who work together to reach a consensus on a blockchain. Each blockchain can only be verified by one subnet, and validators on each subnet can verify multiple subnets.
[0043] Validator module: exists in each subnet. The validators in the subnet verify the transactions, package the transactions on the chain, and finally reach a consensus.
[0044] Snowman consensus module: It uses the Snowman consensus protocol for consensus. It is the core module of the alliance chain multi-chain system architecture. The platform chain and contract execution chain execute the Snowman consensus. The validators of each subnet need to join the platform chain before joining the multi-chain architecture. Snowman consensus is a consensus algorithm with a chain structure. Its characteristic is that it continuously converges the opinions of each node in the network through random sampling. When it converges to a certain threshold, it can be said that the entire system has reached a consensus. Since it is a consensus process of continuous sampling and inquiry, it only needs to reach a certain threshold in the end to consider that the transaction has been finalized. This process does not require all nodes in the network to reach a consensus on the same transaction. Only a part of the nodes in the network need to reach a consensus on the transaction to allow the transaction to reach the final confirmed state. Based on this, nodes that want to join the multi-chain network architecture do not need to broadcast transactions to the entire network and connect all nodes in the network during the consensus process. They only need to connect some nodes to participate in the consensus process of a transaction.
[0045] Casper FFG Finalization Module: Since the transaction can be considered finalized even if a certain threshold is reached after the Snowman consensus is executed, this finalized state is guaranteed probabilistically, that is, there is still a small probability that it will be modified. The random sampling in the avalanche protocol reaches a non-deterministic consensus, which will cause the chain system to fork. This tiny probability is very serious for the payment system. Therefore, after the Snowman consensus is executed, a random part of the nodes in the network will execute the Casper FFG consensus to finalize the blocks that reach the Snowman consensus threshold. The finalized blocks cannot be forked after reaching the finalized state. In other words, the present invention uses the Casper FFG algorithm to perform a block finalization process after passing the Snowman consensus.
[0046] Furthermore, the present invention adopts Snowman consensus. In addition to the role of only requiring a part of the nodes to pass the verification, Snowman consensus helps the subnet architecture in that it is beneficial for the verifier in the subnet to verify the transactions of its own subnet without connecting to all the nodes in the main network, and can simultaneously verify the transactions in the main network. At the same time, the present invention adopts the subnet architecture. In addition to the role of allowing users to customize and expand at will, the subnet architecture helps Snowman consensus in that the verifier of the subnet will also participate in the Snowman consensus in the main network. More nodes in the subnet architecture participate in the main network Snowman consensus, which improves the security of the main network consensus.
[0047] The present invention will be described in more detail below.
[0048] The alliance chain multi-chain system based on Snowman consensus provided by the present invention has an architecture that is a complete architecture based on subnet expansion. As long as you register with the platform chain, you can register the subnet to join the multi-chain architecture. The main network in the multi-chain architecture includes a platform chain and a contract execution chain for system operation. Each subchain joining the architecture only needs to register with the platform chain, and the verifier of the subnet also needs to register with the platform chain to join the multi-chain architecture. Subnets with the same set of verifiers can forward and share data with each other. That is, subnets with the same set of verifiers share security.
[0049] At the same time, in the main network, the Snowman consensus protocol is used, and each newly added validator needs to join the main network for consensus. The Snowman-based consensus protocol will not reduce the consensus efficiency of transactions as the number of newly added nodes increases, which is one of the reasons why the Snowman consensus is used. The use of the Snowman consensus protocol solves the problem that the consensus used by most consortium chains usually requires all nodes to verify the same transaction, resulting in redundant verification and transaction forwarding when there are a large number of distributed nodes. The throughput of transactions and the performance of transaction propagation in the network will be greatly affected. Using the Snowman consensus in the avalanche protocol, combined with the practicality of the consortium chain multi-chain, can achieve unlimited expansion of TPS and customize sub-chains that meet the needs of users.
[0050] The validator module is mainly responsible for verifying transactions between each subchain and the main network. Each validator can join multiple subnets. Each subnet with the same validator can communicate with each other and share the security of the network.
[0051] The subnet part can also impose certain restrictions on the addition of subnets, for example, each subnet added requires a certain number of points to be pledged on the platform chain. This can effectively limit the number of subnets, allowing validators to stably maintain certain specific subchains, not to do evil at will, and promote the healthy development of the multi-chain network.
[0052] Compared with the traditional single-chain framework, the present invention innovates a multi-chain architecture. The main network in the system framework includes a platform chain and a contract execution chain. The platform chain mainly manages each subnet and verifier, and the contract execution chain is mainly responsible for the execution of transactions. Each subnet can have multiple execution chains, each of which can execute its own consensus protocol and encryption algorithm, and can customize the corresponding requirements. Each verifier can choose to join multiple subnets, so that multiple subnets based on the same verifier can achieve shared security. In addition, the multi-chain-based architecture can add subnets at any time, so it can theoretically achieve unlimited system throughput TPS, and horizontally expand the transaction throughput of the entire blockchain system. At the same time, in order to facilitate the verifier to join the platform chain, the platform chain uses the Snowman consensus protocol for transaction consensus. The feature of using this consensus protocol is that the transaction does not require all nodes in the network to verify, and only a part of the nodes need to verify the transaction. In this way, the newly added verifier only needs to connect to some nodes in the platform chain to become the verifier of the platform chain, and the consensus transaction only requires a part of the nodes to pass the verification. It does not need to be verified by all nodes in the network like PoW consensus or most other consensus protocols. Similarly, it is also more convenient for validators to verify multiple different chains. Using the multi-chain system architecture based on Snowman, you can customize your own chain based on user needs, achieve shared security between multiple subnets, and expand TPS infinitely. The present invention enables validators to better join the platform chain without consuming too many resources of the validator on the verification of the platform chain. The present invention makes full use of the multi-chain and multi-subnet architecture, fully expands the functions of the subnet, and improves the overall efficiency of the network.
[0053] The present invention can expand the transaction processing rate of the alliance chain, and the security of the system can be improved while sharing security between multiple subnets. At the same time, the subchain can be customized to customize the business scenarios required by users and enrich the functions of the multi-chain system. The present invention can expand the current phenomenon of low performance of a single alliance chain, and the subchain can customize the rules of the network to make the chain more suitable for its own business. For example, some assets can only be traded by people in certain countries. Similarly, the nodes on your network can only be accessed by devices in certain countries, or other restrictions can be used to create your own blockchain. While improving performance, it can enrich the functions of the multi-chain architecture.
[0054] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.
[0055] According to the present invention, a consortium chain multi-chain interaction method based on Snowman consensus is also provided, and interactive communication is performed based on the consortium chain multi-chain system based on Snowman consensus.
[0056] According to the present invention, a multi-chain deployment method of a consortium chain based on Snowman consensus is also provided, including a deployment platform chain, a contract execution chain, a subnet, a validator module, a Snowman consensus module, and a Casper FFG finalization module;
[0057] Platform chain: carries the metadata of the alliance chain multi-chain network, coordinates verification nodes and creates subnets for transactions received from users, where the transactions include registering subnets and / or registering subnet verifiers;
[0058] Contract execution chain: The subchain acts as a contract execution chain and is responsible for the execution of transactions;
[0059] Subnet: Each blockchain can only be verified by one subnet, and validators on each subnet are allowed to verify multiple subnets;
[0060] Validator module: exists in each subnet. The validators in the subnet verify the user's transactions, package the transactions on the chain, and reach a consensus;
[0061] Snowman consensus module: The consensus executed on the platform chain and contract execution chain includes Snowman consensus;
[0062] Casper FFG finalization module: After executing Snowman consensus on the platform chain and contract chain, Casper FFG consensus is executed to finalize the block.
[0063] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A consortium chain multi-chain system based on Snowman consensus, characterized by: include: Platform chain: carries the metadata of the alliance chain multi-chain network, coordinates verification nodes and creates subnets for transactions received from users, where the transactions include registering subnets and / or registering subnet verifiers; Contract execution chain: The subchain acts as a contract execution chain and is responsible for the execution of transactions; Subnet: Each blockchain can only be verified by one subnet, and validators on each subnet are allowed to verify multiple subnets; Validator module: exists in each subnet. The validators in the subnet verify the user's transactions, package the transactions on the chain, and reach a consensus; Snowman consensus module: The consensus executed on the platform chain and contract execution chain includes Snowman consensus; Casper FFG finalization module: After executing Snowman consensus on the platform chain and contract chain, Casper FFG consensus is executed to finalize the block.
2. The Snowman consensus-based alliance chain multi-chain system according to claim 1, characterized in that: As long as users register with the platform chain, they can register a subnet and join the alliance chain multi-chain network.
3. The alliance chain multi-chain system based on Snowman consensus according to claim 1 is characterized in that: Subnets of the same validator set can forward and share data with each other.
4. The alliance chain multi-chain system based on Snowman consensus according to claim 1 is characterized in that: Users who register for a subnet need to stake points on the platform chain.
5. The alliance chain multi-chain system based on Snowman consensus according to claim 1 is characterized in that: Allow users to customize the execution environment of the sub-chain, where the execution environment includes the consensus algorithm and encryption algorithm that the user needs to use.
6. The Snowman consensus-based alliance chain multi-chain system according to claim 5, characterized in that: Each subnet is allowed to have multiple execution chains, allowing each execution chain to execute its own consensus protocol and encryption algorithm.
7. The alliance chain multi-chain system based on Snowman consensus according to claim 1, characterized in that: In the Casper FFG finalization module, after executing the Snowman consensus, a random portion of nodes in the network execute the CasperFFG consensus to finalize the blocks that reach the Snowman consensus threshold. After the finalized blocks reach the finalized state, they cannot be forked.
8. The alliance chain multi-chain system based on Snowman consensus according to claim 1, characterized in that: The Snowman consensus is used to ensure that the validators in the subnet do not need to connect to all nodes in the main network when verifying the transactions of their own subnet, that is, they can verify the transactions in the main network at the same time; using the subnet architecture, the validators of the subnet simultaneously participate in the Snowman consensus in the main network, wherein the main network includes a platform chain and a contract execution chain.
9. A multi-chain interaction method of alliance chain based on Snowman consensus, characterized in that: Interactive communication is performed based on the alliance chain multi-chain system based on the Snowman consensus described in any one of claims 1 to 8.
10. A multi-chain deployment method of alliance chain based on Snowman consensus, characterized in that: Including deployment platform chain, contract execution chain, subnet, validator module, Snowman consensus module, Casper FFG finalization module; Platform chain: carries the metadata of the alliance chain multi-chain network, coordinates verification nodes and creates subnets for transactions received from users, where the transactions include registering subnets and / or registering subnet verifiers; Contract execution chain: The subchain acts as a contract execution chain and is responsible for the execution of transactions; Subnet: Each blockchain can only be verified by one subnet, and validators on each subnet are allowed to verify multiple subnets; Verifier module: exists in each subnet. The verifier in the subnet verifies the user's transaction, packages the transaction on the chain, and reaches a consensus; Snowman consensus module: The consensus executed on the platform chain and contract execution chain includes Snowman consensus; Casper FFG finalization module: After executing Snowman consensus on the platform chain and contract chain, Casper FFG consensus is executed to finalize the block.
