A method and system for byzantine consensus based on authenticated network coding and adaptive propagation
By dividing the blockchain into clusters based on physical institutions and employing a certified network coding and adaptive propagation method, the bandwidth bottleneck and algebra pollution problems of blockchain consensus algorithms are solved, achieving an efficient and secure consensus process that is suitable for scenarios such as financial clearing and cross-border supply chain management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHWESTERN POLYTECHNICAL UNIV
- Filing Date
- 2026-03-25
- Publication Date
- 2026-05-15
AI Technical Summary
Existing blockchain consensus algorithms suffer from problems such as master node bandwidth bottlenecks, high communication complexity, and algebraic pollution attacks in large-scale wide area network deployments. In particular, cross-domain bandwidth is expensive and the topology is not effectively utilized in consortium blockchains.
The consortium blockchain nodes are divided into clusters according to their physical affiliation. The authentication network coding and adaptive propagation methods are adopted. Through backbone network unicast, intra-cluster multicast and aggregate signature technology, efficient data transmission and anti-pollution verification are achieved, communication complexity is reduced and the security of network coding is improved.
It significantly reduces the bandwidth load on the master node, reduces cross-domain traffic, prevents algebra pollution attacks, improves the scalability and robustness of the consensus system, and adapts to different network environments.
Smart Images

