Defense method for block chain solar erosion attack

By calculating the propagation capabilities of blockchain nodes and the differences between autonomous systems, and building a nuclear matrix to select neighbor nodes, the defense problem of eclipse attacks in blockchain network is solved, and efficient defense of the system and the security of node connections is achieved.

CN120017245AActive Publication Date: 2025-05-16SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510156035.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-05-16
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively defend against eclipse attacks in blockchain networks, especially to ensure the flexibility and autonomy of node connections while improving the system's defense against malicious attacks.

Method used

By calculating the propagation capabilities of blockchain nodes and the differences between autonomous systems, a kernel matrix is ​​built to select neighbor nodes, combining beta distribution and Wasserstein distance, the node selection process is optimized to improve the system's defense capabilities.

Benefits of technology

It significantly improves the resistance of blockchain networks to solar eclipse attacks, ensures the security and efficiency of node connections, and provides the ability to independently adjust the relationship between diversity and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017245A_ABST
    Figure CN120017245A_ABST
Patent Text Reader

Abstract

The invention provides a solar erosion attack defense method for a block chain system, and the system is composed of a plurality of nodes which comprise a part of malicious nodes and a plurality of benign nodes. Nodes in a system carry out information spreading in a decentration mode, and when a block chain node is connected with other nodes, all connected neighbor nodes need to be prevented from being malicious nodes. The method comprises the following steps of: 1, calculating block propagation capabilities of different nodes according to locally stored information transmission records by the nodes; step 2, in combination with the propagation capability of all nodes in each autonomous system (AS), calculating the difference between different ASs; and step 3, constructing a kernel matrix by using the propagation capability and the difference, and then selecting connected alternative targets by using a determinant point process method. According to the solar erosion attack defense method for the block chain system, the security risk that nodes suffer from solar erosion attacks can be reduced, meanwhile, the influence of propagation capacity is considered when neighbor nodes are selected, and the efficiency of the block chain nodes in information receiving is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain security technology, and in particular to a defense method for protecting blockchain nodes from eclipse attacks. Background Art

[0002] Blockchain technology improves the flexibility and autonomy of nodes in the network by adopting a point-to-point connection mechanism. This feature makes the blockchain system have significant advantages over the traditional centralized structure in avoiding single point failure and improving the overall robustness of the network. In the blockchain network, in order to ensure that the node can grasp the latest status of the system in real time, the node needs to actively connect and communicate with other nodes to obtain key information within the system. Although the traditional node selection method introduces the idea of ​​randomness, in actual application scenarios, this randomness is not enough to completely resist malicious attacks. Attackers can often interfere with or manipulate the node selection strategy through a series of carefully designed attack methods, and then use malicious nodes to infiltrate and control all connection relationships of nodes in the blockchain network, posing a serious threat to the security of the system.

[0003] In response to this challenge, from a security perspective, it is necessary to design an efficient and reliable method for selecting neighbors for blockchain nodes to prevent security threats from the enemy. At present, although some defense methods have attempted to ensure the security of nodes through data analysis or the introduction of diversity, these methods still have certain limitations. Specifically, data analysis methods can often only work after an attack occurs, and their real-time protection capabilities for nodes are relatively limited. Although the method of introducing diversity can theoretically improve the security of the system, in actual operation, it is necessary to deeply analyze the various properties of the nodes, and its calculation method needs to consider the dynamic characteristics of the nodes.

[0004] Therefore, in order to more effectively deal with malicious attacks, especially blockchain eclipse attacks, and protect the security of blockchain networks, it is urgent to develop an innovative node neighbor selection method that can significantly improve the system's defense capabilities against malicious attacks while ensuring the flexibility and autonomy of node connections. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, a defense method for blockchain eclipse attack is proposed. The blockchain system involved includes several nodes, including a certain number of malicious attackers and conventional benign nodes. Transaction messages are transmitted between nodes in a decentralized mode. When the system is operating normally, the information of blocks is continuously propagated between nodes.

