Efficient block propagation relay protocol fly chain protocol construction method

Through FLsketch algorithm compression and difference analysis, the data transmission path of the blockchain network is optimized, which solves the transmission efficiency and stability problems of the existing protocol in complex network environments and realizes efficient and accurate block data synchronization.

CN120658803APending Publication Date: 2025-09-16HUNAN UNIV OF SCI & TECH SANYA RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510784676.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing block propagation protocols have limitations in transmission efficiency, security, and latency. In particular, it is difficult to achieve fast and accurate data synchronization in complex network environments, and there is redundant data transmission and additional computing overhead.

Method used

The FLsketch algorithm is used for block data compression and difference analysis. By sending transaction IDs, requesting transaction data, compressing transaction data, decoding and integrating block data, combined with intelligent optimization algorithms and dynamic adjustment strategies, the data transmission path is optimized, bandwidth consumption is reduced and transmission stability is improved.

Benefits of technology

It achieves efficient block data transmission, reduces bandwidth consumption and redundant data transmission, improves transmission efficiency and protocol robustness, and ensures fast and accurate synchronization in complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658803A_ABST
    Figure CN120658803A_ABST
Patent Text Reader

Abstract

The invention discloses an efficient block propagation relay protocol fly chain protocol construction method, which ensures the success of block propagation and effectively reduces the bandwidth consumption by efficiently compressing block data. An improved data filter is adopted, efficient data compression is achieved, and therefore the data transmission process is optimized. The block data is converted into the optimal propagation format by utilizing difference set calculation and a unique decoding method, so that a receiver can accurately restore the required data, and the propagation efficiency is improved. And meanwhile, an intelligent optimization algorithm and a dynamic adjustment strategy are fused, and the system can adaptively adjust a propagation strategy for different network environments by sharing computing resources, so that the robustness and the stability of the protocol are further improved. Precise modeling is carried out on a block propagation process, and an optimal transmission path of data is calculated based on an efficient coding method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a method for constructing an efficient block propagation relay protocol, the Feilian protocol. Background Art

[0002] Block propagation protocols play a crucial role. Different protocols optimize network performance by balancing transmission efficiency, security, and latency. For example, the Erlay protocol, through its low-latency and low-bandwidth design, maintains nearly constant bandwidth as the number of node connections increases. However, its batch propagation approach results in higher transaction latency. The Shrec protocol, by combining hybrid hash coding and low-fan-out flooding, improves transmission efficiency while balancing propagation latency and computational cost. However, these protocols still have limitations in terms of implementation complexity, computational resource consumption, dynamic adaptability, and network load balancing. The Perigee protocol optimizes the network structure by designing an adaptive topology for heterogeneous nodes, but frequent topology adjustments can lead to decreased system stability. The XThin protocol compresses block space and improves propagation efficiency through Bloom filters and a transaction round-trip mechanism, but this may increase transmission latency in poor network conditions. The CompactBlock protocol reduces network costs through a high-low bandwidth model, but missing transaction requests can affect performance. The Txilm protocol reduces bandwidth requirements through short transaction hashes, but this may introduce additional latency and computational overhead. The Graphene protocol achieves efficient reconciliation and reduces bandwidth requirements by using Bloom filters and Invertible Bloom Lookup Tables (I BLTs), but in some cases, decoding failures may increase transmission overhead.

[0003] Therefore, an efficient and reliable protocol is needed that optimizes bandwidth utilization and reduces redundant data transmission while ensuring a low false alarm rate, thereby accelerating data synchronization. This protocol should provide precise data reconciliation capabilities, avoid additional communication overhead, and improve transmission stability, ensuring fast and accurate synchronization even in complex network environments. Summary of the Invention

[0004] The purpose of the present invention is to solve the above problems and design an efficient block propagation relay protocol Feilian protocol construction method.

[0005] To achieve the above-mentioned purpose, the technical solution of the present invention is that, further, in the above-mentioned efficient block propagation relay protocol Feilian protocol construction method, the block propagation relay protocol Feilian protocol construction method includes the following steps:

[0006] The sender sends all transaction IDs contained in the block to the receiver as an inv message, where the inv message includes a summary of the transactions contained in the block.

[0007] After receiving the i nv message, the receiver sends a getdata message to the sender and requests the transaction data in the block;

[0008] The sender compresses the transaction data using the FLsketch algorithm to obtain compressed transaction data, and sends the compressed transaction data to the recipient;

[0009] The recipient receives the compressed transaction data and uses FLsketch's set difference analysis algorithm to calculate the difference between its own memory pool data and the compressed transaction data, identify the existing transactions in the recipient's memory pool and the new transactions in the block, and determine the actual difference;

[0010] The receiver decodes the newly added transaction data, verifies the Merkle root in the block header, and integrates the parsed transaction data into its own block to complete block synchronization.

[0011] Furthermore, in the above-mentioned method for constructing the efficient block propagation relay protocol Flychain protocol, the FLsketch algorithm includes:

[0012] FLsketch consists of m buckets, each bucket contains b slots, and each slot includes three fields: CARRY field, G field, and Flag field;

[0013] The CARRY field is used to store part of the fingerprint, including the remainder and quotient; the G field is used to record the divisor of the transaction and store metadata; the Fl ag field is used to identify whether the slot stores the remainder or the quotient;

[0014] In the initial state, the values ​​of the CARRY field and the G field are initialized to -1, and the Flag field is initialized to 0, indicating that the slot is empty.

[0015] Furthermore, in the above-mentioned method for constructing the efficient block propagation relay protocol Flychain protocol, the FLsketch algorithm further includes:

[0016] For the element x to be inserted, FLsketch determines the candidate storage location by calculating the remainder of the hash value and generates two candidate bucket locations;

