Sharded blockchain system and blockchain data synchronization and transmission method thereof
By combining a sharded blockchain system with the Kademila and Gossip protocols, subdividing node types, and optimizing data transmission methods, the problems of high network overhead and uneven node load in traditional blockchain systems are solved, achieving efficient data synchronization and increased throughput.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional blockchain systems suffer from high network overhead when the network scale is large, and uneven node load leads to reduced throughput. In particular, when there are a large number of transactions, the excessive load on a single node affects the overall performance of the system.
A sharded blockchain system is introduced, combining the Kademila and Gossip protocols. Node types are subdivided, block-producing nodes are selected via VRF, and the Kademila protocol is used to pull block data, while the Gossip protocol is used for data synchronization. Transaction data is allocated to shards with lower loads, and data is transmitted across different levels of nodes.
It effectively reduces network load, improves the transmission and synchronization efficiency of transaction data and block data, increases the throughput of the blockchain system, and ensures the eventual consistency of data across the entire network.
Smart Images

Figure CN118869706B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain algorithm technology, specifically to a sharded blockchain system and its blockchain data synchronization and transmission method. Background Technology
[0002] Blockchain, by combining technologies such as encryption algorithms, peer-to-peer transmission, smart contracts, distributed storage, and consensus mechanisms, achieves an immutable, unforgeable, decentralized, and traceable system. This system does not rely on any organization; it automatically executes business logic through negotiated smart contracts. While ensuring efficient business operations, it eliminates the drawbacks of traditional methods that rely on third-party authentication to guarantee consistency, such as high transaction fees, numerous steps, and long processing times.
[0003] Because blockchain involves multiple technologies, the performance of any one of them will affect the overall performance of the blockchain. Peer-to-peer transmission is typically accomplished using the Gossip protocol. The Gossip protocol is a commonly used communication protocol in distributed systems that efficiently exchanges information between nodes by mimicking the way messages are transmitted between people. This protocol is particularly suitable for P2P (peer-to-peer) environments and scenarios requiring consistency under unreliable network conditions, such as distributed databases, cluster management, and content delivery networks. The Gossip protocol has key characteristics such as decentralization, asynchronous communication, randomization, fault tolerance, message compression, and eventual consistency, and it has two modes: pull and push. In the Gossip protocol, each node periodically sends messages randomly to a subset of its neighboring nodes, and the entire system will eventually receive specific messages with a high probability.
[0004] Another data transmission protocol is the Kademlia protocol. Kademlia is a DHT (Distributed Hash Table) technology primarily used to build dynamic node management and routing mechanisms in P2P applications. Kademlia boasts key characteristics such as efficiency, scalability, fault tolerance, and decentralization. In Kademlia, each node has a fixed 160-bit ID, typically a random number generated using a hash function. Kademlia uses an XOR operation to calculate the distance between two node IDs; a smaller distance indicates closer nodes. Each node maintains a routing table containing a series of "K-buckets," each representing a list of nodes within a specific distance range. When a node wants to find data corresponding to a specific key, it first searches its routing table for the node closest to the target key. The search process is iterative, with each iteration attempting to narrow down the search by querying nodes closer to the target key. During the search, if the node storing the target key's data is found, its information is returned; otherwise, a set of information about the nodes closest to the target key is returned. Data is stored on a single node, where the distance between the node's ID and the data's key, obtained through an XOR operation, is minimized. When a new node joins the network, it joins by contacting any known node and updating its routing table. When a node leaves the network, its stored data must be migrated to other nodes to prevent data loss. The Kademlia protocol is a very powerful tool widely used in modern P2P networks, especially in scenarios requiring high scalability and decentralization.
[0005] However, traditional blockchain systems typically only incorporate the Gossip protocol, which incurs high overhead and redundancy on larger networks. Utilizing the Kademila protocol to pull block data instead of traditional Gossip-based broadcasting can effectively improve the efficiency of block data transmission and synchronization.
[0006] To improve the overall performance of a blockchain P2P environment, nodes in the blockchain are typically divided into master nodes and slave nodes, each responsible for different business logic. Master nodes often undertake special tasks, such as advanced governance functions, instant transaction confirmation, and private transaction processing. They need to remain online for extended periods to ensure network stability and reliability. Master nodes usually require higher hardware resources, such as larger storage space and faster processors. Slave nodes, on the other hand, are only responsible for storing a complete copy of the entire blockchain, verifying all transactions, helping to propagate new transactions and blocks to maintain the integrity of the blockchain, and providing lightweight access services. Therefore, slave nodes consume fewer resources and are suitable for mobile devices or resource-constrained environments.
[0007] However, when there are a large number of transactions in a blockchain system, simply dividing it into master nodes and slave nodes still results in the problem of excessive load on individual nodes. By further dividing the node types, the functions of each node can be further distributed while ensuring the eventual consistency of data across the entire network, thus preventing a single node from impacting the overall throughput of the system due to excessive load.
[0008] Therefore, based on the above issues, we need sharded blockchain systems and their blockchain data synchronization and transmission methods. Summary of the Invention
[0009] The purpose of this invention is to provide a sharded blockchain system and its blockchain data synchronization and transmission method. By introducing sharding technology and implementing division of labor for different node types, and combining the Kademila protocol and the Gossip protocol, the transmission and synchronization efficiency of transaction data and block data can be effectively improved while reducing network load, thereby effectively improving the throughput of the blockchain system and solving the problems mentioned in the background art.
[0010] To achieve the above objectives, the present invention provides the following technical solution:
[0011] Sharded blockchain system: A sharded blockchain system is divided into a master node layer, a slave node layer, and a client layer from top to bottom. The master node layer consists of nodes that participate in the generation of blockchain blocks. They are divided into n groups according to their owners and correspond one-to-one with each shard of the slave node layer. The slave node layer consists of nodes that do not participate in the generation of blockchain blocks. They are responsible for receiving transaction data sent by the client layer and sending the transaction data to the corresponding master node in the master node layer. Other slave nodes in the same shard and slave nodes in other shards are also included. The slave nodes in the slave node layer are mainly divided into the following four types:
[0012] Ordinary Nodes (ON): Responsible for propagating transaction data and block data within their respective shards, thereby completing data synchronization within the shard;
[0013] Cross-Shard Transport Node (CZN): The cross-shard transport node is responsible for communicating with cross-shard transport nodes in other shards to complete cross-shard data synchronization;
[0014] Cross-level transport node (CLN): The cross-level transport node is responsible for communicating with the master node corresponding to the master node layer, thereby completing cross-level data synchronization;
[0015] Faulty Nodes (FN): Faulty nodes occasionally appear in the blockchain network. These nodes cannot participate in the normal operation of the system and can only work normally after being repaired.
[0016] To prevent faulty nodes from affecting the blockchain system, a sharded blockchain system has multiple ordinary nodes (ON), cross-shard transmission nodes (CZN), and cross-level transmission nodes (CLN).
[0017] As a further aspect of the present invention: the client layer consists of various electronic devices connected to the blockchain network, and a client device sends transaction data to the blockchain network by connecting to a regular node.
[0018] Another object of the present invention is:
[0019] A method for synchronizing and transmitting blockchain data in a sharded blockchain system is provided, specifically including block data synchronization and transaction data synchronization. The block data synchronization includes the following steps: A master node needs to be randomly selected from the master node layer to complete the block generation work within several block production cycles and synchronize the generated blocks to the entire blockchain network. To ensure that a unique block-producing node can be elected under randomness requirements, a verifiable random function (VRF) is introduced. Each master node... Where n represents the nth group, and i represents the i-th element in that group, each based on its own private key. Hash value of the previous block that has already reached consensus t-1 Where t represents the current block cycle, and the generator generates its own random number for the current block cycle. and proof Then give your public key Node identifier and The broadcast is sent to other master nodes, which will then utilize it. and verify The authenticity of the data, and retain the largest number of verified results. Ultimately the largest The corresponding master node is then elected as the new block-producing node.
[0020] As a further embodiment of the present invention, the transaction data synchronization includes the following steps: The client sends transaction data to the blockchain through the client-side device. Based on the number of client-side devices connected to each shard in the slave node layer, the device is automatically assigned to a shard with a smaller load. After the transaction data arrives at the shard, in addition to completing transaction synchronization within the shard using the Gossip protocol, the cross-shard transmission node within the shard will transmit the transaction data to other shards to achieve synchronization of the transaction data across all shards. The cross-level transmission node then transmits the transaction data to the master node in the corresponding master node layer. The transaction data is only transmitted from the cross-level transmission node in the slave node layer to the master node in the corresponding master node layer.
[0021] As a further embodiment of the present invention: while completing block synchronization, the master node in the master node layer transmits the block data to the cross-level transmission node in the slave node layer, and the cross-level transmission node uses the Gossip protocol to transmit the block data to other nodes in the same shard, thereby realizing block synchronization within the shard. The block data is only transmitted from the master node in the master node layer to the corresponding shard in the slave node layer.
[0022] Compared with the prior art, the beneficial effects of the present invention are:
[0023] 1. This invention utilizes the Kademila protocol at the master node layer to pull block data, replacing the traditional broadcasting based on the Gossip protocol, thereby improving the efficiency of block data transmission and synchronization.
[0024] 2. This invention uses fragmentation technology to group all nodes in the network, thereby reducing the amount of broadcast data on the network while ensuring the eventual consistency of data across the entire network.
[0025] 3. This invention further subdivides node types, distributing the functions of each node while ensuring the eventual consistency of data across the entire network, thus avoiding the impact of excessive load on the overall system throughput caused by a single node. Attached Figure Description
[0026] Figure 1 This is a system block diagram of a sharded blockchain system according to the present invention;
[0027] Figure 2 Flowchart of block data synchronization process;
[0028] Figure 3 Flowchart for transaction data synchronization. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] Sharded blockchain systems and their blockchain data synchronization and transmission methods, the architecture of the entire sharded blockchain system as follows: Figure 1 As shown, it is divided into a master node layer, a slave node layer and a client layer from top to bottom.
[0031] Master Node Layer: The master node layer consists of nodes participating in blockchain block generation. They are divided into n groups based on their ownership, and each group corresponds one-to-one with a shard in the slave node layer. After a block-producing node is elected according to specific election rules, this node is responsible for generating multiple consecutive blocks to improve the efficiency of the blockchain system, thereby reducing the impact of election time on system throughput. Once a block-producing node completes the packaging of a block, other nodes in the master node layer need to pull the latest block from it to achieve consensus in the entire blockchain system and distribute the block data to the corresponding shards in the slave node layer for storage.
[0032] Slave Node Layer: The slave node layer consists of nodes that do not participate in the generation of blockchain blocks. They are responsible for receiving transaction data sent by the client layer and sending the transaction data to the corresponding master node in the master node layer, other slave nodes in the same shard, and slave nodes in other shards. Slave nodes in the slave node layer are mainly divided into the following four types:
[0033] Normal Nodes (ON): Normal nodes (white nodes) are only responsible for propagating transaction data and block data within their respective shards, thereby completing data synchronization within the shard.
[0034] Cross-Shard Transport Node (CZN): The cross-shard transport node (blue node) is responsible for communicating with cross-shard transport nodes in other shards to complete cross-shard data synchronization.
[0035] Cross-level transport node (CLN): The cross-level transport node (green node) is responsible for communicating with the master node corresponding to the master node layer, thereby completing cross-level data synchronization.
[0036] Faulty Nodes (FN): Faulty nodes (orange nodes) occasionally appear in the blockchain network. These nodes cannot participate in normal system operation and can only function normally after being repaired. To avoid faulty nodes affecting the blockchain system, multiple nodes of the above three types are required.
[0037] Client Layer: The client layer consists of various electronic devices connected to the blockchain network, such as computers, smartphones, and smartwatches. These electronic devices can join or leave the network at any time. A client device needs to connect to a regular node to send transaction data to the blockchain network.
[0038] I. Block Data Synchronization
[0039] This process requires randomly selecting a master node from the master node layer to complete block generation for several block production cycles and synchronize the generated blocks to the entire blockchain network. To ensure the election of a unique block-producing node while maintaining randomness, this system introduces a VRF (Verifiable Random Function). Each master node... (where n represents the nth group and i represents the i-th element in that group) each according to its own private key Hash value of the previous block that has already reached consensus t-1 (t represents the current block cycle) Generate your own random number for the current block cycle. and proof Then give your public key Node identifier and Broadcast to other master nodes. Other master nodes will utilize... and verify The authenticity of the data, and retain the largest number of verified results. Ultimately the largest The corresponding master node is then elected as the new block-producing node.
[0040] In determining which master node generates the largest random number, for each larger random number that passes verification, the master node information corresponding to the previous largest random number is discarded, thus reducing storage overhead. Once a new block-producing node is generated, that master node will generate a new block based on the newly collected transaction data. t B. To ensure fairness at the master node layer, the number of nodes is typically quite large. This system utilizes the Kademlia protocol to enable other master nodes to pull blocks from the block-producing nodes. t Method B replaces the Gossip protocol, allowing block-producing nodes to push blocks to other master nodes. t Method B can reduce the amount of data transmitted over the network while quickly locating the block node.
[0041] In the master node layer, the master node, while completing block synchronization, also transmits block data to the cross-level transmission nodes in the slave node layer. These cross-level transmission nodes then use the Gossip protocol to transmit the block data to other nodes within the same shard, thus completing block synchronization within the shard. To reduce network overhead, block data is not transmitted across shards; it is only transmitted from the master node in the master node layer to the corresponding shard in the slave node layer. The block synchronization flowchart is as follows: Figure 2 As shown.
[0042] II. Transaction Data Synchronization
[0043] In this process, the client sends transaction data to the blockchain through its client-side device. Based on the number of client-side devices connected to each shard in the slave node layer, the device is automatically assigned to a shard with a lower load. Once the transaction data arrives at that shard, in addition to synchronizing the transaction within that shard using the Gossip protocol, the cross-shard transmission nodes within that shard transmit the transaction data to other shards, thus achieving synchronization of the transaction data across all shards. Finally, the cross-level transmission nodes transmit the transaction data to the master node in the corresponding master node layer. Similarly, to reduce network overhead, transaction data is not transmitted between master nodes in the master node layer; it is only transmitted to the master node in the corresponding master node layer by the cross-level transmission nodes in the slave node layer. The transaction synchronization flowchart is as follows: Figure 3 .
[0044] The Gossip protocol, by randomly broadcasting data to neighboring nodes, can quickly transmit data to all nodes in the network, achieving network-wide data synchronization. Traditional blockchain systems use the Gossip protocol to transmit and synchronize transaction and block data. While this ensures eventual consistency across the network, the typically large number of blockchain nodes leads to significant data redundancy. Furthermore, without sharding, the overall system load increases with the number of nodes in a blockchain network, causing a rapid decrease in throughput. Additionally, traditional blockchain systems only distinguish between master and slave nodes, resulting in high loads on some nodes and impacting overall system throughput.
[0045] This invention introduces sharding technology and assigns tasks to different node types, combining the Kademila and Gossip protocols to effectively improve the transmission and synchronization efficiency of transaction and block data while reducing network load, thereby effectively increasing the throughput of the blockchain system.
[0046] As will be apparent to those skilled in the art, the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Although this specification describes embodiments, not every embodiment contains only one technical solution. This descriptive method is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A sharded blockchain system, characterized in that, The sharded blockchain system is divided into a master node layer, a slave node layer, and a client layer from top to bottom. The master node layer is composed of nodes participating in the generation of blockchain blocks, which are divided into n groups according to different owners and correspond to each shard in the slave node layer. The slave node layer is composed of nodes that do not participate in the generation of blockchain blocks, which are responsible for receiving transaction data sent by the client layer and sending transaction data to the corresponding master nodes in the master node layer, other slave nodes in the same shard, and slave nodes in other shards. The slave nodes in the slave node layer are mainly divided into the following four types: Ordinary nodes (ON): responsible for propagating transaction data and block data in the shard to complete intra-shard data synchronization; Cross-shard transmission nodes (CZN): responsible for communicating with cross-shard transmission nodes in other shards to complete cross-shard data synchronization; Cross-level transmission nodes (CLN): responsible for communicating with the corresponding master nodes in the master node layer to complete cross-level data synchronization; Fault nodes (FN): occasionally appear in the blockchain network, which cannot participate in normal system operation and can only work normally after repair; To avoid the impact of fault nodes on the blockchain system, there are multiple ordinary nodes (ON), cross-shard transmission nodes (CZN), and cross-level transmission nodes (CLN) in the sharded blockchain system; The client layer is composed of various electronic devices connected to the blockchain network. A client device sends transaction data to the blockchain network by connecting to an ordinary node; Transaction data synchronization includes the following steps: the client sends transaction data to the blockchain through the device in the client layer, and according to the number of client layer devices connected to each shard in the slave node layer, the device is automatically assigned to a shard with less load. After the transaction data arrives in the shard, in addition to using the Gossip protocol to complete transaction synchronization within the shard, the cross-shard transmission nodes in the shard will transmit the transaction data to other shards to achieve synchronization of all shards to the transaction data, and the cross-level transmission nodes will transmit the transaction data to the corresponding master nodes in the master node layer. Transaction data is only transmitted by cross-level transmission nodes in the slave node layer to the corresponding master nodes in the master node layer; The master nodes in the master node layer complete block synchronization at the same time, transmit block data to cross-level transmission nodes in the slave node layer, and use the Gossip protocol to transmit block data to other nodes within the shard by cross-level transmission nodes, achieving intra-shard block synchronization. Block data is only transmitted by master nodes in the master node layer to the corresponding shards in the slave node layer.
2. The blockchain data synchronization and transmission method of the sharded blockchain system, according to claim 1, wherein, Specifically, it includes block data synchronization: The block data synchronization includes the following steps: A master node needs to be randomly selected from the master node layer to complete the block generation work within several block production cycles and synchronize the generated blocks to the entire blockchain network. To ensure that a unique block-producing node can be elected under the random requirement, a verifiable random function (VRF) is introduced. Each master node... ,in Representing the Group, Representing the first in this group Each one, based on its own private key The hash value of the previous block that has already reached consensus. ,in Representing the current block cycle, it generates its own random number for this block cycle. and proof Then give your public key Node identifier , and The broadcast is sent to other master nodes, which will then utilize it. and verify The authenticity of the data, and retain the largest number of verified results. Ultimately the biggest The corresponding master node is then elected as the new block-producing node.
Citation Information
Patent Citations
Hybrid consensus method based on fragmentation technology
CN110570202A
Block chain fragmentation method for spectrum transaction
CN116963077A