[0006] The technical solution of the present invention is as follows:

[0007] A method for defending against blockchain eclipse attacks, comprising the following steps:

[0008] Step 1. The blockchain node records the block information it receives from other nodes in the system and calculates the block propagation capacity of each node based on the timestamp of the message.

[0009] Step 2. The blockchain node calculates the differences between nodes based on the propagation capabilities of other nodes, taking the autonomous system in which it is located as a reference and combining the block propagation capabilities of all nodes in the autonomous system.

[0010] Step 3. The blockchain node constructs a core matrix using the propagation capabilities and differences calculated in steps 1 and 2.

[0011] Step 4. Select neighbor nodes based on the kernel matrix constructed in step 3.

[0012] In step 1, the blockchain node records the content of each message propagated by other nodes in the system and the timestamp corresponding to the content. Secondly, for messages with the same content, the propagation performance of different nodes on the message is calculated. Finally, the propagation performance of each node on all information is accumulated to obtain the comprehensive propagation performance of the node. This data is given in combination with the Beta distribution, and the specific steps are as follows:

[0013] (1-1) Taking the first notification message of the b-1th block as a reference, the propagation capacity of the bth block is calculated according to the following formula:

[0014]

[0015] in is the ability of node n to propagate the bth block, is the timestamp of node n’s propagation of the bth block, and Represents the timestamp of the first INV message of the b-1th and bth blocks respectively.

[0016] (1-2) Based on the propagation capacity of each block, the actual block propagation performance of the node is accumulated and calculated. Specifically, suppose there are currently B blocks with propagation capacity parameters, and the propagation performance of node n is q n It can be modeled using the Beta distribution, that is Its parameter α n ,β n The cumulative calculation is as follows:

[0017]

[0018] (1-3) According to the propagation performance of nodes, an autonomous system (AS) The transmission quality performance Q iThe Beta distribution can also be used for modeling, that is, Its parameters The calculation is as follows:

[0019]

[0020] In step 2, several sets containing different numbers of Beta distributions are obtained based on the propagation capacity distribution of other nodes, and the distance between the sets is calculated based on the Wasserstein distance to characterize the differences between the nodes. The specific steps are as follows:

[0021] (2-1) Calculate the difference in propagation capabilities of nodes from different ASs based on the Euclidean distance. Suppose two nodes from different ASs are u and v, then first calculate the difference in propagation capabilities between the two d(u,v) as follows:

[0022]

[0023] (2-2) Let a vector X represent the node transformation between different ASs. Then according to the definition of Wasserstein distance, we have:

[0024]

[0025] in and They represent the ASs of nodes u and v respectively. Indicates the number of nodes contained in the AS.

[0026] (2-3) Based on d and X, the minimum value of the distance W(i,j) between the i-th and j-th ASs is calculated by solving the following optimization problem to describe the difference between the two ASs:

[0027]

[0028] In step 3, a kernel matrix is ​​constructed based on the propagation capabilities and differences in steps 1 and 2. The specific steps are as follows:

[0029] (3-1) Using the exponential function, the distance W(i,j) between the i-th and j-th AS is scaled to obtain E i,j :

[0030] E i,j =e -W(i,j) (8)

[0031] (3-2) Count the number of ASs in the system, denoted as N. Calculate the similarity feature vector set φ containing each AS through normalization. Take the i element in the vector set φ as an example, consider the i element and the remaining elements j in the set, the element φ in the vector set i The calculation method is as follows:

[0032]

[0033] (3-3) Based on the element φ in the feature vector set φ i With the element φ j Transpose Construct the following similarity matrix S:

[0034]

[0035] (3-4) In order to adjust the influence of propagation capacity when selecting neighbor nodes, the parameter θ is introduced into the propagation capacity parameter Q, and its construction method is as follows:

[0036]

[0037] (3-5) Finally, the calculation is done by Q * and S form the kernel matrix L ij , which is expressed as follows:

[0038]

[0039] In step 4, based on the core matrix L constructed in step 3, k rounds of neighbor node selection are iterated. The specific steps are as follows:

[0040] (4-1) Let all diagonal elements of the core matrix L be the set of candidate neighbor nodes: Let c i =[], Find one middle The largest element is added to the neighbor node set Y as follows:

[0041]

[0042] (4-2) For all For the elements in , but not in Y, calculate their parameters c relative to the elements in Y. i and d i , which is expressed as follows:

[0043]

[0044] (4-3) Based on c i and d i The updated value of In, select d i The largest element is expressed as follows:

[0045]

[0046] Add the selected node j to Y.

[0047] (4-4) Repeat steps (4-2) and (4-3) k-1 times to obtain a set Y containing k nodes. The nodes in this set are the selected neighboring nodes.

[0048] Compared with the prior art, the technical effects of the present invention are as follows:

[0049] 1) The present invention designs a model of node propagation capability and calculates the propagation capability of each AS. On this basis, the difference value between ASs is calculated based on the propagation capability. The neighbor selection process combines the two to improve resistance to eclipse attacks.

[0050] 2) A quality adjustment parameter is introduced into the determinant point process method, which can adjust the importance relationship between diversity and quality. This design enables blockchain nodes to autonomously adjust between security protection and information reception efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Eclipse attacks and their mitigation schemes.

[0052] Figure 2 Example description of node local transmission data record.

[0053] Figure 3 Select neighboring nodes flowchart.

[0054] Figure 4 The present invention improves performance compared to random selection.

[0055] Figure 5 The present invention has a resistance effect against solar eclipse attacks of different intensities. DETAILED DESCRIPTION

[0056] The present invention is further explained below in conjunction with the accompanying drawings and embodiments, but the protection scope of the present invention should not be limited thereto.

[0057] like Figure 1In the blockchain system shown, the candidate neighbors of the blockchain node include normal benign nodes and malicious nodes from AS1 to AS3. If the node indiscriminately selects nodes from AS1 to AS3 during the process of connecting to neighbors, it will be attacked by the malicious attacker. If a diverse selection can be made during the process of connecting to neighboring nodes, and normal nodes are introduced, the trap of the attacker's eclipse attack can be broken.

[0058] like Figure 2 As shown in the figure, the transmission records collected by the blockchain node to other nodes include 4 parts. The first thing that can be observed is the identification of the node sending the information, which can be used as the identity information of the node in the system. Secondly, when the information arrives locally, the target node will add a timestamp to it when recording the content and source of the information, which will be used to calculate the propagation capacity of each node later. Finally, the target node obtains the AS information of the transmitter from the network information of the information, which will be used to describe the propagation capacity and differences of different ASs later.

[0059] The workflow of the present invention is as follows Figure 3 As shown, the process is divided into 4 steps:

[0060] Step 1: Extract the propagation records of all nodes and calculate the propagation performance of each node. The steps are as follows:

[0061] (1-1) The performance of each node in propagating a single block is calculated based on the transmission record. The mathematical expression is:

[0062]

[0063] For each node, the performance of block propagation at all times is accumulated to obtain the parameter of node propagation capability, and its mathematical expression is:

[0064]

[0065] (1-2) When solving the AS propagation quality, the performance of all the nodes it contains is summed up, and the mathematical expression is:

[0066]

[0067] Step 2: When calculating the gap between different ASs, the difference in node propagation performance d and the transformation scheme X between different ASs are used to give specific values. The details are as follows:

[0068] (2-1) Calculate the differences between different nodes as follows:

[0069]

[0070] (2-2) Find the inter-AS transformation scheme X, which should satisfy the following constraints:

[0071]

[0072] (2-3) Find an X with the smallest inner product with d, and then regard the smallest inner product W as the difference between AS. Its mathematical expression is as follows:

[0073]