[0017] If the remainder of the element can be stored in the quotient index bucket, or its quotient can be stored in the remainder index bucket, then the element can be successfully inserted;

[0018] FLsketch adopts a kick-and-redistribute strategy. When both candidate buckets are full, the system randomly kicks out an existing quotient or remainder and moves it to the spare bucket;

[0019] If a backup bucket conflicts, the system continues to perform the kickout operation until a free position is found or the preset insertion attempt limit is reached.

[0020] Furthermore, in the above-mentioned method for constructing the efficient block propagation relay protocol Feilian protocol, the method of calculating the difference between the own memory pool data and the compressed transaction data using the set difference analysis algorithm of FLsketch includes:

[0021] For two transaction sets A and B, FLsketch provides union, difference, and intersection operations to complete transaction synchronization. FLsketch also includes compression, difference, and decoding operations.

[0022] Furthermore, in the above-mentioned method for constructing the efficient block propagation relay protocol Feilian protocol, the method of calculating the difference between the own memory pool data and the compressed transaction data using the set difference analysis algorithm of FLsketch further includes:

[0023] For two input FLsketch data structures DX A With DX B Perform consistency verification. If its capacity parameter DX A .capacity and DX B .capacity is inconsistent, or its bucket size parameter DX A .bucket_size and DX B If .bucket_size is inconsistent, the algorithm execution is terminated immediately and an exception message is thrown;

[0024] Set up a mapping structure called other_elements to temporarily store the elements from the reference DX B All valid data elements and their corresponding bucket indexes;

[0025] Traverse each bucket in the reference FLsketch, and for each bucket i∈[0,m-1], further process the element pair (carry_b, flag_b) in each slot;

[0026] When carry_b≠-1 is satisfied, the slot is considered as valid data, and the corresponding element and its bucket number iii are stored in the other_elements mapping structure.

[0027] Furthermore, in the above-mentioned method for constructing the efficient block propagation relay protocol Feilian protocol, the method of calculating the difference between the own memory pool data and the compressed transaction data using the set difference analysis algorithm of FLsketch further includes:

[0028] Target DX APerform traversal operation, also for each bucket i∈[0,m-1] and each slot j∈[0,b-1] in the bucket, read the element pair (carry_a,flag_a) in the slot;

[0029] When carry_a≠-1 is satisfied and the element pair has a match in the other_elements mapping structure, it means that the element appears in both FLsketches and is considered redundant data;

[0030] Empty the corresponding slot, that is, DX A .buckets[i][j]=(-1,-1), and DX A .siz value minus 1;

[0031] Finish processing all buckets and slots and return to the updated FLsketchDX A , which has been excluded from DX B The repeated part is used to obtain the purified data set.

[0032] Furthermore, in the above-mentioned efficient block propagation relay protocol Feilian protocol construction method, the block propagation relay protocol Feilian protocol construction method further includes the following steps:

[0033] When the receiver's memory pool data is incomplete, the receiver detects the intersection of its own memory pool data and the sender's block data, inserts the intersection into the FLsketch data structure, and sends it to the sender;

[0034] After receiving the RC, the sender performs a set difference analysis based on its own block data and the RC to calculate the receiver's missing transaction data;

[0035] The sender compresses the missing transaction data using the FLsketch data structure and transmits the compressed data to the receiver;

[0036] The recipient decodes and extracts the missing transaction data, verifies the Merkle root consistency, and integrates the missing transaction data into the local block data.

[0037] Furthermore, in a system for implementing the above-mentioned efficient block propagation relay protocol Feilian protocol construction method, the system includes the following modules:

[0038] A data sending module, configured for the sender to send all transaction IDs contained in a block as an inv message to a receiver, wherein the inv message includes a summary of the transactions contained in the block;

[0039] The data receiving module is used for the receiver to send a getdata message to the sender after receiving the inv message and request the transaction data in the block;

[0040] The data compression module is used by the sender to compress the transaction data using the FLsketch algorithm to obtain compressed transaction data, and then send the compressed transaction data to the recipient;

[0041] The data decompression module is used by the receiver to receive the compressed transaction data, calculate the difference between its own memory pool data and the compressed transaction data using FLsketch's set difference analysis algorithm, identify the existing transactions in the receiver's memory pool and the new transactions in the block, and determine the actual difference;

[0042] The data verification module is used by the receiver to decode the newly added transaction data, verify the Merkle root in the block header, and integrate the parsed transaction data into its own block to complete block synchronization.

[0043] Furthermore, in a system for implementing the above-mentioned efficient block propagation relay protocol Feilian protocol construction method, the system includes the following submodules:

[0044] Verification submodule, used to verify the two input FLsketch data structures DX A With DX B Perform consistency verification. If its capacity parameter DX A .capacity and DX B .capacity is inconsistent, or its bucket size parameter DX A .bucket_size and DX B If .bucket_size is inconsistent, the algorithm execution is terminated immediately and an exception message is thrown;

[0045] Set up a submodule to set up a mapping structure called other_elements, which is used to temporarily store the reference DX B All valid data elements and their corresponding bucket indexes;

[0046] The traversal submodule is used to traverse each bucket in the reference FLsketch. For each bucket i∈[0,m-1], the element pair (carry_b,flag_b) in each slot is further processed.

[0047] The storage submodule is used to treat the slot as valid data when carry_b≠-1 is satisfied, and store the corresponding element and its bucket number iii in the other_elements mapping structure.

[0048] Furthermore, in a system for implementing the above-mentioned efficient block propagation relay protocol Feilian protocol construction method, the system includes the following submodules:

[0049] Read submodule for target DX A Perform traversal operation, also for each bucket i∈[0,m-1] and each slot j∈[0,b-1] in the bucket, read the element pair (carry_a,flag_a) in the slot;

[0050] The judgment submodule is used to determine that when carry_a≠-1 is satisfied and the element pair has a matching item in the other_elements mapping structure, it indicates that the element appears in both FLsketches and is considered redundant data;

