Sharding reconfiguration method and system based on node reputation election and electronic device
By adopting a sharding reconfiguration method based on node reputation election, and using PoCE and FTS algorithms to optimize the allocation of node reputation and stake, this approach solves the problems of high computational and communication overhead and insufficient security in existing technologies, and achieves efficient sharding reconfiguration and improved consensus security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SCI-TECH UNIV
- Filing Date
- 2025-04-07
- Publication Date
- 2026-04-28
AI Technical Summary
Existing sharding reconfiguration technology in blockchain systems suffers from high computational and communication overhead and insufficient security, especially its inability to effectively distinguish between honest and malicious nodes, which affects system stability and security.
A sharding reconfiguration method based on node reputation election is adopted. The node reputation is calculated by the PoCE algorithm and combined with the FTS algorithm to optimize the allocation of stake value, eliminate nodes with low reputation and abnormal nodes, optimize the size of the consensus committee, and ensure the participation of honest nodes.
It improves the efficiency of sharding and reassembly, enhances the consensus security and anti-attack capabilities of the system, optimizes the node management strategy, and improves the system's throughput and fairness.
Smart Images

Figure CN120223407B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of blockchains, and particularly relates to a sharding reconfiguration method and system based on node reputation election and an electronic device. BACKGROUND
[0002] Blockchain technology is widely used in the fields of finance, Internet of Things, supply chain management, etc. due to its decentralization, non-tamperability and traceability. Sharding technology, as one of the mainstream solutions for expanding the capacity of current blockchains, divides the network into multiple independent shards, enabling different shards to handle transactions in parallel, thereby improving the throughput of the system and reducing transaction latency. Under the premise of ensuring the decentralization and security of the blockchain, sharding technology can effectively alleviate the performance bottleneck problem of the blockchain network. However, in practical applications, sharded blockchains still face many challenges, among which the effectiveness and security of sharding reconfiguration are particularly critical. How to dynamically adjust the sharding structure while ensuring the stability and attack resistance of the system is still a problem that needs in-depth research.
[0003] In a sharded blockchain system, sharding reconfiguration is a periodic adjustment of the composition of nodes in each shard to improve consensus security, reduce communication overhead, and enhance the system's resistance to security threats. If the sharding structure remains unchanged for a long time, malicious nodes can control the majority consensus rights of a shard, thereby undermining the consensus security of the shard. In addition, due to the continuous addition of new nodes and the exit of old nodes, the dynamic changes in shard size and load also require reasonable adjustments, otherwise it may lead to uneven utilization of computing resources in some shards, affecting the stability of the overall system.
[0004] Existing sharding reconfiguration techniques mainly include full random sharding and partial random sharding. However, both methods have certain limitations in practical applications, affecting the security, computing efficiency and communication overhead of the sharded blockchain system.
[0005] The full random sharding method completely and randomly reallocates all nodes at each round of sharding reconfiguration, which has the following defects: 1. Introduces additional computing and communication overhead. All nodes need to be reallocated, resulting in a large amount of computing resource scheduling and data exchange between shards, increasing communication load and reducing overall throughput; 2. Consensus nodes need to re-establish connections and synchronize states. This not only affects the stability of the system, but also may cause delays in new block confirmation, reducing transaction processing efficiency.
[0006] Partial random sharding adjusts only part of the nodes randomly to enhance security while maintaining system stability during shard reconfiguration. Compared with full random sharding, this method can reduce the impact of frequent node changes on the system while reducing computing and communication overhead. However, when the proportion of malicious nodes in a single shard is high, partial random adjustment may not be enough to completely eliminate potential security risks, and malicious nodes may still gradually infiltrate the shard consensus mechanism through long-term incubation or coordinated attacks.
[0007] Chinese invention patent document CN112511590B proposes an efficient storage reconfiguration method for blockchain sharding, aiming to realize the reconfiguration process of lightweight blockchain network: (1) the verification node runs the network partition reconfiguration protocol; (2) the verification node switches to the latest network shard state; (3) determine the corresponding node grouping according to the transaction hash value; (4) transaction processing, the main chain block acts as a transaction input cross-shard verification routing table; (5) run a consensus protocol within the shard. This patent solution shortens the time of system service suspension, reduces the network load pressure caused by data exchange between nodes during system switching, in addition, optimizes the cross-shard verification method of shard blockchain, and improves the transaction processing rate of the system. However, this invention mainly focuses on how to improve the efficiency of storage reconfiguration of shard blockchain, but has certain limitations in node reputation evaluation and dynamic adjustment.
[0008] Existing shard reconfiguration mechanisms usually use random reconfiguration or periodic rotation methods to avoid malicious nodes controlling a certain shard for a long time. However, random or fixed rotation methods have certain limitations and cannot effectively distinguish between honest nodes and malicious nodes, which may lead to high-reputation nodes being mistakenly eliminated, while low-reputation nodes remain in the system, reducing the overall security of the system. SUMMARY
[0009] To solve the above problems existing in the prior art, the application provides a sharding reconfiguration method and system based on node credit election and electronic equipment. The application eliminates the algorithm Proof of Credit Election (PoCE) based on node credit election. The system reconfigures a part of nodes according to the node credit degree periodically, so that as many honest nodes as possible are retained in the consensus committee, thereby greatly reducing the number of nodes in the consensus committee and reducing the communication overhead. The application adopts a benefit value smoothing method, optimizes the benefit value mechanism, and smoothes the staked benefit value, so that the benefit value is not the only dominant factor, and ensures that nodes with low benefit value but high credit have the opportunity to be selected into the consensus committee. In addition, the application calculates the credit degree based on PoCE and introduces the Follow the Satoshi algorithm (FTS), that is, all node benefit values form a Merkle tree, the weight of a non-leaf node is the sum of the weights of the left and right sub-trees, the weight of a leaf node is the benefit value of a certain benefit owner, and the selection is made in the left and right sub-trees according to a random number. The 5% nodes with the lowest credit degree are eliminated, and the malicious nodes and the nodes with low credit degree are gradually removed from the consensus committee.
[0010] To achieve the above object, the technical scheme of the application includes two parts: the first part establishes a credit mechanism for sharding nodes; and the second part randomly reconfigures part of the nodes in the sharding, as follows:
[0011] A sharding reconfiguration method based on node credit election, according to the following steps:
[0012] S1. Epoch initialization, generating and broadcasting a random number r;
[0013] S2. Calculate the benefit value Stake increment, and calculate the node S i Calculate the benefit increment Wherein represents the staked benefit value of the current Epoch node i, represents the staked benefit value of the last Epoch node i, according to the calculated δ i The median Med(|δ|) and the interquartile range IQR = Q3(|δ|)-Q1(|δ|) of the absolute values of all node increments are obtained, wherein Q1 and Q3 are the 25th and 75th percentiles of the absolute values of the increments, and the abnormal benefit increment threshold δ thres = Med(|δ|)+1.5×IQR is set, if |δ i |>δ thres , it indicates that the benefit increment of the node is abnormal, and the node is an abnormal node.
[0014] S3. When each new node joins the network and enters the candidate committee of a certain shard, it needs to send a transaction participating in the election and successfully consensus block. The transaction records the current stake value S of the node i . In order to prevent stake hegemony, the stake is smoothed, and the minimum value S min and the maximum value S max of the node's equity value obtained after smoothing are obtained, and other values will be mapped to the range of (S min , S max ).
[0015] S4. Calculate the reputation of the node. In each Epoch, the system calculates the reputation of node i in the next Epoch according to the stake value S i of any node i in each shard, the contribution degree E i of the last Epoch and the historical contribution degree H i . The reputation of node i in the next Epoch is calculated by PoCE consensus. The PoCE formula of a certain node i is as follows:
[0016] PoCE i = τ0S i + τ1H i + τ2E i + τ3P i
[0017] Where τ0+τ1+τ2+τ3=1, representing the weight of different influence factors.
[0018] S5. Consensus committee node elimination: the contribution degree E i of the last Epoch is defined as the number of transactions that the node is selected as the leader in the current shard in the last Epoch and successfully completes the consensus, and the nodes are sorted according to the value of E i , and the 5% of the nodes participating in the consensus in the shard with the highest value of E i are directly eliminated; according to the PoCE formula, the PoCE i of each node and the maximum PoCE max are calculated, and the FTS algorithm (follow the Satoshi algorithm) is run, and PoCE max -PoCE iThe difference value is calculated as the elimination weight, which is mapped to the corresponding node according to the weight distribution, and repeated selection is performed until 5% of the nodes participating in consensus in the elimination shard are selected; a total of 10% of the consensus nodes in the system are eliminated. The FTS algorithm uses an improved Merkle tree structure to realize the weight distribution mechanism, wherein the weight value of each non-leaf node is recursively summed by the weights of its left and right child nodes, and the leaf node directly stores the actual weight value of the corresponding weight owner. In the path selection stage, the system determines the traversal direction of the left and right sub-trees through a random seed. The random seed is a global random number of the current Epoch, and the eliminated nodes will join the candidate committee of the shard.
[0019] S6. Consensus committee election, the reputation of all candidate nodes is calculated by applying the PoCE formula, and n / 10+min(m / 10, 1024-n) nodes are selected as new consensus nodes by the FTS algorithm. Wherein, the size of the consensus committee before updating is n, and the size of the candidate committee is m. The final number of consensus nodes after updating is n+min(m / 10, 1024-n), which ensures that the number of consensus nodes gradually increases to 1024 after updating.
[0020] Preferably, in step S3, the Stake smoothing process is as follows: the median Med(S current ) of the current weight values of all consensus nodes is calculated, the maximum allowed change amount Δ max of the weight value is set to 0.1*Med(S current ), and the weight value cut-off value is set to 0.1*Med(S ).
[0021]
[0022] According to the abnormal marker, the smoothing coefficient a i is selected. The new weight value of the node is calculated as follows:
[0023]
[0024] Preferably, in step S4, the consensus marginalization degree P i of each node is calculated as follows: the system saves an election cumulative state value for each node, and the calculation method is that the value starts from 0, and once the node is selected as a consensus node, the value is increased by 1, otherwise it is reduced by 1. After determining the maximum election cumulative state value of all nodes in the system, the maximum value of the election cumulative state value is subtracted from the election cumulative state value of each node, and the difference value obtained is taken as the consensus marginalization degree P i of each node.
[0025] The application also discloses a shard reconfiguration system based on node reputation election, which is used for executing the above method and comprises the following modules:
[0026] Initialization module: Epoch initialization, generate and broadcast random number r;
[0027] Equity value increment calculation module; to node S i Calculate equity increment Wherein represents the staking equity value of the current Epoch node i, represents the staking equity value of the last Epoch node i, according to the calculated δ i The median Med(|δ|) and interquartile range IQR = Q3(|δ|)-Q1(|δ|) of the absolute values of all node increments are obtained, wherein Q1 and Q3 are the 25th and 75th percentiles of the absolute values of the increments, and the abnormal equity increment threshold δ thres = Med(|δ|)+1.5×IQR is set, if |δ i |>δ thres , it means that the equity increment of the node is abnormal, and it is an abnormal node;
[0028] Smoothing module: when each new node joins the network and enters a candidate committee of a shard, it sends a transaction participating in the election, and successfully consensus block; The transaction records the current staking Stake value S i of the node; Stake is smoothed, and after smoothing, the minimum value S min and the maximum value S max of the node equity value are obtained, and other values will be mapped to the range of (S min , S max );
[0029] Node reputation calculation module: in each Epoch, according to the staking equity value Stake S i of any node i in each shard, the contribution degree E i of the last Epoch, the historical contribution degree H i and the consensus marginalization degree P i , the reputation of node i of the next Epoch is calculated through the election elimination algorithm PoCE consensus; The PoCE formula of node i is as follows:
[0030] PoCE i =τ0S i +τ1H i +τ2E i +τ3P i
[0031] Wherein τ0+τ1+τ2+τ3=1, representing the weight of different influence factors;
[0032] Consensus committee node elimination module: the contribution degree E iDefinition as the number of transactions in which the node is elected as the leader and successfully completes consensus in the current shard at the last epoch, and sort the nodes according to the E i Value, directly eliminate the 5% of the nodes participating in consensus in the shard with the highest E i Value; according to the PoCE formula, calculate the PoCE i of each node and the maximum PoCE max , run the FTS algorithm, and calculate the difference between the PoCE max and the PoCE i as the elimination weight, and map it to the corresponding node according to the weight distribution, repeat the selection until 5% of the nodes participating in consensus in the shard are eliminated; a total of 10% of the consensus nodes in the system are eliminated. The FTS algorithm uses an improved Merkle tree structure to realize the weight distribution mechanism, wherein the weight value of each non-leaf node is recursively summed by the weights of its left and right child nodes, and the leaf node directly stores the actual weight value of the corresponding weight owner. In the path selection stage, the system determines the traversal direction of the left and right sub-trees through a random seed. The random seed is a global random number of the current epoch, and the eliminated nodes will join the candidate committee of the shard;
[0033] The consensus committee election module: the reputation of all candidate nodes is calculated by the PoCE formula, and n / 10+min(m / 10, 1024-n) nodes are selected as new consensus nodes by the FTS algorithm; wherein, the size of the consensus committee before updating is n, and the size of the candidate committee is m; the number of consensus nodes after updating is n+min(m / 10, 1024-n).
[0034] The application also discloses an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above method or system when executing the computer program.
[0035] The application innovatively proposes a shard reconfiguration method and system based on node reputation election and an electronic device, aiming to improve the shard reconfiguration efficiency, combine the node reputation evaluation mechanism, comprehensively consider the node staking weight value, historical contribution degree, consensus contribution degree and consensus marginalization degree and other factors, develop more accurate node election and elimination strategy, further optimize the node management strategy, ensure the high throughput of the system, and improve the consensus security and attack resistance of the system, which can meet the load demand in different scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 is a preferred embodiment of the application, a shard reconfiguration method based on node reputation election flow chart;
[0037] Figure 2is a system block diagram of a sharding reconfiguration based on node reputation election according to a preferred embodiment of the present application.
[0038] Figure 3 is a schematic diagram of changes in the number of malicious nodes and honest nodes at different epochs in a simulation experiment based on the present application. DETAILED DESCRIPTION
[0039] The preferred embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0040] As Figure 1 shown, it is a sharding reconfiguration method based on node reputation election according to the present embodiment, taking a node N5 as an example, and the specific steps are as follows:
[0041] 1) Epoch initialization, generate and broadcast a random number r.
[0042] 2) Stake value increment calculation, taking node A as an example, the stake value of the previous epoch is and the stake value of the current epoch is The 25th and 75th percentiles of the absolute value increments in the system are Q1 = 8 and Q3 = 15, the interquartile range IQR = 7, the median of the increments Med(|δ|) = 10, and the abnormal threshold δ thres = 20.5. At this time, the absolute value of the increment of node A |δ A | = 100 > 20.5, which is marked as an abnormal node.
[0043] 3) Taking node A as an example, assuming that the median of the current stake values of all nodes Med(S current ) = 100, the maximum allowed change of the consensus node Δ max = 10, and the stake value of node A is truncated At this time, the α value of the abnormal node is 0.8, and the weighted smoothing calculation of node A is
[0044] 4) Calculate the node reputation, according to the PoCE calculation formula, assuming that the weights are consistent at this time, the influence factor of node NA is (SA = 102, HA = 10, EA = 4, PA = 1), and the value of PoCE5 calculated at this time is 29.25.
[0045] 5) Taking the stake value smoothing of node NA and the node reputation calculation as an example, according to the historical contribution degree Ei and PoCE sorting, directly eliminate the 5% nodes with the lowest historical contribution degree and the 5% nodes with the lowest reputation.
[0046] 6) Consensus Committee Election: The reputation of all candidate nodes is calculated using the PoCE formula, and two nodes are selected as new consensus nodes using the FTS algorithm. The size of the consensus committee before the update is 20, and the number of consensus nodes after the update is 20.
[0047] like Figure 2 As shown, this embodiment discloses a sharding reconfiguration system based on node reputation election, used to execute the above method, including the following modules:
[0048] Initialization module: Epoch initialization, generating and broadcasting a random number r;
[0049] Equity value increment calculation module; for node S i Calculate equity increment in This represents the staked equity value of the current Epoch node i. This represents the staked equity value at the previous Epoch node i, calculated based on δ. i The median Med(|δ|) and interquartile range IQR = Q3(|δ|) - Q1(|δ|) of the absolute values of all node increments are obtained, where Q1 and Q3 are the 25th and 75th quantiles of the absolute values of the increments, respectively. An abnormal equity increment threshold δ is set. thres =Med(|δ|)+1.5×IQR, if |δ i |>δ thres This indicates that the node's equity increment is abnormal, making it an abnormal node;
[0050] Smoothing Module: When each new node joins the network and enters the candidate committee of a shard, it sends a transaction to participate in the election and successfully reaches consensus to produce a block; the transaction records the node's current staked value S. i Stake is smoothed to obtain the minimum node stake value S. min and maximum value S max Other values will be mapped to (S) min ,S max Within the range;
[0051] Node reputation calculation module: In each Epoch, based on the stake value (S) S of any node i in each shard. i Contribution E in the most recent Epoch i Historical contribution H i And the degree of consensus marginalization P i The reputation of node i in the next Epoch is calculated using the Proof-of-Consensus (PoCE) consensus algorithm; the PoCE formula for node i is as follows:
[0052] PoCEi =τ0S i +τ1H i +τ2E i +τ3P i
[0053] Wherein τ0+τ1+τ2+τ3=1, represents the weight of different influencing factors;
[0054] The consensus committee node elimination module: count the number of transactions that each node in each shard is selected as a leader and successfully completes consensus in all nodes in the current shard in the last epoch, and calculate the historical contribution E of all consensus nodes i , sort the nodes according to E i , directly eliminate the 5% of the nodes with the smallest order; according to the PoCE formula, calculate the PoCE of each node, and calculate the maximum PoCE max , based on PoCE max -PoCE i Eliminate 5% of the nodes, and run the FTS algorithm to randomly distribute the nodes to a shard network; wherein the random seed in the FTS is the global random number of the current epoch; the eliminated nodes will join the candidate committee of the shard.
[0055] The consensus committee election module: calculate the reputation of all candidate nodes by using the PoCE formula, and select n / 10+min(m / 10, 1024-n) nodes as new consensus nodes by using the FTS algorithm; wherein the size of the consensus committee before updating is n, and the size of the candidate committee is m; and the final number of consensus nodes after updating is n+min(m / 10, 1024-n).
[0056] The other contents of the embodiment can refer to the above method embodiment.
[0057] In the simulation experiment, it is assumed that the total number of nodes in the system is 1000, and each time a new node is added, it is an honest node. The number of malicious nodes in the initial state meets the Byzantine fault tolerance requirement. Figure 3 The number of malicious nodes and honest nodes in different epochs is shown in the figure. With the increase of epoch, the malicious nodes are gradually eliminated based on the node reputation election mechanism, and finally in the 60th epoch, the malicious nodes in the system are completely removed.
[0058] The preferred embodiment of the application also discloses an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above method or system when executing the computer program.
[0059] In summary, the application has the following remarkable technical effects:
[0060] 1.The present application proposes a node reputation-based election elimination algorithm, referred to as PoCE, which periodically reorganizes a part of nodes according to the node reputation, so as to retain as many honest nodes as possible in the consensus committee, optimize the committee size, reduce the system overhead, and improve the security of the consensus process.
[0061] 2.The present application uses the equity value smoothing method to optimize the node's staking equity value, so that the equity value is no longer the only decisive factor, thereby avoiding the phenomenon of high equity nodes monopolizing the consensus committee. This method ensures that nodes with low equity values but high reputation still have the opportunity to participate in consensus, effectively reducing the security risks brought about by equity centralization. In addition, this method improves the accuracy of the system's evaluation of node reputation, so that even in the case of low equity value, high-quality nodes with high long-term contribution and stable behavior can still be selected, thereby enhancing the fairness of the blockchain system.
[0062] 3.Based on the PoCE reputation calculation, the present application introduces the FTS algorithm to periodically eliminate 5% of the nodes with the lowest reputation, ensuring that malicious nodes and long-term low-reputation nodes are gradually removed from the consensus committee. This further improves the security of the consensus committee, prevents the reputation scoring mechanism from being manipulated, and prevents high-equity but low-reputation nodes from occupying the consensus committee seats for a long time, thereby enhancing the robustness of the blockchain network.
[0063] The above only describes the preferred embodiments and principles of the present application, and for ordinary skilled persons in the art, the specific implementation methods will change according to the ideas provided by the present application, and these changes should be considered as the protection scope of the present application.
Claims
1. A sharding reconfiguration method based on node reputation election, characterized by: Follow these steps: S1. Consensus node rotation cycle Epoch initialization: Generate and broadcast random numbers. ; S2. Calculate the Stake increment; for nodes Calculate equity increment ,in Indicates the current Epoch node The value of the pledged equity, Indicates the previous Epoch node The value of the pledged equity, based on the calculated Find the median of the absolute values of all node increments. and interquartile range ,in , These are the 25th and 75th quantiles of the absolute value of the increment; Set threshold for abnormal equity increments ,like This indicates that the node's equity increment is abnormal, making it an abnormal node; S3. When each new node joins the candidate committee of a shard in the network, it sends a transaction to participate in the election and successfully reaches consensus and produces a block; the transaction records the node's current staked value. Stake is smoothed to obtain the minimum node stake value. and maximum value Other values will be mapped to Within the range; S4. Calculate node reputation; in each epoch, calculate the staked value S of any node i in each shard. i Contribution E in the most recent Epoch i Historical contribution H i And the degree of consensus marginalization P i The reputation of node i in the next Epoch is calculated using the Proof-of-Consensus (PoCE) consensus algorithm. The PoCE formula for node i is as follows: ; in , representing the weights of different influencing factors; S5, Consensus Committee Node Elimination; Contribution E of the Most Recent Epoch i Defined as the number of transactions in the current shard where a node was elected leader and successfully completed consensus in the previous Epoch, and the node is assigned according to E. i Value sorting directly eliminates consensus node E within the shard. i The smallest value is 5%; Calculate the PoCE for each node according to the PoCE formula. i and maximum PoCE max Run the FTS algorithm to convert PoCE max PoCE i The difference is calculated as the elimination weight, and mapped to the corresponding node according to the weight distribution. The selection is repeated until 5% of the nodes participating in consensus within the shard are eliminated; a total of 10% of the consensus nodes in the system are eliminated. The FTS algorithm uses an improved Merkle tree structure to implement the equity allocation mechanism. The weight value of each non-leaf node is formed by recursively summing the weights of its left and right child nodes, while the leaf nodes directly store the actual equity value of the corresponding equity owner. In the path selection phase, the system determines the traversal direction of the left and right subtrees through a random seed. The random seed is a global random number of the current Epoch, and the eliminated nodes will be added to the candidate committee of this shard. S6, Consensus Committee Election; The reputation of all candidate nodes is calculated using the PoCE formula, and the FTS algorithm is used to select the candidate node. n nodes are designated as new consensus nodes; the initial consensus committee size is n, and the candidate committee size is m; the final number of consensus nodes after the update is [number missing]. .
2. The sharding reconfiguration method based on node reputation election as described in claim 1, characterized in that, In step S3, the Stake smoothing process is as follows: Calculate the median of the current stake value of all consensus nodes. Set the maximum allowable change in equity value. Set a cutoff value for equity value That is, it is represented as ; Select the smoothing coefficient based on the anomaly marker. New equity value for compute nodes: 。 3. The sharding reconfiguration method based on node reputation election as described in claim 1, characterized in that, The degree of consensus marginalization P in step S4 i During the calculation process, an election cumulative state value is stored for each node. The corresponding calculation method is as follows: the election cumulative state value starts counting from 0. Once a node is elected as a consensus node, the value is incremented by 1; otherwise, it is decremented by 1. After determining the maximum election cumulative state value among all nodes in the system, the maximum election cumulative state value is subtracted from the election cumulative state value of each node, and the difference is used as the consensus marginalization degree P of each node. i .
4. A sharding reconfiguration system based on node reputation election, used to perform the method as described in any one of claims 1-3, characterized in that, Includes the following modules: Initialization module: Initializes the consensus node rotation cycle (Epoch), generates and broadcasts random numbers. ; Equity value increment calculation module; for nodes Calculate equity increment ,in Indicates the current Epoch node The value of the pledged equity, Indicates the previous Epoch node The value of the pledged equity, based on the calculated Find the median of the absolute values of all node increments. and interquartile range ,in , Set thresholds for abnormal equity increments at the 25th and 75th percentiles of the absolute value of the increment. ,like This indicates that the node's equity increment is abnormal, making it an abnormal node; Smoothing Module: When each new node joins the network and enters the candidate committee of a shard, it sends a transaction to participate in the election and successfully reaches consensus to produce a block; the transaction records the node's current staked value. Stake is smoothed to obtain the minimum node stake value. and maximum value Other values will be mapped to Within the range; Node Reputation Calculation Module: In each Epoch, based on the stake value (StakeS) of any node i in each shard... i Contribution E in the most recent Epoch i and historical contribution H i The reputation of node i in the next Epoch is calculated using the Proof-of-Consensus (PoCE) consensus algorithm. The PoCE formula for node i is as follows: ; in , representing the weights of different influencing factors; Consensus Committee Node Elimination Module: Contribution E of the most recent Epoch i Defined as the number of transactions in the current shard where a node was elected leader and successfully completed consensus in the previous Epoch, and the node is assigned according to E. i Value sorting directly eliminates consensus node E within the shard. i The smallest value is 5%; Calculate the PoCE for each node according to the PoCE formula. i and maximum PoCE max Run the FTS algorithm to convert PoCE max PoCE i The difference is calculated as the elimination weight, and mapped to the corresponding node according to the weight distribution. The selection is repeated until 5% of the nodes participating in consensus within the shard are eliminated; a total of 10% of the consensus nodes in the system are eliminated. Consensus Committee Election Module: Calculates the reputation of all candidate nodes using the PoCE formula, and elects the leader using the FTS algorithm. n nodes are designated as new consensus nodes; the initial consensus committee size is n, and the candidate committee size is m; the final number of consensus nodes after the update is [number missing]. .
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-3.
Citation Information
Patent Citations
An efficient storage reconfiguration method for blockchain sharding
CN112511590B
Supervisable block chain dynamic fragment design method and system
CN116389483A
System and method of blockchain consensus mechanism with custom hardware based on geographic distribution, density, node asset and reputation
US20200162261A1