[0074] Step 3: Based on the AS transmission quality calculated in step 1 and the difference between the ASs calculated in step 2, a kernel matrix containing the parameter θ is constructed, as follows:

[0075] (3-1) Based on the difference between ASs calculated in step 2, the characteristic vector of each AS is obtained. The method is given by the following formula:

[0076]

[0077] (3-2) Based on the feature vectors of all ASs, a similarity matrix S is constructed. The calculation method of each element of the matrix S is as follows:

[0078]

[0079] (3-3) Combining the parameter θ, the propagation capability Q obtained in step 1, and the similarity matrix S, the kernel matrix L is constructed. The elements of the kernel matrix L are calculated as follows:

[0080]

[0081] Step 4: Select neighboring nodes based on the kernel matrix L in step 3 and the number of neighboring nodes k that need to be connected, as follows:

[0082] (4-1) In the first round, set c i =[], Then find all optional sets middle The largest element is solved as follows:

[0083]

[0084] Add the element to the neighbor node set Y.

[0085] (4-2) Update the set of all remaining optional neighbor nodes The c of the element i With d i Parameters, find The largest element is solved as follows:

[0086]

[0087] (4-3) Based on c i and d i The updated value of In, select d i The largest element is expressed as follows:

[0088]

[0089] Add the selected node j to Y.

[0090] (4-4) Repeat steps (4-2) and (4-3) k-1 times to obtain a set Y containing k nodes. The nodes in this set are the selected neighboring nodes.

[0091] Figure 4 The figure shows the superiority of the designed method in propagation performance compared with the completely random scheme. As can be seen from the figure, the proportion of nodes with low propagation quality among the neighbors selected by this method has been significantly reduced compared with random selection, and high-quality propagation nodes occupy a larger proportion in the selection results. At the same time, the designed method does not gather all possible selections in the high-quality part. This is because this method ensures the diversity of selection while considering the quality, which provides a guarantee for the security of the target node.

[0092] Figure 5 The figure shows the number of malicious nodes selected by the present invention under different enemy attack capabilities. Assuming that some nodes with strong propagation capabilities have been controlled by the enemy, the control range is regarded as the enemy's attack capability. During the test, the range is incremented by 10%, from 10% to 100%, to discuss the resistance effect of the present invention against eclipse attacks. The figure compares three different selection methods: (1) completely random selection; (2) greedy selection of only high-quality nodes; (3) selection using the method of the present invention. It can be seen from the figure that the security of the present invention and the random selection scheme is higher than that of the greedy selection method. At the same time, when the security parameter θ is adjusted, the number of malicious nodes selected by the present design can be lower than that of the random selection scheme, that is, the present invention can provide a safer defense effect than random selection.

Claims

1. A defense method against blockchain eclipse attacks, characterized in that: The blockchain includes several malicious nodes and benign nodes, and transaction messages are transmitted between nodes in a decentralized manner. The defense method includes the following steps: S1. Calculate the block propagation capacity of each node in the blockchain network; S2. Based on the block propagation capability of the node, the autonomous system in which the node is located is used as a reference, and the block propagation capabilities of all nodes in the autonomous system are combined to calculate the differences between the nodes; S3. Based on the node block propagation capabilities and differences calculated in steps 1 and 2, construct the similarity feature vector of the autonomous system, and use the feature vectors of all autonomous systems to construct the similarity matrix. Multiply the propagation capabilities by the elements in the similarity matrix one by one to obtain the core matrix; S4. Select neighbor nodes according to the kernel matrix.