[0051] Set the submodule to clear the corresponding slot content, that is, DX A .buckets[i][j]=(-1,-1), and DX A .siz value minus 1;

[0052] Exclude submodules to complete all bucket and slot processing and return to the updated FLsketch DX A , which has been excluded from DX B The repeated part is used to obtain the purified data set.

[0053] Its beneficial effect is that the protocol ensures the success of block propagation and effectively reduces bandwidth consumption by efficiently compressing block data. An improved data filter is used to achieve efficient data compression, thereby optimizing the data transmission process. By using difference set calculation and a unique decoding method, the block data is converted to the optimal propagation format, so that the receiver can accurately restore the required data and improve the propagation efficiency. At the same time, the present invention integrates intelligent optimization algorithms and dynamic adjustment strategies. By sharing computing resources, the system can adaptively adjust the propagation strategy for different network environments, further improving the robustness and stability of the protocol. In addition, the idea of ​​data set reconciliation in this scheme accurately models the block propagation process and calculates the optimal transmission path of the data based on an efficient coding method. By conducting a series of comparative experiments and performance evaluations in a large-scale blockchain network environment, the feasibility and effectiveness of the present invention have been verified, the efficiency of block propagation has been significantly improved, and the consumption of system resources has been reduced, so that the blockchain network can maintain stable and efficient operation in a high-concurrency environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.

[0055] Figure 1 This is a schematic diagram of a first embodiment of a method for constructing a Feilian protocol, an efficient block propagation relay protocol, in an embodiment of the present invention;

[0056] Figure 2 It is a block propagation relay protocol Feilian protocol 1 in a method for constructing a high-efficiency block propagation relay protocol Feilian protocol in an embodiment of the present invention;

[0057] Figure 3 It is a block propagation relay protocol Feilian Protocol 2 in a method for constructing a Feilian Protocol, an efficient block propagation relay protocol in an embodiment of the present invention;

[0058] Figure 4 This is a schematic diagram comparing propagation overhead in a method for constructing a Feilian protocol, an efficient block propagation relay protocol, in an embodiment of the present invention;

[0059] Figure 5 This is a schematic diagram showing a comparison of propagation overhead in the case of missing transactions in a method for constructing the Feilian protocol, an efficient block propagation relay protocol in an embodiment of the present invention;

[0060] Figure 6 This is a schematic diagram comparing fast propagation delays in a method for constructing a Feilian protocol, an efficient block propagation relay protocol, in an embodiment of the present invention;

[0061] Figure 7 This is a schematic diagram comparing the propagation delay of transactions missing in the Feilian protocol construction method of an efficient block propagation relay protocol in an embodiment of the present invention;

[0062] Figure 8 This is a schematic diagram comparing the number of transaction false positives in a method for constructing a Feilian protocol, an efficient block propagation relay protocol, in an embodiment of the present invention;

[0063] Figure 9 This is a schematic diagram comparing the number of false positives of missing transactions in a method for constructing a Feilian protocol, an efficient block propagation relay protocol, in an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0065] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0066] Example 1

[0067] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 As shown, an efficient block propagation relay protocol Feilian protocol construction method, the block propagation relay protocol Feilian protocol construction method includes the following steps:

[0068] Step 101: The sender sends all transaction IDs contained in the block to the receiver as an inv message. The inv message includes a summary of the transactions contained in the block.

[0069] Step 102: After receiving the inv message, the receiver sends a getdata message to the sender and requests the transaction data in the block;

[0070] Step 103: The sender compresses the transaction data using the FLsketch algorithm to obtain compressed transaction data, and sends the compressed transaction data to the recipient.

[0071] Specifically, in this embodiment, FLsketch consists of m buckets, each bucket contains b slots, and each slot includes three fields: CARRY field, G field, and Fl ag field;

[0072] The CARRY field is used to store part of the fingerprint, including the remainder and quotient; the G field is used to record the divisor of the transaction and store metadata; the Fl ag field is used to identify whether the slot stores the remainder or the quotient;

[0073] In the initial state, the values ​​of the CARRY field and the G field are initialized to -1, and the Flag field is initialized to 0, indicating that the slot is empty.

[0074] For the element x to be inserted, FLsketch determines the candidate storage location by calculating the remainder of the hash value and generates two candidate bucket locations;

[0075] If the remainder of the element can be stored in the quotient index bucket, or its quotient can be stored in the remainder index bucket, then the element can be successfully inserted;

[0076] FLsketch adopts a kick-and-redistribute strategy. When both candidate buckets are full, the system randomly kicks out an existing quotient or remainder and moves it to the spare bucket;

[0077] If a backup bucket conflicts, the system continues to perform the kickout operation until a free position is found or the preset insertion attempt limit is reached.

[0078] Step 104: The recipient receives the compressed transaction data and uses FLsketch's set difference analysis algorithm to calculate the difference between its own memory pool data and the compressed transaction data, identify the existing transactions in the recipient's memory pool and the new transactions in the block, and determine the actual difference;

[0079] Specifically, in this embodiment, for two transaction sets A and B, FLsketch is used to provide union, difference, and intersection operations to complete transaction synchronization. FLsketch also includes compression, difference, and decoding operations.

[0080] For two input FLsketch data structures DX A With DX B Perform consistency verification. If its capacity parameter DX A .capacity and DX B .capacity is inconsistent, or its bucket size parameter DX A .bucket_size and DX B If .bucket_size is inconsistent, the algorithm execution is terminated immediately and an exception message is thrown;

[0081] Set up a mapping structure called other_elements to temporarily store the elements from the reference DX B All valid data elements and their corresponding bucket indexes;

[0082] Traverse each bucket in the reference FLsketch, and for each bucket i∈[0,m-1], further process the element pair (carry_b, flag_b) in each slot;