Figure CN121907623B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of distributed computing, blockchain underlying architecture, network communication, and applied cryptography, and particularly relates to a Byzantine consensus method and system based on authenticated network coding and adaptive propagation. Background Art
[0002] With the rapid development of blockchain technology, consortium blockchains, as a key infrastructure for building a trusted value transfer network in multi-party collaboration scenarios, have been widely applied in inter-bank clearing, cross-border supply chain management, e-government data sharing, and other fields. In these scenarios, the consensus algorithm is the cornerstone to ensure that nodes scattered in different geographical locations and distrusting each other can reach consistency on the state of the distributed ledger.
[0003] Currently, traditional BFT algorithms represented by the Practical Byzantine Fault Tolerance (PBFT) protocol, although theoretically able to tolerate malicious node attacks of no more than one-third of the total number of system nodes (f < N / 3) and ensure the security and liveness of the system, have exposed severe scalability bottlenecks in large-scale wide-area network deployments. The specific manifestations are as follows:
[0004] Firstly, the bandwidth bottleneck problem of the primary node is becoming increasingly prominent. In the Pre-Prepare stage of consensus, the primary node is responsible for broadcasting block proposals containing a large amount of transaction data to all secondary nodes in the whole network. In the traditional point-to-point (P2P) unicast or simple broadcast mode, the uplink bandwidth of the primary node bears a linear load of O(N). As the number of nodes N increases or the block volume increases (such as expanding to 2MB or larger), the network interface of the primary node is extremely likely to reach the throughput limit and become a congestion point for the whole network communication. This will lead to a significant increase in the proposal distribution delay, and even frequently trigger ViewChange due to timeout, seriously reducing the availability of the system.
[0005] Secondly, the communication complexity in the consensus stage explodes. In the core Prepare and Commit stages, the standard PBFT protocol requires each node to broadcast signed voting messages to the other N - 1 nodes in the whole network. This full-mesh communication mode causes the total amount of messages in the network to grow quadratically with the number of nodes ( ). In the consortium blockchain environment, nodes are usually distributed in data centers belonging to different institutions, and the cross-institution wide-area network bandwidth resources are expensive and have high latency. A large number of signature packets will exhaust the bandwidth of the cross-domain link in a short time, triggering a "broadcast storm", resulting in serious packet queuing, jitter, and loss.
[0006] Furthermore, existing solutions often overlook the inefficient propagation caused by physical topology. Existing optimization schemes, such as the propagation mechanism based on the Gossip protocol, while distributing instantaneous bandwidth pressure across multiple nodes, suffer from suboptimal message propagation paths due to their random propagation characteristics. This results in significant long-tail latency, meaning the time it takes for the last few nodes to receive data is unpredictable, thus slowing down the overall consensus-building process. More importantly, the Gossip protocol fails to recognize the inherent "multi-center, multi-organization" topology of consortium blockchains, potentially leading to nodes within the same organization repeatedly requesting data from the external network, resulting in costly cross-domain bandwidth waste.
[0007] To address bandwidth efficiency issues, academia has proposed using network coding, particularly random linear network coding (RLNC), to replace traditional store-and-forward mechanisms. Network coding allows intermediate nodes to algebraically mix data packets, thereby improving throughput. However, directly applying network coding to Byzantine fault-tolerant consensus faces significant security challenges: pollution attacks. In a Byzantine environment, malicious nodes can intentionally inject tampered, erroneous fragments during the coding process. Due to the algebraic nature of network coding, an erroneous coded fragment, after being re-encoded and mixed by intermediate nodes, will rapidly pollute all the mixed data packets, causing the entire data batch decoded by the receiver to be completely corrupted. This "avalanche effect" not only prevents the receiver from recovering the data but also wastes a significant amount of computational resources on ineffective decoding operations. Traditional defense methods (such as zero-knowledge proofs or homomorphic signatures) have excessive computational overhead, making it difficult to meet the real-time requirements of high-frequency blockchain transactions.
[0008] In conclusion, the industry urgently needs an innovative consensus system that deeply integrates with the organizational structure of consortium blockchains. This system should possess the following characteristics: the ability to utilize network coding technology to reduce communication complexity from... Dimensionality reduction; it can effectively defend against Byzantine pollution attacks with low computational cost; most importantly, it can perceive the physical topology of the consortium blockchain and eliminate the bandwidth bottleneck of the master node and reduce the overall network message overhead through the strategy of "intra-cluster aggregation and efficient inter-cluster propagation". Summary of the Invention
[0009] The purpose of this invention is to solve the problems of expensive physical bandwidth across institutions, communication message storms, and algebra pollution attacks unique to network coding environments. It proposes a Byzantine consensus method and system based on authentication network coding and adaptive propagation.
[0010] The technical solution of this invention is as follows: Firstly, a Byzantine consensus method based on authentication network coding and adaptive propagation, comprising the following steps:
[0011] Based on the physical affiliation of the consortium blockchain nodes, the entire network of nodes is divided into multiple clusters. Each cluster contains a aggregation node and several ordinary nodes, and the aggregation nodes of each cluster constitute the backbone network.
[0012] During the Pre-Prepare phase, the block proposal generated by the master node of the current view is sent to the aggregation nodes of each cluster via unicast through the backbone network;
[0013] The block proposal is divided into multiple source fragments by the aggregation nodes of each cluster. Each source fragment is digitally signed to generate an authentication source symbol. The authentication source symbol is linearly combined using network coding technology to generate an encoded packet, and the encoded packet is broadcast to the ordinary nodes in the cluster.
[0014] In response to the encoded packet, ordinary nodes within the cluster accumulate linearly independent packets through rank detection. When the decoding matrix is full rank, the authentication source symbol is recovered by Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. If the verification passes, a local voting message is generated and sent to the cluster's aggregation node.
[0015] In response to local voting messages, each cluster aggregation node uses aggregation signature technology to generate a cluster certificate representing the consensus state of the cluster, and exchanges cluster certificates among aggregation nodes through the backbone network. When the cumulative node weight represented by the cluster certificates collected by the aggregation nodes meets the preset consensus threshold, a global Byzantine consensus is achieved.
[0016] The beneficial effects of this invention are:
[0017] 1. This invention addresses the algebraic contamination attacks and avalanche effects unique to Randomized Linear Network Coding (RLNC) by designing a fine-grained source-end authentication mechanism. Unlike traditional erasure coding which only performs hash verification on data blocks, this invention requires the source node (master node or sink node) to first divide the original data into k source fragments before encoding and mixing. Each source fragment and its index are then independently digitally signed using an asymmetric encryption private key, encapsulating them into "authenticated source symbol" atomic units. Subsequent linear combination operations in the network coding are performed only on these authenticated atomic units. After decoding and recovering the source fragments, the receiving node uses the public key to batch verify the signature carried by each fragment. This mechanism ensures that even if intermediate nodes perform re-encoding and mixing, the receiving end can accurately identify which source symbol has been tampered with, effectively blocking the spread of contamination and solving the problem of existing technologies being unable to defend against algebraic contamination.
[0018] 2. Addressing the challenges of physical organization-based distribution and expensive cross-domain bandwidth in consortium blockchains, this invention strictly divides the network into clusters based on physical data centers, with each cluster corresponding to one organization. During backbone network transmission in the Pre-Prepare phase, the master node unicasts complete blocks to the aggregation nodes of each organization solely via the internet backbone leased line. This reduces the master node's transmission load from O(N) to O(m) (where m is the number of organizations), significantly mitigating the uplink bandwidth bottleneck on the wide area network. In edge network transmission, after receiving the block, the aggregation node acts as the encoding source within the cluster, utilizing the high bandwidth and low latency of the organization's local area network to slice the block using network coding and multicast it within the cluster. This strategy achieves physical isolation between expensive cross-domain traffic and inexpensive intra-domain traffic, significantly outperforming propagation schemes based on logical reputation clustering. During the aggregation exchange in the Prepare and Commit phases, ordinary nodes only send voting messages to the aggregation node within their own cluster. The aggregation node utilizes BLS aggregation signature technology to compress multiple signatures collected within the cluster into a single "cluster certificate," which is exchanged only within the core backbone network comprised of aggregation nodes. This strategy reduces the overall network communication complexity from... Dimensional reduction .
[0019] 3. This invention abandons the inefficient "full data point-to-point copying" model of traditional consensus mechanisms. The sending node utilizes network coding techniques (such as RLNC or RS erasure coding) to map the data payload to be agreed upon (such as block proposals) into algebraic symbol vectors and generate encoded packets containing coding coefficients and combined data. The receiving node does not need to collect specific data packet sequences; it only needs to accumulate the number of linearly independent encoded packets received locally to reach the original fragment number k (i.e., full rank of the decoding matrix) to reconstruct the original data in one go using Gaussian elimination. This mechanism transforms the reliability guarantee of data propagation from "retransmitting specific lost packets" to "transmitting arbitrary redundant packets," significantly reducing transmission latency in weak network environments by utilizing forward error correction (FEC) characteristics.
[0020] 4. This invention collects Quality of Service (QoS) indicators of inter-cluster and intra-cluster links in real time according to a preset sampling period, including packet loss rate and round-trip time jitter. It employs an incremental PID (proportional-integral-derivative) control algorithm to dynamically adjust the redundancy parameter r (the ratio of the total number of encoded packets n to the original number of fragments k) of network coding within a preset upper and lower limit range based on real-time network conditions. When network quality deterioration is detected, the proportion of redundant encoded packets generated is automatically increased, trading space for time to reduce the risk of consensus timeouts caused by ARQ (Average Retransmission Request).
[0021] Secondly, a Byzantine consensus system based on authentication network coding and adaptive propagation includes:
[0022] The first module is used to divide the entire network of nodes into multiple clusters based on the physical affiliation of the consortium blockchain nodes. Each cluster contains a aggregation node and several ordinary nodes, and the aggregation nodes of each cluster constitute the backbone network.
[0023] The second module is used to send the block proposal generated by the master node of the current view to the aggregation node of each cluster via unicast through the backbone network during the Pre-Prepare stage.
[0024] The third module is used to divide the block proposal into multiple source fragments through the aggregation nodes of each cluster, digitally sign each source fragment to generate an authentication source symbol, use network coding technology to linearly combine the authentication source symbols to generate an encoding packet, and broadcast the encoding packet to the ordinary nodes in the cluster.
[0025] The fourth module is used to respond to the encoded packet. Ordinary nodes in the cluster accumulate linearly independent packets through rank detection. When the decoding matrix is full rank, the authentication source symbol is recovered by Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. If the verification is successful, a local voting message is generated and sent to the cluster's aggregation node.
[0026] The fifth module is used to respond to local voting messages. Each cluster aggregation node uses aggregation signature technology to generate a cluster certificate representing the consensus state of the cluster, and exchanges cluster certificates between aggregation nodes through the backbone network. When the cumulative node weight represented by the cluster certificates collected by the aggregation nodes meets the preset consensus threshold, a global Byzantine consensus is achieved.
[0027] Thirdly, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
[0028] Fourthly, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to perform the method as described in the first aspect. Attached Figure Description
[0029] Figure 1 The diagram shows a flowchart of a Byzantine consensus method based on authentication network coding and adaptive propagation.
[0030] Figure 2 The diagram shown is an overall hardware and software architecture block diagram of the Byzantine consensus system provided in this embodiment of the invention, which details the interaction and logical connection of the five core modules: consensus engine, network coding, propagation orchestration, cryptography, and network monitoring.
[0031] Figure 3The diagram shown is a timing diagram of hierarchical voting aggregation and certificate exchange provided in an embodiment of the present invention, which is used to demonstrate the interactive process of "intra-cluster unicast voting - aggregation node aggregation - backbone network certificate exchange - distribution of global proof" in the Prepare / Commit phase.
[0032] Figure 4 The diagram shown is a data processing flowchart of the "sign first, then encode" authentication message primitive in an embodiment of the present invention, which details the specific steps of source-side slicing, signing, splicing, and finite field encoding generation.
[0033] Figure 5 The diagram shows a detailed algorithm flowchart for incremental decoding, rank detection, batch verification, and anomaly handling performed by the receiving node in this embodiment of the invention. Detailed Implementation
[0034] Exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the drawings are merely exemplary and are intended to illustrate the principles and spirit of the invention, and are not intended to limit the scope of the invention.
[0035] Example 1:
[0036] like Figure 1 As shown, a Byzantine consensus method based on authentication network coding and adaptive propagation includes the following steps:
[0037] S1. Based on the physical affiliation of the consortium blockchain nodes, the entire network of nodes is divided into multiple clusters. Each cluster contains a aggregation node and several ordinary nodes. The aggregation nodes of each cluster constitute the backbone network.
[0038] S2. In the Pre-Prepare phase, the block proposal generated by the master node of the current view is sent to the aggregation node of each cluster via unicast through the backbone network;
[0039] S3. The block proposal is divided into multiple source fragments through the aggregation nodes of each cluster. Each source fragment is digitally signed to generate an authentication source symbol. The authentication source symbol is linearly combined using network coding technology to generate an encoded packet, and the encoded packet is broadcast to the ordinary nodes in the cluster.
[0040] S4. In response to the encoded packet, ordinary nodes in the cluster accumulate linearly independent packets through rank detection. When the decoding matrix is full rank, the authentication source symbol is recovered by Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. If the verification is successful, a local voting message is generated and sent to the cluster's aggregation node.
[0041] S5. In response to the local voting message, each cluster aggregation node uses aggregation signature technology to generate a cluster certificate representing the consensus state of the cluster, and exchanges cluster certificates among the aggregation nodes through the backbone network. When the cumulative node weight represented by the cluster certificates collected by the aggregation nodes meets the preset consensus threshold, a global Byzantine consensus is achieved.
[0042] In this embodiment, a cross-institutional consortium blockchain network environment will be constructed. This environment simulates a typical supply chain finance or interbank clearing scenario, consisting of three physically isolated data centers belonging to different stakeholders. For ease of detailed explanation, the system will be configured to contain seven computer nodes, denoted as N0 to N6. Figure 2 As shown, the propagation orchestration module is a key component for realizing the "hierarchical topology awareness" of this invention, acting as the system's routing brain. During the logical topology initialization phase, this module reads the genesis configuration file and, based on the nodes' institutional affiliation and strictly according to their physical institutional affiliation and network location, logically divides the seven nodes into three predefined "clusters." Specifically, cluster A represents core banking institutions, containing nodes N0, N1, and N2; cluster B represents a logistics enterprise alliance, containing nodes N3 and N4; and cluster C represents regulatory agencies, containing nodes N5 and N6. Within each cluster, based on the nodes' computing power, bandwidth resources, or rotation rules, one node is automatically elected or designated as the aggregation node, while the remaining nodes are ordinary nodes. This diagram illustrates the software module composition and interaction relationships within a single blockchain node, used to explain the functional division and data flow logic, rather than to limit the physical connection methods or logical topology structure between all network nodes. In this embodiment, N0 is set as the aggregation node of cluster A and also serves as the network's master node in this round of views; N3 is the aggregation node of cluster B; and N5 is the aggregation node of cluster C. This topology constructs a clear two-tier physical distribution model, aiming to minimize expensive cross-domain bandwidth consumption and maximize inexpensive intra-domain bandwidth utilization: The first tier is the backbone network, composed of the aggregation nodes (N0, N3, N5) of each cluster, interconnected via high-bandwidth, low-latency TCP long connections, dedicated to cross-organizational large-block data transmission and aggregated certificate exchange, forming the core layer of the network; the second tier is the edge network, referring to the local area network composed of nodes within a cluster (such as between N3 and N4), typically possessing extremely high internal bandwidth and extremely low latency, utilizing UDP multicast or efficient unicast protocols for rapid propagation of network-encoded data packets. The propagation orchestration module maintains a global routing table, clearly defining routing rules such as "ordinary nodes only communicate with the aggregation nodes of their own cluster" and "cross-cluster communication must be relayed through the aggregation nodes," thereby physically isolating broadcast storms.
[0043] at the same time, Figure 2The network monitoring module shown is not merely a passive data collector, but rather the control center for the system's adaptive capabilities. Running continuously as a background daemon, it periodically (e.g., every second or every 10 block cycles) probes the service quality of inter-cluster backbone links and intra-cluster edge links. It focuses on monitoring two key metrics: packet loss rate, by sending ICMP echo requests or monitoring the ACK confirmation time of TCP connections. And round-trip time jitter. To avoid frequent parameter jumps caused by instantaneous network fluctuations, the monitoring module uses an exponentially weighted moving average (EWMA) filter to smooth the collected data. This module incorporates an incremental PID (proportional-integral-derivative) controller, forming a closed-loop feedback control system. Its calculation logic is as follows: Let the preset target packet loss rate threshold be... (For example, 1%), the current measured packet loss rate after smoothing is... Then the current error value The controller operates according to the formula. Calculate control output ,in , and These are the proportional, integral, and derivative coefficients, which are preset based on prior knowledge of the network environment. The system's network coding service module will then use the PID output... The redundancy coefficient r is dynamically adjusted. For example, when the internal packet loss rate of cluster B increases from 1% to 5%, the PID controller outputs a positive value, instructing the encoding module to increase the redundancy coefficient r from the default 1.2 to 1.4. This means that for 100 original slices, the system will generate 140 encoded packets. This dynamic adjustment strategy ensures that even during network fluctuations, the receiving node can still collect enough linearly independent packets with a high probability, thereby avoiding the latency caused by expensive ARQ retransmission requests and achieving robustness by "trading space for time".
[0044] In this embodiment, the hierarchical consensus lifecycle timeline is as follows: based on the above architecture and topology, Figure 3This invention illustrates the layered communication and aggregation interaction mode employed in the Prepare and Commit phases using a time-series diagram, clearly describing the data flow logic from proposal generation to final submission. The cluster division and node role information in this diagram are maintained at runtime by the propagation orchestration module and exist as a logical configuration within the system, rather than relying on the explicit topology representation in the accompanying drawings. In this embodiment, it is assumed that the master node N0 initiates a block proposal B containing 2000 transactions and a size of 2MB. The consensus process logically begins in the Pre-Prepare phase. Unlike traditional PBFT, the master node (which is also the aggregation node N0 of cluster A) does not directly broadcast the block to the entire network, as this would cause instantaneous uplink bandwidth saturation for the master node in a wide area network. Instead, N0 uses the routing table of the propagation orchestration module to identify peer nodes in the backbone network—aggregation node N3 of cluster B and aggregation node N5 of cluster C. N0 sends a proposal containing the complete block data B and a pre-prepared message header (including view v, sequence number n, and digest d) via a backbone TCP connection, unicasting it to N3 and N5. This step reduces the master node's sending load from O(N) related to the total number of nodes to O(m) related to the number of clusters. In this embodiment, N0 only needs to send 2 copies instead of 6, significantly saving backbone bandwidth.
[0045] like Figure 3 As shown, after the Pre-Prepare phase is completed, each aggregation node (N0, N3, N5), having received the complete block and performed preliminary hash verification, initiates a data distribution and verification process within its respective cluster, providing the preconditions for the subsequent voting aggregation phase. Each aggregation node acts as a "distribution source" within its cluster, initiating an "encoded multicast" process to convert the block into a series of network encoded packet streams and distribute them rapidly. Ordinary nodes within the cluster (such as N4 and N6) receive and decode the block to verify its legitimacy, thereby completing the local confirmation of the proposal content.
[0046] After ordinary nodes complete block verification, the system enters the Prepare phase. At this point, to avoid the "broadcast storm" common in traditional consensus mechanisms, ordinary nodes (such as N4 in cluster B), after generating a signed voting message, no longer broadcast it to the entire network. Instead, following hierarchical routing rules, they send the vote only to the aggregation node (N3) within their cluster via a secure unicast channel. Aggregation node N3 maintains a pool of votes and a bitmap locally. Once N3 has collected votes from cluster members (including itself), it uses BLS (Boneh-Lynn-Shacham) aggregation signature technology to compress multiple independent BLS signatures into a single aggregated signature. Subsequently, N3 constructs a constant-size "cluster certificate" containing the cluster ID, a bitmap indicating the participating voting nodes, and the aggregated signature.
[0047] Aggregate nodes N0, N3, and N5 exchange the aforementioned cluster certificates on the backbone network. When any aggregate node collects certificates from different clusters, and the cumulative node weight represented by these certificates exceeds two-thirds of the total node weight of the entire network (equivalent to 5 equally weighted nodes in this example), a global Prepare consensus is reached, and a corresponding global proof is generated and distributed to the cluster members.
[0048] The Commit phase is isomorphic to the Prepare phase in terms of communication mode and aggregation logic, and also adopts... Figure 3 The diagram illustrates a hierarchical process: "intra-cluster unicast voting—aggregation at aggregation nodes—backbone network certificate exchange." This design significantly reduces the overall network communication complexity from O(N²) to O(m²) + O(N), giving the system exceptional horizontal scalability.
[0049] In this embodiment, the sending end adopts a "sign first, then encode" data processing flow, specifically as follows:
[0050] To defend against Byzantine pollution attacks in network coding environments and ensure the integrity and non-repudiation of decoded data, each aggregation node strictly adheres to the following principles when distributing data within the cluster: Figure 3 The diagram illustrates the "sign first, then encode" message primitive processing flow. This flow is completed through close collaboration between the network coding service module and the cryptography service module.
[0051] like Figure 4 As shown, the data processing at the sending end (taking the aggregation node N3 as an example) involves the following detailed steps. The first step is data slicing. N3 divides the original block B, which is 2MB in size, into k original vectors of fixed size. In this embodiment, k=100, so the size of each original vector is approximately 20KB. To prevent replay attacks and out-of-order attacks, the system assigns a unique index i (from 1 to 100) to each slice.
[0052] Next comes the source signature stage, which is the core of the security of this invention. N3 calls the cryptographic service module, using its asymmetric encryption private key. (e.g., secp256k1 private key) for each original vector Digitally sign it and its index i to generate a signature value. This step ensures that each tiny data slice carries the identity credentials of the source node and that its content cannot be tampered with.
[0053] Then, atomic splicing is performed. The original vector... Its corresponding signature value Byte-level concatenation is performed to form a new data unit called the "authentication source symbol", denoted as These 100 authentication source symbols constitute the basic atomic units for subsequent network coding operations.
[0054] Finally, there is the finite field encoding stage. The network coding module reads the current redundancy coefficient r from the PID controller output (assuming it is currently 1.2) and calculates the total number of encoded packets to be generated. For each encoding packet to be generated ( (from 1 to 120), modules in the Galois domain The above uses a pseudo-random number generator to generate a coefficient vector of length k. Then, perform linear combination operations to calculate... The dot product with the authentication source symbol vector group. The specific operation is as follows: All additions here are XOR operations, and multiplications are modular polynomial multiplication over finite fields. The final generated encoded packet... Includes coding coefficient vector and encoded payload It is then sent to the receiving end via UDP multicast.
[0055] In this embodiment, the incremental decoding and verification process at the receiving end is as follows:
[0056] As a receiving end, the processing logic of a regular node is as follows: Figure 5 As shown, this covers the complete algorithm flow from receiving data packets and performing algebraic operations to finally confirming the proposal. The example used is a normal node N4 receiving an encoded packet stream from N3.
[0057] like Figure 5 As shown, the receiver maintains a dynamic decoding matrix and data vector table in memory. The processing flow begins with reception and rank detection. Whenever the network interface receives an encoded packet... N4 first extracts the encoded coefficient vector carried in its header. N4 uses Gaussian elimination to... Perform row transformations with the row vectors in the current decoding matrix and check. Whether it is linearly independent of the existing rows in the matrix. If the transformed result is a vector of all zeros, it means that the information provided by the encoded packet is redundant (linearly dependent), and N4 discards it directly without further processing; if the transformed result is non-zero, it means that the packet provides new information (linearly independent), and N4 will... Insert the decoding matrix and the corresponding encoded payload. Store the data in a data vector table, and simultaneously increment the rank of the matrix by 1.
[0058] As encoded packets arrive, an incremental accumulation process is executed. N4 repeats the rank detection step described above until the rank of the decoding matrix reaches the original number of fragments k (i.e., 100, full rank). At this point, N4 immediately triggers the inverse matrix decoding operation. The system solves the linear equations... Recover k original authentication source symbols Because the operation is performed over a finite field, this process can accurately reconstruct the bitstream before encoding.
[0059] After decoding, the crucial anti-contamination batch verification step begins. N4 verifies each recovered authentication source symbol. The data is parsed and separated into slices of the original data. and the accompanying digital signature value N4 retrieves the public key of the aggregation node N3 from its local keystore. The 100 signatures are then batch-verified. The verification logic is divided into normal and abnormal paths. In the normal path, if all 100 signatures pass verification, it means the data was not contaminated during transmission and decoding, and N4 will slice all the data. By piecing together the data according to the index, the complete block B is restored. The hash digest is then calculated and compared with the Pre-Prepare message. Once confirmed to be correct, the state machine is driven to proceed to the next stage.
[0060] In abnormal paths, if N4 detects any signature verification failure or slice index mismatch, it determines that a pollution attack has occurred. This indicates that the aggregation node N3 is malicious, or that a man-in-the-middle has injected forged encoded packets into the network. In this case, N4 will not simply discard the data, but will package invalid authentication source symbols, corresponding encoding coefficients, and signatures to generate a cryptographically verifiable "fraud proof." N4 will prioritize sending this fraud proof to the master node N0 and other aggregation nodes in the backbone network. When ordinary nodes detect severe pollution from aggregation nodes or find that aggregation nodes refuse to forward their messages, the propagation orchestration module will temporarily switch routing strategies, activate backup P2P random neighbor node connections, and bypass the aggregation nodes to directly deliver the fraud proof to the backbone network. Honest aggregation nodes, upon receiving the fraud proof, will first verify whether the authentication source symbols, encoding coefficients, and signature contained within can reproduce the pollution result. Only after successful verification will the View Change process be triggered, and node role adjustments or view reconfiguration will be completed according to the system's preset security policy. N3 will be removed from the aggregation node list, and a new aggregation node for cluster B will be elected, thereby achieving system self-immunity and repair.
[0061] This invention abandons the inefficient "full data point-to-point copying" model of traditional consensus mechanisms and adopts a probabilistic data recovery mechanism based on Galois field algebraic operations. The sending node uses network coding techniques (such as RLNC or RS erasure coding) to map the data payload to be agreed upon (such as block proposals) into an algebraic symbol vector and generates coded packets containing coding coefficients and combined data. The receiving node does not need to collect specific data packet sequences; it only needs to accumulate the number of linearly independent coded packets received locally to reach the original fragment number k (i.e., full rank of the decoding matrix) to reconstruct the original data in one go using Gaussian elimination. This mechanism changes the reliability guarantee of data propagation from "retransmitting specific lost packets" to "transmitting arbitrary redundant packets," significantly reducing transmission latency in weak network environments by utilizing forward error correction (FEC) characteristics.
[0062] To address the challenges of consortium blockchain nodes being distributed across physical institutions and the high cost of cross-domain bandwidth, this invention strictly divides the network into several "clusters" based on physical data centers, with each cluster corresponding to one institution. Consensus communication employs a two-tiered distribution model: backbone unicast and edge multicast. In the backbone network transmission during the Pre-Prepare phase, the master node unicasts complete blocks to the aggregation nodes of each institution solely through a dedicated internet backbone line (TCP long connection). This reduces the master node's transmission load from O(N) to O(m) (where m is the number of institutions), significantly mitigating the uplink bandwidth bottleneck on the wide area network. In edge network transmission, after receiving the block, the aggregation node acts as the encoding source within the cluster, utilizing the high bandwidth and low latency of the institution's local area network (LAN) to slice the block using network coding and multicast it within the cluster. This strategy achieves physical isolation between expensive cross-domain traffic and inexpensive intra-domain traffic, significantly outperforming propagation schemes based on logical reputation clustering. During the aggregation exchange in the Prepare and Commit phases, ordinary nodes only send voting messages to the aggregation node within their own cluster. The aggregation node utilizes BLS aggregation signature technology to compress multiple signatures collected within the cluster into a single "cluster certificate," which is exchanged only within the core backbone network comprised of aggregation nodes. This strategy reduces the overall network communication complexity from... Dimensional reduction .
[0063] To address the algebraic contamination attacks and avalanche effects unique to Randomized Linear Network Coding (RLNC), this invention designs a fine-grained source-end authentication mechanism. Unlike traditional erasure coding which only performs hash verification on data blocks, the source node (master node or sink node) of this invention must first divide the original data into k source fragments before encoding and mixing the data. Each source fragment and its index are then independently digitally signed using an asymmetric encryption private key, encapsulating them into "authenticated source symbol" atomic units. Subsequent linear combination operations of the network coding are performed only on these authenticated atomic units. After decoding and recovering the source fragments, the receiving node uses the public key to batch verify the signature carried by each fragment. This mechanism ensures that even if intermediate nodes perform re-encoding and mixing, the receiving end can accurately identify which source symbol has been tampered with, thereby effectively blocking the spread of contamination and solving the problem that existing technologies cannot defend against algebraic contamination.
[0064] The system of this invention has a built-in network monitoring module that collects quality of service (QoS) metrics for inter-cluster and intra-cluster links in real time, including packet loss rate, round-trip time (RTT), and jitter. The system employs an incremental PID (proportional-integral-derivative) control algorithm to dynamically adjust the redundancy parameter r (the ratio of the total number of encoded packets n to the original number of fragments k) of network coding based on real-time network conditions. When network quality deterioration is detected, the system automatically increases the proportion of redundant encoded packets generated, trading space for time to reduce the risk of consensus timeouts caused by retransmission requests (ARQ).
[0065] This invention constructs a coding-enhanced physical layered consensus architecture, decoupling the underlying data transmission from the upper-layer consensus logic. Utilizing anti-pollution authentication network coding technology and a bandwidth cost-aware hierarchical propagation strategy, it achieves significant improvements in communication efficiency, scalability, robustness, and environmental adaptability of the consensus system without sacrificing Byzantine fault tolerance. This invention is particularly suitable for scenarios such as financial clearing and cross-border supply chain management, where nodes have clearly defined physical affiliations and the network environment exhibits characteristics of "wide area network backbone interconnection and high throughput within local area networks." It aims to solve core technical problems such as expensive cross-institutional physical bandwidth, communication message storms, and algebraic pollution attacks unique to network coding environments.
[0066] Example 2:
[0067] Based on Example 1, this embodiment of the invention provides a Byzantine consensus system based on authentication network coding and adaptive propagation, which can be used to implement the Byzantine consensus method based on authentication network coding and adaptive propagation as described in the foregoing embodiments. The system includes:
[0068] The first module is used to divide the entire network of nodes into multiple clusters based on the physical affiliation of the consortium blockchain nodes. Each cluster contains a aggregation node and several ordinary nodes, and the aggregation nodes of each cluster constitute the backbone network.
[0069] The second module is used to send the block proposal generated by the master node of the current view to the aggregation node of each cluster via unicast through the backbone network during the Pre-Prepare stage.
[0070] The third module is used to divide the block proposal into multiple source fragments through the aggregation nodes of each cluster, digitally sign each source fragment to generate an authentication source symbol, use network coding technology to linearly combine the authentication source symbols to generate an encoding packet, and broadcast the encoding packet to the ordinary nodes in the cluster.
[0071] The fourth module is used to respond to the encoded packet. Ordinary nodes in the cluster accumulate linearly independent packets through rank detection. When the decoding matrix is full rank, the authentication source symbol is recovered by Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. If the verification is successful, a local voting message is generated and sent to the cluster's aggregation node.
[0072] The fifth module is used to respond to local voting messages. Each cluster aggregation node uses aggregation signature technology to generate a cluster certificate representing the consensus state of the cluster, and exchanges cluster certificates between aggregation nodes through the backbone network. When the cumulative node weight represented by the cluster certificates collected by the aggregation nodes meets the preset consensus threshold, a global Byzantine consensus is achieved.
[0073] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.
[0074] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the Byzantine consensus method based on authentication network coding and adaptive propagation as described in Embodiment 1 above.
[0075] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the Byzantine consensus method based on authentication network coding and adaptive propagation as described in Embodiment 1 above.
[0076] In an exemplary embodiment, the computer program product includes a computer program that, when executed by a processor, implements the Byzantine consensus method based on authentication network coding and adaptive propagation as described in Embodiment 1 above.
[0077] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0078] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0079] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0080] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0081] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0082] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A Byzantine consensus method based on authentication network coding and adaptive propagation, characterized in that, Includes the following steps: Based on the physical affiliation of the consortium blockchain nodes, the entire network of nodes is divided into multiple clusters. Each cluster contains a aggregation node and several ordinary nodes, and the aggregation nodes of each cluster constitute the backbone network. During the Pre-Prepare phase, the block proposal generated by the master node of the current view is sent to the aggregation nodes of each cluster via unicast through the backbone network; The block proposal is divided into multiple source fragments by the aggregation nodes of each cluster. Each source fragment is digitally signed to generate an authentication source symbol. Network coding technology is used to linearly combine the authentication source symbols to generate an encoded packet, which is then broadcast to the ordinary nodes within the cluster. Specifically: Divide the block proposal into k Original fragments ;in, Indicates the index of each original fragment; Using asymmetric encryption private key For each original fragment Digital signatures are generated by digitally signing the index and generating a signature value. ; Original fragments With the corresponding signature value Perform byte-level concatenation to obtain the authentication source symbol. Construct authentication source symbol vector group ; Generate a coding coefficient vector of length k. Calculate the coding coefficient vector The dot product of the authentication source symbol vector group yields the encoded payload. ; Encoding coefficient vector and encoded payload Integrate and generate encoding package and the encoded packet The broadcast is sent to the regular nodes within the cluster; In response to the encoded packet, ordinary nodes within the cluster accumulate linearly independent packets through rank detection. When the decoding matrix is full rank, the authentication source symbol is recovered by Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. If the verification passes, a local voting message is generated and sent to the cluster's aggregation node. In response to local voting messages, each cluster aggregation node uses aggregation signature technology to generate a cluster certificate representing the consensus state of the cluster, and exchanges cluster certificates among aggregation nodes through the backbone network. When the cumulative node weight represented by the cluster certificates collected by the aggregation nodes meets the preset consensus threshold, a global Byzantine consensus is achieved.
2. The Byzantine consensus method based on authentication network coding and adaptive propagation according to claim 1, characterized in that, The method for dividing the entire network of nodes into multiple clusters based on the physical affiliation of the consortium blockchain nodes is as follows: Clustering is performed based on the geographical location of the physical institution or data center to which the nodes belong, grouping nodes belonging to the same institution or the same local area network environment into the same cluster; The election of the aggregation node adopts a round-robin mechanism or a weighted election mechanism based on the node reputation value. The aggregation node has cross-cluster communication capabilities, while ordinary nodes only have intra-cluster communication capabilities and the ability to communicate with the aggregation node of their own cluster.
3. The Byzantine consensus method based on authentication network coding and adaptive propagation according to claim 1, characterized in that, In response to the encoded packet, ordinary nodes within the cluster accumulate linearly independent packets through rank detection. When the decoding matrix reaches full rank, the authentication source symbol is recovered using Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. After successful verification, a local voting message is generated and sent to the cluster's aggregation node. The specific method is as follows: For each received encoded packet Extracting the coding coefficient vector Using Gaussian elimination to Perform row transformations on the row vectors in the current decoding matrix to determine the coding coefficient vector. Linear correlation with the row vectors of the current decoding matrix; If linearly correlated, discard the encoded packet. No further processing will be performed. If linearly independent, then the coding coefficient vector will be... Insert the decoding matrix and encode the payload. Store the data in a data vector table and increment the rank of the matrix by 1; when the rank of the matrix reaches k, solve the system of linear equations. Recover k original authentication source symbols ; For the recovered authentication source symbol The original fragments were analyzed and separated. and the corresponding digital signature value Then, batch verification of anti-pollution is performed. After the verification is passed, a local voting message is generated and sent to the aggregation node of this cluster.
4. The Byzantine consensus method based on authentication network coding and adaptive propagation according to claim 3, characterized in that, The verification logic for batch verification of pollution prevention is divided into normal path and abnormal path; Under normal circumstances, all digital signature values are verified and all original fragments are concatenated by index to restore the complete block proposal; In abnormal paths, if digital signature value verification fails or the original shard index does not match, a pollution attack is determined to have occurred. An invalid authentication source symbol, the corresponding encoding coefficient vector, and the digital signature value are packaged by ordinary nodes to generate a cryptographically verifiable fraud proof, which is then sent to the master node or other aggregation node in the backbone network. The master node or other aggregation node verifies the fraud proof. If the verification is successful, a node role adjustment or view reconfiguration process is triggered, and the node marked as malicious is removed from the consensus group.
5. The Byzantine consensus method based on authentication network coding and adaptive propagation according to claim 1, characterized in that, In response to local voting messages, each cluster aggregation node generates a cluster certificate representing the consensus state of the cluster using aggregate signature technology, and exchanges cluster certificates among aggregation nodes through the backbone network. When the cumulative node weights represented by the cluster certificates collected by the aggregation nodes meet a preset consensus threshold, the global Byzantine consensus is achieved as follows: In response to local voting messages, each cluster aggregation node maintains a voting pool and bitmap to be aggregated locally. After collecting votes from each node in the cluster, it uses BLS threshold aggregation signature technology to compress multiple independent signatures into a single aggregate signature. Construct a cluster certificate of constant size, which includes the cluster ID, a bitmap of participating voting nodes, and an aggregate signature; Aggregation nodes exchange cluster certificates in the backbone network. When any aggregation node collects a cluster certificate representing more than two-thirds of the total node weight in the entire network, a global consensus is reached, a global proof is generated, and it is distributed to members within the cluster.
6. The Byzantine consensus method based on authentication network coding and adaptive propagation according to claim 1, characterized in that, The method further includes a QoS-driven adaptive redundancy adjustment step, specifically: The link quality indicators of the backbone network and intra-cluster network are monitored in real time according to the preset sampling period. The link quality indicators include packet loss rate and round-trip time jitter. An exponentially weighted moving average filter is used to smooth the link quality index, and the error between the smoothed link quality index and the preset target threshold is calculated. The error value is input into a preset incremental PID controller to calculate the control output. : in, , and These are the proportional coefficient, integral coefficient, and differential coefficient, respectively. This represents the error value between the smoothed link quality index and the preset target threshold. Represents the integral variable; The redundancy coefficient is dynamically adjusted within a preset range based on the control output.
7. A Byzantine consensus system based on the Byzantine consensus method of authentication network coding and adaptive propagation according to any one of claims 1-6, characterized in that, include: The first module is used to divide the entire network of nodes into multiple clusters based on the physical affiliation of the consortium blockchain nodes. Each cluster contains a aggregation node and several ordinary nodes, and the aggregation nodes of each cluster constitute the backbone network. The second module is used to send the block proposal generated by the master node of the current view to the aggregation node of each cluster via unicast through the backbone network during the Pre-Prepare stage. The third module is used to divide the block proposal into multiple source fragments through the aggregation nodes of each cluster, digitally sign each source fragment to generate an authentication source symbol, use network coding technology to linearly combine the authentication source symbols to generate an encoding packet, and broadcast the encoding packet to the ordinary nodes in the cluster. The fourth module is used to respond to the encoded packet. Ordinary nodes in the cluster accumulate linearly independent packets through rank detection. When the decoding matrix is full rank, the authentication source symbol is recovered by Gaussian elimination. Based on the authentication source symbol, anti-pollution batch verification is performed. If the verification is successful, a local voting message is generated and sent to the cluster's aggregation node. The fifth module is used to respond to local voting messages. Each cluster aggregation node uses aggregation signature technology to generate a cluster certificate representing the consensus state of the cluster, and exchanges cluster certificates between aggregation nodes through the backbone network. When the cumulative node weight represented by the cluster certificates collected by the aggregation nodes meets the preset consensus threshold, a global Byzantine consensus is achieved.
8. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method according to any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.