2. The method for defending against blockchain eclipse attacks according to claim 1, characterized in that: S1. Calculate the block propagation capacity of each node in the blockchain network, specifically including: S1.1 Each node in the blockchain network records the content of each message received from other nodes in the system and the timestamp corresponding to the message; S1.2 For messages with the same content, take the first notification message of the b-1th block as a reference, calculate the node n's propagation capability for the bth block according to the timestamp of the node n's propagation for the bth block, and the timestamp of the first INV message of the b-1th and bth blocks, and the formula is as follows: in, is the ability of node n to propagate the bth block, is the timestamp of node n’s propagation of the bth block, and Represents the timestamp of the first INV message of the b-1th and bth blocks respectively; S1.3 Based on the propagation capacity of each block, the actual block propagation performance of each node in the blockchain network is cumulatively calculated. Assume that there are currently B blocks with propagation capacity parameters, and the propagation performance of node n is q n Beta distribution is used for modeling, that is, The parameter α of the Beta distribution is calculated by accumulating the block propagation capacity parameter of each node n ,β n The formula is as follows: S1.4 Based on the propagation performance of the nodes, an autonomous system The transmission quality performance Q i The Beta distribution is also used for modeling, that is, The parameters of the autonomous system beta distribution are calculated by accumulating the propagation performance parameters of all nodes in the autonomous system. The formula is as follows:

3. The method for defending against blockchain eclipse attacks according to claim 1, characterized in that: The step S2. calculating the differences between nodes specifically includes: S2.1 For two nodes u and v from different ASs, first calculate their respective propagation capability difference d(u,v), and then calculate the difference in propagation capability between the two nodes based on the Euclidean distance. The formula is as follows: S2.2 sets a vector X to represent the way nodes are transformed between different ASs. According to the definition of Wasserstein distance, the difference in node propagation capability distribution between two ASs containing nodes u and v is calculated: in and They represent the ASs of nodes u and v respectively. Indicates the number of nodes contained in the AS; S2.3 calculates the minimum value of the distance W(i,j) between the i-th and j-th ASs by solving the following optimization problem based on d calculated in step S2.1 and X calculated in step S2.2, which is used to describe the difference in the node propagation capacity distribution of the two ASs:

4. The method for defending against blockchain eclipse attacks according to claim 1, characterized in that: The specific steps of step S3 are as follows: S3.1 uses an exponential function to scale the distance W(i,j) between the i-th and j-th ASs to obtain E(i,j): AND i,j =and -W(i,j) (8) S3.2 count the number of ASs in the system, denoted as N, and calculate the similarity feature vector set φ containing each AS through normalization processing; Taking the i element in the vector set φ as an example, consider the i element and the other elements j in the set, the element φ in the vector set i The calculation method is as follows: S3.3 Based on the element φ in the feature vector set φ i With the element φ j Transpose Construct the following similarity matrix S: S3.4 In order to adjust the influence of propagation capacity when selecting neighbor nodes, parameter θ is introduced into the propagation capacity parameter Q, and its construction method is as follows: S3.5 Finally, the calculation is made by Q * and S form the kernel matrix L ij , which is expressed as follows:

5. The method for defending against blockchain eclipse attacks according to claim 1, characterized in that: The step S4. based on the core matrix L constructed in step 3, iteratively performs k rounds of neighbor node selection, and the specific steps are as follows: S4.1 All diagonal elements of the kernel matrix L are set of candidate neighbor nodes Let c i =[], In the candidate neighbor node set Find one The largest element is taken as the first neighbor node, which is removed from the candidate neighbor node set and added to the neighbor node set Y as follows: S4.2 For all nodes in the candidate neighboring node set For the elements in the neighboring node set Y that are not in the neighboring node set Y, calculate their parameter c relative to the elements in the neighboring node set Y. i and d i , expressed as follows: S4.3 based on c i and d i The updated value of the candidate neighbor node set that does not contain the current neighbor node In, select d i The largest element is used as the next neighbor node, expressed as follows: Remove the selected node j from the candidate neighbor node set and add it to the neighbor node set Y; S4.4 Repeat steps S4.2 and S4.3 a total of k-1 times until a neighbor node set Y containing k nodes is obtained, and the nodes in the set are the selected neighbor nodes.

Citation Information

Patent Citations

  • Reputation-based block chain daily erosion attack defense method

    CN116055070A

  • Block chain-based solar erosion attack risk control method, storage medium and control system

    CN117714026A