[0083] When carry_b≠-1 is satisfied, the slot is considered as valid data, and the corresponding element and its bucket number iii are stored in the other_elements mapping structure.

[0084] Target DX A Perform traversal operation, also for each bucket i∈[0,m-1] and each slot j∈[0,b-1] in the bucket, read the element pair (carry_a,flag_a) in the slot;

[0085] When carry_a≠-1 is satisfied and the element pair has a match in the other_elements mapping structure, it means that the element appears in both FLsketches and is considered redundant data;

[0086] Empty the corresponding slot, that is, DX A .buckets[i][j]=(-1,-1), and DX A .siz value minus 1;

[0087] Finish processing all buckets and slots and return to the updated FLsketchDX A , which has been excluded from DX B The repeated part is used to obtain the purified data set.

[0088] Step 105: The receiver decodes the newly added transaction data, verifies the Merkle root in the block header, and integrates the parsed transaction data into its own block to complete block synchronization.

[0089] Specifically, when the receiver's memory pool data is incomplete, the receiver detects the intersection of its own memory pool data and the sender's block data, inserts the intersection into the FLsketch data structure, and sends it to the sender;

[0090] After receiving the RC, the sender performs a set difference analysis based on its own block data and the RC to calculate the receiver's missing transaction data;

[0091] The sender compresses the missing transaction data using the FLsketch data structure and transmits the compressed data to the receiver;

[0092] The recipient decodes and extracts the missing transaction data, verifies the Merkle root consistency, and integrates the missing transaction data into the local block data.

[0093] Its beneficial effect is that the protocol ensures the success of block propagation and effectively reduces bandwidth consumption by efficiently compressing block data. An improved data filter is used to achieve efficient data compression, thereby optimizing the data transmission process. By using difference set calculation and a unique decoding method, the block data is converted to the optimal propagation format, so that the receiver can accurately restore the required data and improve the propagation efficiency. At the same time, the present invention integrates intelligent optimization algorithms and dynamic adjustment strategies. By sharing computing resources, the system can adaptively adjust the propagation strategy for different network environments, further improving the robustness and stability of the protocol. In addition, the idea of ​​data set reconciliation in this scheme accurately models the block propagation process and calculates the optimal transmission path of the data based on an efficient coding method. By conducting a series of comparative experiments and performance evaluations in a large-scale blockchain network environment, the feasibility and effectiveness of the present invention have been verified, the efficiency of block propagation has been significantly improved, and the consumption of system resources has been reduced, so that the blockchain network can maintain stable and efficient operation in a high-concurrency environment.

[0094] Example 2

[0095] FLsketch optimizes blockchain fast synchronization solution

[0096] The data synchronization and transmission problems in blockchain fast synchronization are solved through the following technical solutions, including the following modules: (1) an improved data structure FLsketch based on Cuckoo filter; (2) a difference set calculation and decoding algorithm that supports isomorphic data structures; (3) an optimized fast synchronization protocol based on the FL protocol of FLsketch.

[0097] First, FLsketch utilizes a specialized hashing mechanism to achieve efficient data transmission and decoding. Compared to traditional Bloom filters, FLsketch boasts a lower false positive rate, improving data transmission accuracy and reducing the probability of incorrect decoding during fast synchronization without relying on additional data transmission. Incorporating the structural characteristics of Cuckoo filters, FLsketch dynamically adjusts data storage, ensuring query efficiency while reducing storage overhead. Furthermore, its efficient hash mapping mechanism optimizes data deduplication in blockchain fast synchronization scenarios, accelerating data matching and transmission efficiency.

[0098] Secondly, FLsketch supports difference set calculation and decoding algorithms for isomorphic data structures to reduce reliance on complex data structures (such as I BLT). This method can efficiently calculate the differences between the data at both ends, and while reducing transmission redundancy, ensure the efficiency and accuracy of the synchronization process, thereby reducing the calculation and transmission overhead of data synchronization. During the difference set calculation process, FLsketch combines efficient bitmap indexing technology to quickly locate the data differences and uses efficient hash coding methods for data decoding, which greatly improves the reconciliation efficiency of synchronized data.

[0099] Third, the Feilian Protocol, designed based on FLsketch, optimizes the blockchain's fast synchronization process. The Feilian Protocol reduces the transmission burden of fast synchronization, while also minimizing data retransmissions and synchronization conflicts. Its efficient data reconciliation capabilities effectively improve blockchain verification efficiency and enhance network scalability. In its implementation, the Feilian Protocol employs a hierarchical data synchronization strategy, first rapidly verifying the global data structure and then gradually narrowing the scope of data discrepancies, achieving efficient synchronization with minimal computational and communication overhead. Furthermore, the Feilian Protocol leverages FLsketch's high-precision filtering capabilities to reduce redundant data transmission, thereby improving overall network performance and scalability.

[0100] First, FLsketch optimizes its hash storage structure, improving data storage and query efficiency and reducing data false positives, making it more adaptable to fast blockchain synchronization scenarios. FLsketch uses a dynamic Cuckoo hash table to evenly distribute data storage, thereby improving data matching accuracy. Its layered hashing strategy adapts to blockchain networks of varying data sizes, ensuring a stable and efficient synchronization process.

[0101] During data synchronization, FLsketch utilizes a hash-based difference calculation method to achieve rapid data reconciliation. Compared to traditional I BLT solutions, FLsketch can complete data decoding with lower computational complexity and reduces the need for additional data storage. FLsketch utilizes an efficient bit array encoding method, making the data difference calculation process more scalable and applicable to blockchain networks of varying sizes.

[0102] To address data synchronization conflicts in blockchain networks, the Feilian Protocol combines the FLsketch structure to optimize the fast synchronization process, reducing the redundant transmission of duplicate data while improving synchronization efficiency. In the protocol design, the Feilian Protocol adopts a hierarchical data filtering mechanism, performing global data structure matching at the beginning of synchronization, then gradually and accurately calculating the data differences and performing efficient verification through FLsketch, making the entire fast synchronization process more accurate and efficient.

[0103] Through the above optimization scheme, FLsketch combined with the Feilian protocol can significantly improve the performance of blockchain fast synchronization, reduce data transmission overhead, improve data consistency verification efficiency, and enhance the scalability of the blockchain network, making it suitable for large-scale decentralized application scenarios.

[0104] like Figure 2 As shown, a block propagation relay protocol solution provided by an embodiment of the present invention includes the following steps:

[0105] Step 1: The sender initializes the transaction ID synchronization

[0106] The sender sends all transaction IDs contained in the block to the receiver as an "inv" message. This message specifies the transaction summary contained in the block, helping the receiver understand the transaction information to be received.

[0107] Step 2: Receiver requests transaction data

[0108] After receiving the "i nv" message, the receiver sends a "getdata" message to the sender, specifically requesting the transaction data in the block. This request notifies the sender that the receiver is ready to receive the actual transaction data.

[0109] Step 3: Sender data is compressed and transmitted

[0110] The sender compresses the transaction data using the FLsketch algorithm. The compressed transaction data is inserted into the FLsketch data structure, which the sender then uses to send the compressed transaction information to the receiver.

[0111] Step 4: The receiver decompresses the data and performs difference analysis

[0112] The receiver receives the compressed FLsketch data and decompresses and reconstructs the transaction data using the built-in decoding and difference analysis algorithm (as shown in Algorithm 1). The receiver determines the actual difference by comparing the existing transactions in the memory pool with the received new transactions.

[0113]

[0114]

[0115] The specific calculation process of Algorithm 1 is as follows:

[0116] In order to realize the difference analysis between two FLsketch data structures, the following algorithm steps are proposed, which aim to remove the elements in the target FLsketch that are repeated with the reference FLsketch, thereby completing the difference extraction operation.

[0117] Step 1: Capacity and structure consistency check

[0118] First, the two input FLsketch data structures DX A With DX B Perform consistency verification. If its capacity parameter DX A .capacity and DX B .capacity is inconsistent, or its bucket size parameter DX A .bucket_size and DX B If .bucket_size is inconsistent, the algorithm execution is terminated immediately and an exception is thrown to ensure that subsequent operations are performed under the premise of structural matching.

[0119] Step 2: Initialize the reference element index structure

[0120] Set up a mapping structure called other_elements (which can be implemented as a hash dictionary) to temporarily store the elements from the reference FLsketch (ie DX B ) and their corresponding bucket indexes. This structure serves as an auxiliary basis for subsequent comparisons.

[0121] Step 3: Extract reference element information

[0122] Traverse each bucket (total m) in the reference FLsketch. For each bucket i∈[0,m-1], further process the element pair (carry_b, flag_b) in each slot. If carry_b≠-1, the slot is considered valid and the corresponding element and its bucket number iii are stored in the other_elements mapping structure.

[0123] Step 4: Perform target data difference comparison and cleaning

[0124] Target DX A Perform traversal operation, and for each bucket i∈[0,m-1] and each slot j∈[0,b-1] in the bucket, read the element pair (carry_a,flag_a) in the slot. When carry_a≠-1 is satisfied and the element pair has a match in the other_elements mapping structure, it means that the element appears in both FLsketch and is considered redundant data. At this time, the corresponding slot content is set to empty, that is, DX A .buckets[i][j]=(-1,-1), and DX A The .siz value is decremented by 1 to reflect the update in the number of valid elements.

[0125] Step 5: Output the differentiated target FLsketch

[0126] After finishing processing all buckets and slots, return to the updated FLsketchDX A , which has been excluded from DX B The repeated part is used to obtain the purified data set.

[0127] Parameter Description

[0128] m: The number of buckets in the FLsketch data structure.

[0129] b: The number of slots in each bucket.

[0130] carry_a, carry_b: represent the quotient of the slots in the target FLsketch and the reference FLsketch, respectively, representing the stored data identifier.

[0131] flag_a, flag_b: additional flag information bound to the corresponding quotient value.

[0132] DX A .buckets[i][j]: The j-th slot of the i-th bucket in the target FLsketch.

[0133] DX A .size: Indicates the total number of valid elements in the target FLsketch.

[0134] other_elements: A temporarily created auxiliary index mapping structure used to store valid element data from the reference FLsketch and its corresponding bucket number.

[0135] Step 5: Complete block synchronization

[0136] The receiver extracts the newly added transactions through a decoding algorithm (as shown in Algorithm 2) and verifies the Merkle root in the block header. The receiver integrates these newly added transactions into its own block. To achieve this verification, the receiver first reconstructs the complete Merkle tree using the decoded transaction data. Specifically, the receiver hashes all decoded transactions in a predetermined order and constructs a binary hash tree layer by layer from bottom to top until a root node hash value is generated. The receiver then compares the calculated root hash value with the Merkle root contained in the block header to confirm the integrity and correctness of the data transmission.

[0137] If the generated Merkle root differs from the value specified in the block header, this indicates that the transaction data may have been erroneous or lost during transmission or decoding. In this case, the receiver triggers a retransmission strategy: it sends a retransmission request to the sender, specifying the identifier of the transaction data to be retransmitted or the index of the bucket in which it resides. Upon receiving the retransmission request, the sender only needs to re-encode and transmit the specified portion, improving bandwidth utilization and avoiding full retransmission, thereby enhancing system robustness and transmission efficiency.

[0138]

[0139]

[0140] The specific calculation process of Algorithm 2 is as follows:

[0141] This embodiment provides a method for decoding data stored in a FLsketch structure, suitable for restoring the original data encoding value from the compressed storage structure. This method takes as input a FLsketch data structure containing m buckets, each containing n slots, and outputs a set of original data identification values ​​X.

[0142] Step 1: Calculation of the intermediate value η_t

[0143] First, for each slot unit in FLsketch, if the quotient (carry) in the slot is not -1, the intermediate value η_t is calculated based on its position index i, flag bit and carry value. The calculation method is as follows:

[0144]

[0145] Where i represents the bucket number to which the current slot belongs, m represents the total number of buckets in FLsketch, and flag is a flag that indicates the current slot number. If flag is not in {0,1}, the data is invalid and the system should terminate the operation and return an error message.

[0146] Step 2: Restoration of the original code value X

[0147] After the intermediate value η_t is calculated, the encoding value X of the original data is calculated according to the following formula: X = η_t + FLsketch.buckets[i][j].G*m*(m-1)

[0148] Where G is the element information, which is used to record the divisor of the mapping range of the original code and is used to distinguish elements in different batches or mapping ranges; m·(m-1) represents the span of a single perturbation group in the total coding space.

[0149] Each restored X value is written into the result array results in turn for use in subsequent operations such as difference identification, synchronous reconstruction, or storage restoration.

[0150] Parameter Description

[0151] m: the number of buckets in FLsketch

[0152] n: the number of slots in each bucket

[0153] i: the index of the bucket where the current slot is located

[0154] j: The jth slot of the i-th bucket in the target FLsketch.

[0155] Carry: The quotient value stored in the slot, representing a portion of the encoded element

[0156] fl ag: encoding direction flag bit, 0 or 1

[0157] G: Element information

[0158] η _t :fingerprint

[0159] X: The original data encoding value after restoration

[0160] results: Output array that stores all restored encoded values

[0161] When the memory pool is missing the synchronization of the transaction, protocol 2 will be performed, such as Figure 3 The following steps are shown:

[0162] Step 1: Detecting Incomplete Memory Pool When Protocol 1 fails to complete synchronization, the recipient detects that some transactions are missing from its memory pool. In this case, Protocol 2 is activated to identify and synchronize the missing transaction data, ensuring that the recipient can obtain complete block information.

[0163] Step 2: Generate intersection data and send

[0164] The receiver compares the transaction data in its memory pool with the transaction data in the sender's block, generating an intersection of the two. This intersection includes the transactions the receiver already holds, and the receiver sends this intersection to the sender. This data helps the sender identify the specific transactions the receiver is missing.

[0165] Step 3: The sender performs a difference calculation and transmits the missing transactions. After receiving the intersection data, the sender performs a difference calculation based on this data to identify the missing transactions from the receiver. The sender then compresses only the missing transactions using FLsketch and transmits them to the receiver over the network. This process ensures efficient use of network bandwidth, transmitting only the transaction data actually needed by the receiver.

[0166] Step 4: Receiver decodes and integrates missing transactions

[0167] After receiving the missing transaction data, the receiver obtains the FLskecth of the missing transaction and decodes the information in the missing transaction bucket obtained from the sketch. The value in the bucket is used to calculate the fingerprint value of the actual transaction. Using the fingerprint value and the element information G, the receiver completes x decoding and accurately extracts the missing transaction. The receiver integrates these transactions with its own block data. The receiver also verifies the Merkle root in the block header to ensure data consistency and integrity.

[0168] Step 5: Confirm the synchronization is complete

[0169] Once all missing transactions are successfully integrated, the receiver confirms that the block synchronization is complete. The receiver can choose to inform the sender that the synchronization is successful by sending a confirmation message. If necessary, the receiver can also trigger additional verification steps to ensure the correctness and integrity of the data.

[0170] Experimental results analysis:

[0171] This method was quantitatively compared with two other block relay protocols. To verify the overall performance of the proposed method, we used the evaluation criteria in

[15] . These metrics included fast propagation delay, total propagation overhead, and the number of false positive transactions.

[0172] like Figure 4 The figure shows the propagation cost (per KB) of three blockchain protocols—Graphene, Compact, and Flychain—under different block sizes and mempool transaction counts. When the block transaction size is 200, Flychain's propagation cost is significantly lower than the other two protocols, on average about 5 times lower than Compact and about 60% lower than Graphene. When the block transaction size is 2000, Flychain's propagation cost remains lower than Compact and about 40% lower than Graphene. When the block transaction size is 10,000, Flychain still has the lowest propagation cost, about 50% lower than Graphene. This cost advantage stems from Flychain's efficient FLsketch data structure, which supports set difference and decoding operations, avoiding the need for additional IBLT propagation, thereby significantly reducing propagation costs.

[0173] like Figure 5 Figure 2 shows the propagation costs (per KB) of three blockchain protocols—Graphene, Compact, and Feilian Protocol—under different transaction loss rates. When the number of block transactions is 200, as the transaction loss rate increases from 0 to 1, the propagation cost of the Feilian Protocol remains the lowest, approximately 5.5 times lower than the Compact Protocol and approximately 3 times lower than the Graphene Protocol. When the number of block transactions is 2,000, despite the increase in propagation cost, the Feilian Protocol still maintains the lowest cost, approximately 5.2 times lower than the Compact Protocol and approximately 1.9 times lower than the Graphene Protocol. When the number of block transactions is 10,000, the Feilian Protocol still has the lowest propagation cost, approximately 6 times lower than the Compact Protocol and approximately 2 times lower than the Graphene Protocol. This advantage stems from the fact that the Feilian Protocol only requires one propagation process when handling lost transactions, significantly reducing propagation overhead, further verifying its low-overhead advantage in fast propagation scenarios.

[0174] like Figure 6 Figure 2 shows the block propagation delay (in milliseconds) of the Flychain protocol and the Graphene protocol under different memory pool size conditions. When the block size is 200, the Flychain protocol has an average propagation delay of 3ms, which is about 10 times faster than the Graphene protocol's 37ms. When the block size is 2000, the Flychain protocol has a propagation delay of 15ms, while the Graphene protocol has a delay of 63ms, which is more than 4 times faster. When the block size is 10,000, the Flychain protocol's propagation delay is about half that of the Graphene protocol, and the speed advantage remains at about 2 times. This performance improvement is due to FLsketch's more efficient algorithm design. Compared with the traditional Bloom algorithm, its query speed is faster, thereby significantly reducing propagation delay.

[0175] like Figure 7The data shown in Figure 2 shows the average block propagation latency under the scenario of transaction loss. We also comprehensively compare the latency of three different block sizes and transaction loss rates. When the block size is 200, the Flychain protocol completes fast block synchronization in 10ms, while the Graphene protocol takes 33ms, making the Flychain protocol approximately three times faster than the Graphene protocol. When the block size increases to 2000, the Flychain protocol's propagation latency is 40ms, which is approximately two times faster than Graphene's 90ms. When the block size reaches 10,000, the Flychain protocol's latency remains significantly lower than Graphene even with a 10% transaction loss rate. When the transaction loss rate rises to 90%, the Flychain protocol's propagation latency is even about six times faster than Graphene. This significant latency advantage stems from FLsketch's efficient algorithm design, which enables data to be propagated in a single round trip, resulting in lower propagation latency across various transaction loss rates.

[0176] When using collective reconciliation for rapid propagation, false positives are a major challenge for probabilistic data structures. Reducing false positives is a key focus of collective reconciliation optimization, as it directly impacts the accuracy of block propagation. To address this issue, the Graphene protocol has implemented extensive optimization work.

[0177] like Figure 8 As shown in the figure, when the memory pool size is 200 and the block size is 200, the number of false alarms of the Feilian protocol and the Graphene protocol is similar, both in the single digit level; as the block size increases to 2000, the false alarm rates of the two protocols remain consistent overall; when the block size is further expanded to 10,000, the Feilian protocol shows a lower number of false alarms when the memory pool size is 20,000 and 35,000, but the overall false alarm rate is still close to Graphene.

[0178] like Figure 9 As shown in the figure, as the transaction missing rate increases, the number of false positives of the Feilian protocol remains lower than that of Graphene, stabilizing between 1 and 3 false positives. When the block size is 2000, the number of false positives of the Feilian protocol ranges from 7 to 400. When the block size reaches 10,000, the maximum number of false positives of the Feilian protocol is 1300, which still meets the requirements of block propagation. This shows that the Feilian protocol maintains a good ability to control false positives when dealing with transaction missing, and is always lower than the Graphene protocol, proving that our protocol can effectively meet the requirements of block propagation.

[0179] In summary, this proposal proposes an efficient blockchain relay protocol, the Feilian protocol, and verifies its performance through a series of experiments. Experimental results demonstrate that the Feilian protocol outperforms traditional Graphene and Compact protocols across multiple key metrics, particularly in terms of propagation cost, propagation delay, transaction loss rate, and false positive control. Especially when processing large blocks and high transaction loss rates, the Feilian protocol demonstrates significant performance advantages, with minimal propagation cost, significantly reduced propagation delay, and a low number of false positives. Furthermore, the Feilian protocol optimizes the propagation process through the efficient FLsketch data structure, avoiding additional IBLT propagation and significantly reducing propagation overhead.

[0180] Experiments conducted on different hardware configurations verified the protocol's real-time detection capabilities, demonstrating its strong competitiveness. The specific test equipment configuration was an Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz and an NVIDIA GeForce RTX 4090, further ensuring the reliability of the experiments.

[0181] In general, the Feilianxie protocol of this scheme performs well in block propagation. In practical applications, it can effectively improve block synchronization efficiency and reduce propagation costs. It also has good scalability and false alarm control capabilities, proving its great potential in rapid propagation scenarios.

[0182] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for constructing an efficient block propagation relay protocol, the Feilian protocol, characterized in that: The block propagation relay protocol Feilian protocol construction method includes the following steps: The sender sends all transaction IDs contained in the block to the receiver as an inv message, where the inv message includes a summary of the transactions contained in the block. After receiving the i nv message, the receiver sends a getdata message to the sender and requests the transaction data in the block; The sender compresses the transaction data using the FLsketch algorithm to obtain compressed transaction data, and sends the compressed transaction data to the recipient; The recipient receives the compressed transaction data and uses FLsketch's set difference analysis algorithm to calculate the difference between its own memory pool data and the compressed transaction data, identify the existing transactions in the recipient's memory pool and the new transactions in the block, and determine the actual difference; The receiver decodes the newly added transaction data, verifies the Merkle root in the block header, and integrates the parsed transaction data into its own block to complete block synchronization.

2. The method for constructing the efficient block propagation relay protocol Feilian protocol according to claim 1, characterized in that: The FLsketch algorithm includes: FLsketch consists of m buckets, each bucket contains b slots, and each slot includes three fields: CARRY field, G field, and Flag field; The CARRY field is used to store part of the fingerprint, including the remainder and quotient; the G field is used to record the divisor of the transaction and store metadata; the Fl ag field is used to identify whether the slot stores the remainder or the quotient; In the initial state, the values ​​of the CARRY field and the G field are initialized to -1, and the Flag field is initialized to 0, indicating that the slot is empty.

3. The method for constructing the efficient block propagation relay protocol Feilian protocol according to claim 1, characterized in that: The FLsketch algorithm also includes: For the element x to be inserted, FLsketch determines the candidate storage location by calculating the remainder of the hash value and generates two candidate bucket locations; If the remainder of the element can be stored in the quotient index bucket, or its quotient can be stored in the remainder index bucket, then the element can be successfully inserted; FLsketch adopts a kick-and-redistribute strategy. When both candidate buckets are full, the system randomly kicks out an existing quotient or remainder and moves it to the spare bucket; If a backup bucket conflicts, the system continues to perform the kickout operation until a free position is found or the preset insertion attempt limit is reached.

4. The method for constructing the efficient block propagation relay protocol Feilian protocol according to claim 1, characterized in that: The calculation of the difference between the own memory pool data and the compressed transaction data using the FLsketch set difference analysis algorithm includes: For two transaction sets A and B, FLsketch provides union, difference, and intersection operations to complete transaction synchronization. FLsketch also includes compression, difference, and decoding operations.

5. The method for constructing the efficient block propagation relay protocol Feilian protocol according to claim 1, characterized in that: The calculating the difference between the own memory pool data and the compressed transaction data by using the FLsketch set difference analysis algorithm also includes: For two input FLsketch data structures DX A With DX B Perform consistency verification. If its capacity parameter DX A .capacity and DX B .capacity is inconsistent, or its bucket size parameter DX A .bucket_size and DX B If .bucket_size is inconsistent, the algorithm execution is terminated immediately and an exception message is thrown; Set up a mapping structure called other_elements to temporarily store the elements from the reference DX B All valid data elements and their corresponding bucket indexes; Traverse each bucket in the reference FLsketch, and for each bucket i∈[0,m-1], further process the element pair (carry_b, flag_b) in each slot; When carry_b≠-1 is satisfied, the slot is considered as valid data, and the corresponding element and its bucket number iii are stored in the other_elements mapping structure.

6. The method for constructing the efficient block propagation relay protocol Feilian protocol according to claim 5, characterized in that: The calculating the difference between the own memory pool data and the compressed transaction data by using the FLsketch set difference analysis algorithm also includes: Target DX A Perform traversal operation, also for each bucket i∈[0,m-1] and each slot j∈[0,b-1] in the bucket, read the element pair (carry_a,flag_a) in the slot; When carry_a≠-1 is satisfied and the element pair has a match in the other_elements mapping structure, it means that the element appears in both FLsketches and is considered redundant data; Empty the corresponding slot, that is, DX A .buckets[i][j]=(-1,-1), and DX A .siz value minus 1; Finish processing all buckets and slots and return to the updated FLsketchDX A , which has been excluded from DX B The repeated part is used to obtain the purified data set.

7. The method for constructing an efficient block propagation relay protocol Feilian protocol according to claim 1, characterized in that: The block propagation relay protocol Feilian protocol construction method further includes the following steps: When the receiver's memory pool data is incomplete, the receiver detects the intersection of its own memory pool data and the sender's block data, inserts the intersection into the FLsketch data structure, and sends it to the sender; After receiving the RC, the sender performs a set difference analysis based on its own block data and the RC to calculate the receiver's missing transaction data; The sender compresses the missing transaction data using the FLsketch data structure and transmits the compressed data to the receiver; The recipient decodes and extracts the missing transaction data, verifies the Merkle root consistency, and integrates the missing transaction data into the local block data.

8. A system for implementing the method for constructing the efficient block propagation relay protocol Feilian protocol as claimed in claim 1, characterized in that: The system includes the following modules: A data sending module, configured for the sender to send all transaction IDs contained in a block as an inv message to a receiver, wherein the inv message includes a summary of the transactions contained in the block; The data receiving module is used for the receiver to send a getdata message to the sender after receiving the inv message and request the transaction data in the block; The data compression module is used by the sender to compress the transaction data using the FLsketch algorithm to obtain compressed transaction data, and then send the compressed transaction data to the recipient; The data decompression module is used by the receiver to receive the compressed transaction data, calculate the difference between its own memory pool data and the compressed transaction data using FLsketch's set difference analysis algorithm, identify the existing transactions in the receiver's memory pool and the new transactions in the block, and determine the actual difference; The data verification module is used by the receiver to decode the newly added transaction data, verify the Merkle root in the block header, and integrate the parsed transaction data into its own block to complete block synchronization.

9. A system for implementing the method for constructing an efficient block propagation relay protocol Flychain protocol as claimed in claim 1, characterized in that: The system includes the following submodules: Verification submodule for two input FLsketch data structures DX A With DX B Perform consistency verification. If its capacity parameter DX A .capacity and DX B .capacity is inconsistent, or its bucket size parameter DX A .bucket_size and DX B If .bucket_size is inconsistent, the algorithm execution is terminated immediately and an exception message is thrown; Set up a submodule to set up a mapping structure called other_elements, which is used to temporarily store the reference DX B All valid data elements and their corresponding bucket indexes; The traversal submodule is used to traverse each bucket in the reference FLsketch. For each bucket i∈[0,m-1], the element pair (carry_b,flag_b) in each slot is further processed. The storage submodule is used to treat the slot as valid data when carry_b≠-1 is satisfied, and store the corresponding element and its bucket number iii in the other_elements mapping structure.

10. A system for implementing the efficient block propagation relay protocol Feilian protocol construction method as claimed in claim 1, characterized in that: The system includes the following submodules: Read submodule for target DX A Perform traversal operation, also for each bucket i∈[0,m-1] and each slot j∈[0,b-1] in the bucket, read the element pair (carry_a,flag_a) in the slot; The judgment submodule is used to determine that when carry_a≠-1 is satisfied and the element pair has a matching item in the other_elements mapping structure, it indicates that the element appears in both FLsketches and is considered redundant data; Set the submodule to clear the corresponding slot content, that is, DX A .buckets[i][j]=(-1,-1), and DX A .siz value minus 1; Exclude submodules to complete all bucket and slot processing and return to the updated FLsketch DX A , which has been excluded from DX B The repeated part is used to obtain the purified data set.