CN113037504A - Node excitation method and system under fragment-based unauthorized block chain architecture - Google Patents
Node excitation method and system under fragment-based unauthorized block chain architecture Download PDFInfo
- Publication number
- CN113037504A CN113037504A CN202110593805.1A CN202110593805A CN113037504A CN 113037504 A CN113037504 A CN 113037504A CN 202110593805 A CN202110593805 A CN 202110593805A CN 113037504 A CN113037504 A CN 113037504A
- Authority
- CN
- China
- Prior art keywords
- common
- node
- nodes
- transaction
- fragment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 239000012634 fragment Substances 0.000 title claims abstract description 255
- 238000000034 method Methods 0.000 title claims abstract description 76
- 230000005284 excitation Effects 0.000 title claims abstract description 28
- 230000006870 function Effects 0.000 claims abstract description 62
- 238000012795 verification Methods 0.000 claims abstract description 61
- 238000009826 distribution Methods 0.000 claims abstract description 59
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 57
- 230000008569 process Effects 0.000 claims abstract description 35
- 230000002068 genetic effect Effects 0.000 claims abstract description 28
- 210000000349 chromosome Anatomy 0.000 claims abstract description 25
- 230000003068 static effect Effects 0.000 claims abstract description 15
- 230000007246 mechanism Effects 0.000 claims description 47
- 238000013467 fragmentation Methods 0.000 claims description 35
- 238000006062 fragmentation reaction Methods 0.000 claims description 35
- 238000004806 packaging method and process Methods 0.000 claims description 7
- 230000008901 benefit Effects 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 10
- 238000004458 analytical method Methods 0.000 description 9
- 230000008859 change Effects 0.000 description 8
- 238000005457 optimization Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 230000000638 stimulation Effects 0.000 description 5
- 238000009827 uniform distribution Methods 0.000 description 5
- 230000006399 behavior Effects 0.000 description 4
- 238000005192 partition Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000035772 mutation Effects 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- 208000032538 Depersonalisation Diseases 0.000 description 1
- 206010028980 Neoplasm Diseases 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 201000011510 cancer Diseases 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000036210 malignancy Effects 0.000 description 1
- 238000012067 mathematical method Methods 0.000 description 1
- 230000008450 motivation Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
- H04L67/1078—Resource delivery mechanisms
- H04L67/108—Resource delivery mechanisms characterised by resources being split in blocks or fragments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Evolutionary Biology (AREA)
- Signal Processing (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Marketing (AREA)
- Biomedical Technology (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Physiology (AREA)
- Genetics & Genomics (AREA)
- Artificial Intelligence (AREA)
- General Business, Economics & Management (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a node excitation method and a node excitation system under a fragment-based unauthorized blockchain architecture, wherein the method comprises the following steps: the method comprises the steps of fragment forming, transaction distribution, verification and consensus and block outlet, wherein in the transaction distribution step, service fragments receive transactions of users, random numbers generated based on a VRF algorithm are used as seeds, the transaction amount ratio of each fragment is used as a chromosome, and an optimal transaction distribution scheme is obtained based on a genetic algorithm; in the verification and consensus step, the service fragment predicts the consensus strategies of the common nodes by adopting utility value functions corresponding to different consensus strategies through the common nodes in the common fragment based on a static game model, and calculates the credit value ratio of the common nodes based on the credit values of the common nodes in the common fragment after the previous round of block generation so as to carry out reward distribution corresponding to the transaction fee; and in the block outputting step, the service fragment obtains the transaction verification duration of each common node, and calculates the credit value corresponding to each node in the block outputting process.
Description
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method and a system for node excitation under an unlicensed blockchain architecture based on fragmentation, and in particular, to a method and a system for inter-chip collaborative excitation under an unlicensed blockchain architecture based on fragmentation.
Background
The fragmentation technology is one of the capacity expansion technologies on the block chain, all nodes in the network are divided into a plurality of sets, and transaction and consensus blocks are independently verified in each set, so that the system expandability can be improved. Therefore, the fragmentation technique is considered as one of the effective ways to improve the blockchain scalability and break the "impossible triangle" performance bottleneck of the blockchain. However, while the current phase consensus layer security and efficiency issues are more fully studied in blockchain slicing systems, there is less incentive layer-related analysis and research. In a block chain fragmentation system, verification nodes are uniformly distributed in each fragment, and most mainstream fragmentation schemes including Elastico, Omnilhedger, RapidCarin and the like adopt a Byzantine Fault-tolerant algorithm (PBFT) voting-type consensus protocol such as a Practical Byzantine Fault tolerant algorithm (PBFT) as the fragment consensus so as to improve the scalability and consistency of the consensus. However, due to the lack of research on the mechanism of the BFT class consensus excitation, when the BFT class consensus is applied to an unauthorized blockchain system, the problem of economic excitation is encountered, and it cannot be guaranteed that the selfish node correctly participates in the consensus protocol. That is, most of the existing fragmentation schemes lack an incentive mechanism capable of promoting mutual cooperation of nodes in the fragmentation and participating in consensus as much as possible, so that some selfish nodes adopt some strategies which are not beneficial to maintaining the blockchain system for obtaining higher rewards, and the benefits of the selfish nodes are improved, thereby harming the stability and the safety of the whole blockchain system. The problem is more prominent under an unauthorized blockchain fragmentation system, and because the number of verification nodes in the fragmentation is small, if most selfish nodes choose to invest little computing resources to participate in consensus or not to participate in consensus, the fragmentation cannot be blocked in time, and the efficiency, the availability and the safety of the whole fragmentation system are affected.
In the fragment-based unauthorized blockchain, the game analysis of selfish nodes and the analysis of transaction allocation strategies are lacked, which is very important for designing an incentive mechanism. Further, assuming that each node in a segment is rational and private, when the expected profit of the node is less than the node investment cost, the node may choose to be in a passive idle state, so as not to participate in verification of intra-segment transactions or consensus of blocks, and if the situation is increased, the consensus efficiency and block output speed of the segment system are seriously affected. To solve the problem, a GTSB (the Game scientific shared-based block chain of Game theory) mechanism uses a non-cooperative static Game model to analyze the behavior strategy of the node, and proves that when the reward is equally distributed in all nodes, the node selection failure is a Nash equilibrium. If a fair reward distribution principle is considered, rewards are only equally distributed among all participants, and participation is Nash equilibrium after relevant parameters meet a certain relation, so that nodes can be stimulated to cooperate with each other more than equal distribution, and fairness is improved.
In the GTSB mechanism, the heterogeneity of the investment of all participating cooperative nodes is not considered, since the nodes are assumed to have the same computing power and capacity. However, in an actual blockchain system, hardware costs of each node are different, so that the computing power of the nodes is different, and the speed of verification transaction is different. In addition, the node also affects the stability of the network according to the amount of the cost investment of the node for maintaining the network, and if the network delay occurs, the consensus speed is directly affected, so that the node cannot be stimulated to input more computing resources if the nodes are equally distributed among the participants, and meanwhile, the fairness of stimulation is also affected.
The problem that more nodes can not be effectively stimulated to better participate in on-chip consensus in an unauthorized blockchain fragmentation system is a problem to be solved urgently.
Disclosure of Invention
In order to solve the problem that more and better intra-chip consensus of nodes cannot be effectively stimulated in the existing unauthorized blockchain fragmentation system, the invention aims to provide a method and a system for intra-chip inter-chip collaborative stimulation under an unauthorized blockchain architecture based on fragmentation, so that selfish nodes are stimulated to participate to the greatest extent and more computing resources are invested into the consensus process, and the efficiency, the availability and the safety of the whole fragmentation system are improved.
In one aspect of the present invention, a method for inter-chip collaborative excitation under an unlicensed block chain architecture based on fragmentation is provided, the method comprising the following steps:
a fragment forming step, in which the determined nodes of the service fragments generate public unbiased verifiable random numbers based on a verifiable random number VRF algorithm, and the registered nodes are distributed to common fragments to form a fragment structure comprising one service fragment and a plurality of common fragments, wherein the service fragment and the common fragments comprise unauthorized main nodes and unauthorized common nodes;
a transaction allocation step, wherein the service fragments receive the transaction of a user, random numbers generated based on a VRF algorithm in the fragment forming step are used as seeds, the divided transaction amount of each fragment is used as a chromosome, a fitness function of a genetic algorithm is obtained based on respective corresponding objective functions of the total number of nodes participating in consensus and the total number of nodes not participating in consensus in the previous round of consensus process fragments, an optimal transaction allocation scheme is obtained by using the genetic algorithm, and the transaction is allocated among common fragments through a main node of the service fragments based on the transaction allocation scheme;
a verification and consensus step comprising:
the common fragments which receive the transaction verify the transaction based on the mutual recognition protocol of Byzantine fault-tolerant algorithm BFT, the common nodes which participate in the mutual recognition decision return signatures to the main nodes in the fragments, the main nodes in the fragments generate sub-blocks after receiving the signatures and send the sub-blocks to the service fragments, and the sub-block heads in the sub-blocks comprise the number of the signatures returned by the common nodes of the current common fragments and the transaction verification duration of each common node;
the service fragment predicts consensus strategies adopted by all common nodes by adopting utility value functions corresponding to different consensus strategies through common nodes in the common fragment based on a static game model, calculates credit value ratio of all common nodes based on credit values of the common nodes in the common fragment after the previous round of block generation, and performs reward distribution corresponding to transaction fees of the common nodes in the common fragment based on the credit value ratio;
and a block outputting step, namely, the service fragments receive the sub-blocks from the common fragments and obtain the transaction verification duration of each common node, the credit value corresponding to each node in the block outputting process is calculated based on the transaction verification duration of each common node, the sub-blocks from the common fragments are integrated and the credit values are packaged, and a final block is generated and is subjected to whole-network broadcasting.
In some embodiments of the invention, the method further comprises the steps of: each node within a common fragment synchronizes reputation values of other nodes within the common fragment based on the broadcast of the service fragment.
In some embodiments of the invention, the method further comprises: and the service fragment determines the block reward of the main node in the common fragment based on the number of the signatures packaged into the sub-blocks and distributes the reward.
In some embodiments of the present invention, the slice forming step includes: the nodes of the service fragments run a VRF algorithm based on public information to generate a public unbiased verifiable random number for the current operation, the registered nodes in the previous operation generate public verifiable identities by solving the workload proof PoW problem generated by the current random number, and the registered nodes are distributed into all common fragments based on the bit information of the last specific digit of the PoW result to form the fragment structure; the method for obtaining the optimal transaction allocation scheme by utilizing the verifiable transaction allocation mechanism based on the genetic algorithm comprises the following steps: taking the total number of the nodes which are selected to participate in consensus and the total number of the nodes which are selected to be invalid between the segments as targets, distributing weights to different target functions and integrating the weights into one target function, and performing intersection, variation and selection of chromosomes on the basis of the random seeds and the fitness function; when the fitness of the optimal chromosome no longer rises, the final trading allocation plan result will be output.
In some embodiments of the present invention, the assigning weights to different objective functions and integrating into one objective function includes assigning weights to different objective functions and integrating into one objective function based on the following formula:
wherein,Fis a fitness function of the genetic algorithm,express getFThe minimum value of (a) is determined,selecting the root mean square error of the quantity of the nodes participating in the consensus among the fragments,the total number of the failed nodes is selected on behalf of the whole slicing system,andare respectively asAndthe corresponding weight coefficients.
In some embodiments of the present invention, the utility value functions corresponding to the different consensus strategies include:
wherein,a utility value function is selected for the node when participating in the consensus strategy,selecting a utility value function for the node when the node does not participate in the consensus strategy;andprobability of signature being selected by master node and the secondThe number of nodes packed by the master node in each fragment;is as followsiThe transaction amount of a common segment is in proportion,fin order to be a fee for a transaction,the revenue generated for a unit of computing resource,the computational resources are invested in for the nodes,the total transaction amount received for the service fragment,in order for a node to go into a loss of fragmentation,the wear is verified for each transaction,in order to recognize the loss in common,for the loss of authentication between a node and a single node,is divided into piecesNumber of verification nodes within. In some embodiments of the present invention, the calculating the reputation value of each common node based on the transaction verification duration of each common node includes:
calculating the initial reputation value of the node by the service fragment through the transaction verification duration of the node in each common fragment according to the following formula:
wherein,is the ith sliceThe reputation value of the middle node j in the process of the round of block export,the transaction verification duration on behalf of node j,a timestamp indicating that the master node sent the transaction to regular node j in regular shard,the master node receives a time stamp of a signature of the common node j on the transaction verification;representing slicesAll nodes within the cluster verify the average value of the transaction duration,representing shardsThe number of internal nodes;
and normalizing the calculated initial credit value to obtain a common node credit value.
In some embodiments of the present invention, the calculating a ratio of reputation values of the common nodes based on reputation values of the common nodes in the common segment after the previous round of block generation includes:
calculating the credit value ratio of each common node based on the following formula:
wherein,is represented in a sliceIn the middle, the reputation value of the node j after the last round of block generation is in proportion,for the value of the node reputation to be,for the reputation value of the primary node,representing shardsThe number of internal nodes.
In some embodiments of the present invention, the transaction verification duration is a difference between a timestamp recorded by the master node when each common node returns a signature to the master node and a timestamp when the master node sends the packaged transaction to other nodes in its common sub-slice; the integrating the sub-blocks from the respective common patches and packaging the reputation values comprises integrating the sub-blocks from the respective common patches and packaging the reputation values based on a Byzantine fault tolerance algorithm.
In another aspect, the present invention further provides a fragment-based inter-fragment collaborative excitation system under an unlicensed block chain architecture, where the system includes a fragment structure of a service fragment and a plurality of common fragments, where the service fragment and the common fragments include an unlicensed host node and an unlicensed common node, and the service fragment and the common fragments include an unlicensed host node and an unlicensed common node;
the service fragment is used for generating a public unbiased verifiable random number based on a verifiable random number VRF algorithm and distributing the registered node to a common fragment;
the service fragments receive the transaction of a user, random numbers generated based on a VRF algorithm are used as seeds, the divided transaction amount ratio of each fragment is used as a chromosome, an optimal transaction distribution scheme is obtained based on a multi-target genetic algorithm, and the transaction is distributed among common fragments through a main node of the service fragments based on the transaction distribution scheme;
the common fragments are used for receiving transactions, verifying the transactions based on a mutual recognition protocol of a Byzantine fault-tolerant algorithm (BFT), returning signatures to the main node in the fragments by the common nodes participating in the mutual recognition decision, generating sub-blocks after the signatures are received by the main node in the fragments and sending the sub-blocks to the service fragments, wherein the sub-block heads in the sub-blocks comprise the number of the signatures returned by the common nodes of the current common fragments and the transaction verification duration of each common node;
the service fragment also predicts consensus strategies adopted by the common nodes by adopting utility value functions corresponding to different consensus strategies based on the common nodes in the common fragment in a static game model, calculates credit value ratio of the common nodes based on credit values of the common nodes in the common fragment after the previous round of block generation, and performs reward distribution corresponding to transaction fees of the common nodes in the common fragment based on the credit value ratio;
the service fragments receive the sub-blocks from the common fragments and obtain the transaction verification duration of the common nodes, the credit value corresponding to each node in the block round process is calculated based on the transaction verification duration of the common nodes, the sub-blocks from the common fragments are integrated and the credit values are packaged, and a final block is generated and is broadcasted in the whole network.
According to the intra-chip and inter-chip collaborative excitation method and system based on the partition unauthorized block chain architecture, the intra-chip reward distribution mechanism and the inter-chip transaction amount dynamic optimization distribution mechanism are designed to stimulate selfish nodes to participate to the greatest extent and invest more computing resources into the consensus process, so that the efficiency, the availability and the safety of the whole partition system are improved.
It will be appreciated by those skilled in the art that the objects and advantages that can be achieved with the present invention are not limited to the specific details set forth above, and that these and other objects that can be achieved with the present invention will be more clearly understood from the detailed description that follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
fig. 1 is a flowchart illustrating an inter-chip co-excitation method under a partition-based unlicensed blockchain architecture according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a slicing model according to an embodiment of the present invention.
FIG. 3 is a graph of GA fitness variation in an embodiment of the present invention.
Fig. 4 is a graph showing the balance of sharing the consensus node between the segments according to an embodiment of the present invention.
FIG. 5 is a graph showing the change in consensus rate in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
It should be noted that, in order to avoid obscuring the present invention with unnecessary details, only the structures and/or processing steps closely related to the scheme according to the present invention are shown in the drawings, and other details not so relevant to the present invention are omitted.
It should be emphasized that the term "comprises/comprising/comprises/having" when used herein, is taken to specify the presence of stated features, elements, steps or components, but does not preclude the presence or addition of one or more other features, elements, steps or components.
In order to solve the problem that more nodes can not be effectively stimulated to better participate in on-chip consensus in an unauthorized block chain fragmentation system, the invention provides an on-chip and inter-chip collaborative stimulation mechanism based on selfish node strategy analysis, and the on-chip and inter-chip collaborative stimulation mechanism stimulates the selfish nodes to participate to the maximum extent and invests more computing resources into the consensus process by designing an on-chip reward distribution mechanism and an inter-chip transaction amount dynamic optimization distribution mechanism, so that the efficiency, the availability and the safety of the whole fragmentation system are improved.
More specifically, the on-chip reward distribution mechanism analyzes the selfish node strategy through a static game model in a game theory, quantifies and characterizes the size of the computing resources invested by the nodes in the block consensus period of the current round by using the node consensus time, so as to guide the design of the on-chip reward distribution mechanism, stimulate the nodes to invest more computing resources to maintain the system and improve the system consensus and verification efficiency.
According to the dynamic optimization distribution mechanism of the inter-segment trading volume, the optimal trading volume distribution scheme (the distributed consensus scheme based on the genetic algorithm) is searched by designing the multi-objective genetic algorithm, the selfish nodes in the segments are stimulated to execute the consensus protocol to the maximum extent, the number of the participated and consensus nodes in each segment is relatively balanced, and the fairness and the activity among the segments are improved. The inter-chip trading volume dynamic optimization allocation mechanism ensures that each node can verify the execution result of the genetic algorithm by introducing a Verifiable Random number (VRF) generation method, thereby ensuring the consistency and the safety of the trading volume allocation scheme.
Fig. 1 is a flowchart illustrating an inter-chip co-excitation method under a partition-based unlicensed blockchain architecture according to an embodiment of the present invention. As shown in fig. 1, the method includes the following steps S110 to S140:
in the fragment forming step S110, a public unbiased verifiable random number is generated by the determined nodes of the service fragment based on the verifiable random number VRF algorithm, and the registered nodes are allocated to the common fragments to form a fragment structure including one service fragment and a plurality of common fragments, where the service fragment and the common fragments include an unauthorized master node and an unauthorized common node.
The embodiment of the invention provides a fragment model, and based on the fragment model, common fragments in a fragment structure are mainly responsible for transaction verification, verification time recording of each node and generation and consensus of subblocks. The service fragment is mainly responsible for network fragment, transaction allocation, node reputation value calculation and final block generation and consensus. In particular, service sharding is a semi-centralized architecture in which nodes are fixed and authorized to provide services for common shards. As an example, in the fragmentation model of the present invention, k +1 fragments are set, i.e., S = { S = }1, S2, …, Sk+1K common fragments, 1 service fragment, e.g. Si(1. ltoreq. i. ltoreq. k) is a normal fragment, Sk+1Is a service fragment.
The invention does not consider selfishness of nodes in the service fragment, and because the invention aims at an incentive mechanism under an unauthorized blockchain architecture, the invention assumes that all nodes in the common fragment are unauthorized, selfishness (i.e. profit-driven) and non-malicious. Furthermore, the computational resources invested by all nodes may be different, i.e., each node has different computational capabilities.
In this step, the service fragment runs the VRF algorithm based on public information to generate a public unbiased verifiable random number for this round Of operation, and the node that has been registered in the previous round generates a public verifiable identity by solving the problem Of Proof Of Work (PoW) generated by the current random number. And then, each registered node is randomly and uniformly distributed into each common sub-slice based on the last bit information of the PoW result, and the nodes belonging to the same sub-slice are discovered by communicating with other nodes in a full connection mode.
In the transaction allocation step S120, the service fragment receives the transaction of the user, the random number generated based on the VRF algorithm in the fragment forming step S110 is used as a seed, the divided transaction amount of each fragment is used as a chromosome, a fitness function of the genetic algorithm is obtained based on respective objective functions corresponding to the total number of the nodes participating in consensus and the total number of the nodes not participating in consensus among the fragments in the previous round of consensus process, an optimal transaction allocation scheme is obtained by using the genetic algorithm, and the transaction is allocated among the common fragments through the master node of the service fragment based on the transaction allocation scheme.
In this step, a fitness function of the genetic algorithm is obtained by performing multi-objective fusion on respective corresponding objective functions participating in the consensus and not participating in the consensus, that is, an optimal transaction allocation scheme is obtained by using the multi-objective genetic algorithm. Assume that the total transaction amount received by the service fragment isTThe transaction amount ratio of each common segment is(1≤i≤k,kThe number of common slices in the slice model). When the service fragment receives the transaction sent by the user, a verifiable transaction distribution scheme based on a genetic algorithm is operated to find an optimal transaction distribution scheme, and the transaction is distributed to the common fragment for verification.
In other words, in this step, the total number of nodes selected to participate in consensus and the total number of nodes selected to fail (not participate in consensus) between the segments are taken as targets, different objective functions are assigned weights and integrated into one objective function, and the intersection, variation and selection of chromosomes are performed based on the random seeds and the corresponding fitness functions; when the fitness of the optimal chromosome no longer rises, the final trading allocation plan result will be output.
In the verification and consensus step S130, after receiving the transaction, each common segment verifies the transaction by running a BFT consensus protocol and determines whether to participate in the consensus decision, and the common node making the consensus decision returns a signature to the host node in its segment. And when the main node receives most effective node signatures, the formed sub-blocks are sent to the service fragments to form final blocks. The sub-block comprises a sub-block body and a sub-block head. In the embodiment of the invention, the main node of the common fragment records the verification time length of each common node and sends the verification time length to the service fragment, so that the service fragment forms a common node credit value based on the verification time length of the common node, thereby representing the amount of the resource input by the node in the process of the round of block output, and further calculating the credit value ratio of each common node based on the common node credit value. As an example, the authentication duration information of the normal node may be sent to the service fragment together with the sub-block header.
More specifically, the step S130 includes:
step S131, the common node in the common segment receiving the transaction verifies the transaction based on the common recognition protocol of the practical Byzantine fault-tolerant algorithm (PBFT), the common node making the common recognition decision returns a signature to the main node in the segment, so that the main node in the segment generates a sub-block after receiving the signature and sends the sub-block to the service segment, and the sub-block head in the sub-block comprises the number of the signatures returned by the common node of the current common segment and the transaction verification duration of each common node.
As an example, a timestamp of when the master node packaged transaction was sent to the other nodes is recordedThen when each node returns the signature to the main node, the main node records the time of receiptThereby obtaining the time length of each node for verifying the transactionThis duration will be sent to the service fragment along with the sub-chunk header.
Step S132, the service segment predicts consensus strategies adopted by the common nodes by adopting utility value functions corresponding to different consensus strategies based on the static game model and the common nodes in the common segment, calculates credit value occupation ratios of the common nodes based on the credit values of the common nodes in the common segment after the previous round of block generation, and performs reward distribution corresponding to transaction fees of the common nodes in the common segment based on the credit value occupation ratios.
The method comprises the steps of predicting consensus strategies adopted by common nodes by adopting utility value functions corresponding to different consensus strategies based on common nodes in common fragments based on a static game model, bringing the credit values of the nodes in the previous round into reward distribution factors, calculating the credit value ratio of the common nodes based on the credit values of the nodes in transaction verification time, and accurately quantifying and evaluating the amount of calculation resources invested by the nodes, wherein only transaction fees are used as reward fees of the common nodes, so that the selfish nodes can invest as much as possible to obtain profits.
Furthermore, in the embodiment of the present invention, when the service fragment determines the reward allocation of the master node, the block reward is used as the resume of the master node, and the service fragment determines the block reward of the master node in the common fragment based on the number of signatures packed into the sub-blocks and performs the reward allocation.
The reward distribution mechanism in the step is a fair and safe intra-segment reward distribution mechanism, and effective incentive for putting more computing resources into the nodes in the segments is achieved.
And a block output step S140, in which the service fragments receive the sub-blocks from the common fragments and obtain the transaction verification duration of each common node, the credit value corresponding to each node in the block output process is calculated based on the transaction verification duration of each common node, the sub-blocks from the common fragments are integrated and the credit values are packaged, and a final block is generated and is broadcasted in the whole network.
And after receiving the verification time length of the sub-block head and each node returned from each common fragment, the service fragments are integrated and calculate the credit value corresponding to each node according to a uniform credit value calculation model, and then the PBFT packing credit value is operated to generate a final block and perform whole-network broadcasting. Meanwhile, each node in the common fragment synchronizes credit values of other nodes in the common fragment based on the broadcasting of the service fragment, and obtains corresponding rewards according to reward distribution strategies.
Fig. 2 shows a schematic diagram of a slicing model for implementing the above method in the embodiment of the present invention. Step 1 in fig. 2 corresponds to a fragment formation step, and the registered nodes are allocated to the respective ordinary fragments by the service fragment. Step 2 corresponds to a transaction distribution step, and the service fragment distributes the transaction among the fragments according to a transaction distribution scheme obtained by the transaction received from the user based on a genetic algorithm. Step 3 corresponds to the verification and formula step, in the step, the ordinary node receiving the transaction verifies the transaction and makes a decision to participate in consensus and then returns a signature to the main node of the fragment, the main node generates a sub-block after receiving the signature and sends the formed sub-block to the service fragment, and the head of the sub-block in the sub-block comprises the number of the signatures returned by the ordinary node and the transaction verification duration of each ordinary node. Step 4 corresponds to a block output step, in which the service fragment receives multiple sub-blocks from multiple common fragments and then integrates the sub-blocks to generate a final block and performs broadcast over the whole network. In the embodiment of the invention, in the step 2, a dynamic optimization allocation mechanism of the inter-segment transaction amount based on a genetic algorithm is adopted to stimulate selfish nodes in the segments to execute the consensus protocol to the maximum extent, so that the number of the participating and consensus nodes in each segment is relatively balanced, and the fairness and the activity among the segments are improved. In step 3, the on-chip reward distribution mechanism provided by the invention is adopted to guide the design of the on-chip reward distribution mechanism, and the incentive nodes invest more computing resources to the system maintenance, so that the system consensus and verification efficiency is improved.
Compared with other excitation mechanisms, the on-chip and inter-chip collaborative excitation mechanism provided by the on-chip and inter-chip collaborative excitation method based on the unauthorized block chain architecture of the invention takes the on-chip excitation state as the basis of the inter-chip excitation, and dynamically maintains the excitation of the whole fragmentation system. Specifically, for on-chip excitation, a selfish node strategy is analyzed based on a static game model, the size of computing resources invested by nodes in the block consensus period of the current round is quantified by credit values, a fairer reward distribution mechanism is guided to be realized, the excitation nodes invest more computing resources to the consensus process, and the block outlet efficiency is improved. For the inter-segment, a multi-target genetic algorithm is designed to search an optimal transaction allocation mechanism based on the current in-segment excitation state, intra-segment nodes are excited to participate in consensus to the maximum extent, meanwhile, the number of the inter-segment nodes participating in consensus is relatively balanced, and fairness and activity are improved.
Some steps of the inter-chip co-excitation method under the tile-based unlicensed blockchain architecture of the present invention are described in more detail below.
In an embodiment of the present invention, the reputation value of each common node is calculated based on the transaction verification duration of each common node by using a predetermined reputation model, and the step of calculating the reputation value of each common node based on the reputation model includes: calculating the initial reputation value of the node by the service fragment through the transaction verification duration of the common node in each common fragment by using the following formula (1):
wherein:
wherein,is the ith sliceThe credit value of the middle node j in the block output process in the current round is that i is more than or equal to 1 and less than or equal to k,the transaction verification duration on behalf of node j,a timestamp indicating that the master node sent the transaction to regular node j in regular shard,indicating that the master node received a timestamp that the regular node j signed the transaction verification.Representing slicesAll nodes within the cluster verify the average value of the transaction duration,representing shardsThe number of inner verification nodes.
The embodiment of the invention uses a logarithmic formula in the formula (1) to properly reduce the variance of the reputation value, thereby avoiding some extreme situations.
After the initial reputation value of the common node is obtained through calculation, the embodiment of the invention also performs normalization processing on the initial reputation value, so that different node reputation values are in the same order of magnitude, and comparison is more convenient. As an example, the invention normalizes the reputation values using the Min-Max normalization method, as shown in equation (4) below:
wherein,is divided into piecesThe highest value of the reputation values in the set,is divided into piecesThe lowest reputation value in the set. So far, the nodes of the signature contained in the final block have a quantifiable reputation value which can evaluate the amount of the computing resources invested by the nodes after the block is turned out, and the rest nodes which do not participate in the consensus process or the signature is not packaged into the block by the main node have no reputation value. For the master node in each segment, the reputation value of the common node in each segment may be averaged to serve as the reputation value of the master node in the segment, since the master node does other work (e.g., packaging transactions).
The calculated reputation value of the node can be used for dynamically optimizing distribution of inter-chip transaction amount of genetic algorithm and determining reward distribution of the node in the common fragment in the next round of whole operation (including the steps of fragment formation, transaction distribution, transaction verification and consensus, block ending and the like).
In the consensus process based on the fragmentation model, after receiving the transaction sent by the main node, each common node simultaneously and independently makes strategy selection, namely whether to participate in the consensus process of the time is selected, if the participation is selected, the node needs to select the amount of the input computing resources, and therefore the game adopted by the consensus strategy for predicting the common nodes is a static game G essentially. In addition, the static game is assumed to have the following characteristics: (i) non-cooperative gaming: each node follows up self benefit maximization to carry out autonomous decision based on the principle of 'individual behavior rationality', and is unrelated to other nodes; (ii) full information gaming: all nodes know the current game rules and the strategy information possibly selected by other nodes in the game, namely the information of the number of current fragmentation nodes, the credit value of each node, the transaction amount and the like; (iii) and (4) unlimited strategy gaming: nodes are a continuously finite variable in selecting how much computing resources to invest, and thus there are countless alternatives to the selectable strategy.
In the embodiment of the invention, the service fragment predicts the consensus strategies adopted by the common nodes by adopting the utility value functions corresponding to different consensus strategies based on the static game model by using the common nodes in the common fragment, so that the utility function calculation formula of each node when selecting different strategies needs to be determined, and the node awarding and the node loss are supposed and defined. For node loss part, the necessary loss is dividedAnd unnecessary loss. Wherein,the loss in the process of fragment composition is the loss which a node wants to join the fragment system. In the fragmentation system of the invention, the nodes need to solve the PoW problem to enter the fragmentation, so the invention assumes the loss of the part as. And then, the node communicates with other nodes in a full-connection network mode to find other nodes belonging to the same fragment. In this process, the present invention assumesThe loss of identity authentication between a node and a single node is related to the number of nodes in a fragment, and the assumption is thatIs divided into piecesThe number of verification nodes in the system is reduced, so that the loss of the nodes in the identity authentication process of the fragmentation system isNecessary loss ofAs shown in equation (5):
for on-chip consensus, after the node receives the transaction sent by the master node, policy selection needs to be made, namely whether to participate in the consensus process and how much computing resources are invested. If the node chooses not to participate, unnecessary loss is not borneOtherwise, the burden is required. In validating and agreeing on transactions, we considerThe calculation resource consumption of the node is in direct proportion to the calculation resource consumption of the node, namely the more calculation resources the node consumes,and will become more. In addition, the number of transactions verified by the node is directly determinedThe size of (2). We assume that a node invests computational resources ofEach transaction verifies a loss ofA consensus loss of. Meanwhile, according to the slicing model, slicing is realizedS i The transaction amount is divided intoAnd therefore is not necessarily lossyAs shown in equation (6):
in the sharding system, if the nodes participate in consensus, the reward obtained by the nodes has two parts, namely block-out reward and transaction fee. The block out reward is generated after the final block is generated, and is assumed to beR b The transaction fee is a fee charged by the user for the cryptocurrency transaction to reward the verification and consensus of the node on the transaction, assuming that the fee for one transaction isf. In addition, the benefit of the node not participating in the consensus is also considered, the benefit is generated by other transactions of the computing resource which is put into the consensus process, and the benefit generated by one unit of the computing resource is assumed to beThereby obtaining the portion of the overall profit asThe utility function when the node chooses not to participate in the consensus strategy is shown in formula (7):
how to distribute the rewards generated in a sharded system is a key issue for studying incentive mechanisms. In the existing GTSB mechanism, it is verified that the reward is more equitable and motivative to distribute evenly among all nodes participating in consensus than to distribute evenly among all nodes. If the fair allocation mode is adopted, the utility function of the node when selecting to participate in the policy is shown as formula (8):
wherein,a utility value function is selected for the node when participating in the consensus strategy,andprobability of signature being selected by master node and the secondiThe number of nodes packed by the master node in each fragment.
There are situations where the master node does not intentionally or inadvertently package a signature of a participating consensus node, as none of the perfect methods currently find out to dispute and prove who is not really a node participating in the consensus during the course of running the PBFT. Therefore, supposeIs a sliceThe number of nodes of the medium signature packaged by the main node is used for representing the rough number of the nodes participating in the consensus,is the probability that the signature was chosen by the master node.
in view of the above-mentioned analysis,is a negative number, so the utility value of the node in selecting to participate in the strategy is calculated according to the investment of computing resourcesThe increase and decrease of the data transmission rate are reduced, for a selfish node with the advantage, the adoption of the minimum computing resource is a Nash equilibrium strategy, and the time for verifying the transaction by the node is slowed down, so that the block output efficiency of the whole fragmentation system is influenced. Therefore, in the embodiment of the invention, a novel on-chip reward allocation mechanism is provided, which can safely and effectively stimulate the nodes to invest more computing resources and improve the system consensus speed and the block-out efficiency.
The problem of fair allocation of rewards failing to incentivize nodes to invest more computing resources is that no correlation between rewards and computing resource investments is established per se. If the more the nodes invest and the more the reward is obtained, the selfish nodes can invest as much as possible to obtain the benefit. In the invention, a node credit value calculation model based on transaction verification time is designed, and the amount of calculation resources input by the nodes is accurately and quantitatively evaluated. Therefore, the invention can take the node reputation value into consideration of the reward distribution, and simultaneously, the safety of the reward distribution is also considered, namely the condition that the node is badly done at the incentive layer is required to be considered.
The intra-segment reward distribution mechanism provided by the invention is more fair and safer. Specifically, the invention performs different reward distribution on the on-chip main nodes and the common nodes, wherein the reward is only transaction fee for the common nodes, and the reward is only block reward for the main nodes in the sub-chips. The specific reason is analyzed as follows:
since it is assumed that the nodes are selfish, there is a possibility that the nodes do bad in the incentive layer of the sharded system to obtain more rewards, but do good for themselves but are not beneficial to the behaviors of other nodes, and the ecology of the whole system is affected. In the invention, the time for verifying the transaction of each node in the fragment is determined by the master node, and whether the master node is honest or not essentially directly influences the income of other nodes. Therefore, the action of the master node needs to be focused, so that no benefit or little benefit is generated when the master node makes a bad job, and the benefit of each node is indirectly ensured. Specifically, consider two dominant modes of operation, mode A and mode B, respectively.
Mode A, the main node maliciously tampers with the timestamps of other node verification transactions.
And in the mode B, the main node colludes with other nodes and intentionally does not contain the signatures of some honest nodes.
For the mode A, in the reward distribution mechanism (the ordinary node reward is only transaction fee, and the main node reward is only block reward), the main node is well ensured not to have the motivation of maliciously tampering the timestamps of other nodes. Specifically, the reward allocated to the master node is only a block reward, while the reward allocated to the general node is only a transaction fee, so that the master node does not affect the benefit even if the timestamp of other nodes is tampered. If the main node also scores the transaction fee based on the credit value, the main node can improve the credit value ratio of the main node by maliciously modifying the time stamps of other nodes so as to obtain more rewards.
In the case of mode B, the way of colluding and dislocating is hardly found due to its concealment, and therefore cannot be identified by consensus, and the adverse effect of such dislocating can only be reduced by excitation. In short, the invention makes the block reward finally obtained by the main node and the number of the packaged signatures have positive correlation, and meanwhile, the block reward is larger than the transaction fee obtained by other nodes. Thus, the best way for the master node to increase revenue is to package as many other node signatures as possible, rather than colluding to dislike and share rewards with partner nodes.
Through the analysis, the on-chip reward distribution mechanism provided by the invention is a fair and safe reward distribution mechanism, and the effective incentive of investing more computing resources to nodes in the fragments is realized.
In the embodiment of the present invention, for a common node, since the reward is only a transaction fee and will be allocated according to the ratio of the reputation value of each node, the utility function is as shown in formula (10):
wherein:
is represented in a sliceIn the middle, the reputation value of the node j after the last round of block generation is in proportion,for the value of the node reputation to be,for the reputation value of the primary node,representing shardsThe number of inner verification nodes. It is worth noting that the reputation value after the block is output in the current round needs to be obtained through service fragment calculation, so that when the node makes a strategy selection, the reputation value after the block is output in the current round cannot be predicted, and the utility value after the selection participation in the consensus strategy cannot be judged, so that the method selectsAnd the credit value of the previous round is used as the reward distribution basis of the current round, so that the usability of the node game analysis is ensured. On the other hand, when computing reputation value ratios, the sum of node reputation values within a segment does not include the master node reputation value, since if included, there is a potential for the master node to tamper with other node timestamps for trending.
For the master nodes in the sub-slices, since the reward is only a block reward, which is related to the number of signatures packed into the sub-blocks, and when the parameters are set, it is ensured that each master node obtains a block reward larger than other nodes to obtain the transaction fee, the utility function is as shown in equations (12) and (13):
wherein:
wherein,as a function of the utility of the master node,is divided into piecesThe number of signatures packed into the sub-block by the master node,it means that the master node is proportional to the number of signatures that the master node collects in all the ordinary fragmented master nodes. The design can stimulate the master node to pack the signatures of other nodes as much as possible to the maximum extent, and reduce the collusion of the master node and other nodesThe effects of malignancy. At the same time, a design that allows the master node to earn more than other nodes will ensure fairness in the allocation of rewards because the master node performs more tasks (e.g., packaging transactions) than other nodes in the consensus process.
In the sharding system, a reasonable inter-sharding transaction amount distribution scheme needs to be found for designing a good incentive mechanism. Therefore, the invention also proposes a new transaction allocation mechanism: a verifiable transaction allocation mechanism based on genetic algorithms that securely incentivizes selfish nodes within segments to participate in consensus protocols.
The goal of finding a reasonable inter-slice transaction amount allocation scheme is to find a transaction amount allocation scheme that meets the target expectations. By utilizing the characteristics of a Genetic Algorithm (GA), the optimal transaction amount distribution scheme can be found through one iteration only by defining information such as a fitness function expression, a chromosome, algorithm parameters and the like. The transaction allocation mechanism provided by the invention is intended to meet the maximization of the number of the participation and consensus nodes in the system and the relative balance of the number of the participation and consensus nodes among all the fragments, so that on one hand, more nodes can be stimulated to participate in consensus, on the other hand, the stimulation fairness among all the fragments can be ensured, each fragment has almost the number of the nodes to participate in consensus, and the availability of the system is improved.
There are two problems to be solved in developing an ideal transaction allocation mechanism. The first problem is how the service fragment determines the policy choice of each node in the current consensus process. The second problem is that the GA is an uncertain algorithm, and each node in the service slice is calculated separately to obtain different results, so how to ensure the GA result consistency safely and effectively is very important.
For the first problem, the service fragment replaces each node to perform static game, so that the strategy adopted by the node in the current round of consensus can be predicted. Specifically, based on the foregoing analysis of the reward distribution mechanism, the utility value function of the node selecting different strategies in the consensus process can be finally obtained, as shown in equations (15) and (16):
wherein,a utility value function is selected for the node when participating in the consensus strategy,and selecting a utility value function for the node when the node does not participate in the consensus strategy.
In the game process, assuming that the common information parameter values faced by the nodes are certain, only the nodes actually influencing the game result invest computing resourcesRatio of reputation valueAnd transaction amount allocation ratio. For theIt is assumed that the more node investments and the more earnings can be ensured by the reward distribution mechanism and the proper parameter setting of the invention, so that the assumption can be made thatIs a constant value. For theBecause the credit value after the block is output in the previous round is used as the reward distribution basis of the current round, the credit value ratio is a determined value known by all nodes. WhileIt is the value that needs to be determined by the GA. Therefore, the service fragment can predict the policy selection commonly recognized by the nodes in the current round based on the utility functions of different policies of the nodes.
For the second problem, the uncertainty of the GA is caused by the randomness when the chromosomes are initialized and the chromosome crossing and variation are performed, however, the randomness is pseudo-random in nature, so that the whole GA operation process and the operation result are deterministic as long as the random seed used by the GA process is determined, and thus the service slicing can form consensus on the transaction distribution scheme output by the GA. The generation environment of the random seed must be safe and can have unbiased and verifiable characteristics, so that the invention selects the random number generated based on VRF when the random number is used for forming the fragmentation as the random seed of the GA, thereby ensuring the consistency of the distributed operation results of the GA.
In the GA model of the invention, the goal of the service-sliced GA running is to find the optimal trade allocation scheme, for which the trade allocation scheme is converted into a chromosome form, as shown below:
wherein,a chromosome representing the distribution of transactions, which is a ratio of the transaction amount divided by each segmentAnd (4) forming. After the chromosomes are present, the fitness function is further defined. Because there are two goals to expect (to participate in consensus and not to participate in consensus), the GA book designed by the present inventionThe method is a multi-objective optimization problem in nature, multiple objectives can be fused into a single objective through a mathematical method, as an example, a weight coefficient conversion method can be adopted, weights are distributed to each objective function and combined into one objective function, and then the fused single objective function is as follows:
wherein:
in equation (19), F is the fitness function expression of the GA algorithm,andfor the purpose of two different objective functions,andthe corresponding weight coefficient. In the formula (20), in the following formula,root Mean Square Error (RMSE) representing the number of inter-slice selective consensus nodes, whereinIs divided into piecesParticipating in consensus nodeThe number of the components is equal to or less than the total number of the components,and (4) taking part in the average value of the number of the common knowledge nodes for the fragmentation system. In the formula (21), the first and second groups,and selecting the total number of the failed nodes on behalf of the whole slicing system. WhereinIs divided into piecesThe number of failed nodes of (a) is,is a control variable for controllingThe interval range of (2).
Through the definition of chromosome and fitness function, a verifiable transaction allocation mechanism based on genetic algorithm is designed and implemented, and in the mechanism, a chromosome cross operator is assumed asWith a probability of(ii) a The chromosome mutation operator isWith a probability of(ii) a The population number is M; selecting an operator as S; the number of times of the constant fitness isThe threshold value is(ii) a The parent set is F, the crossed offspring set is O, the mutated offspring set is O, and the next round of parent set after selection is F. Further, the operation process of the protocol comprises two parts, wherein one part is that a random number generated based on VRF is used as a random seed of GA; the other part is a population iteration process of GA, which mainly comprises chromosome crossing, mutation, selection and the like. When fitness of the optimum chromosome is not raised any more, i.e. not changed timesReach the threshold valueThe final result will be output.
In the invention, the concept of the credit value of the node is introduced to evaluate the consensus behavior of the node and establish the correlation between the credit value and the income, so that the node with high credit value can obtain more rewards, thereby realizing the fairness of reward distribution. In addition, the utility value change corresponding to different strategies is selected by using dynamic game model analysis nodes in the game theory, and a transaction dynamic distribution mechanism is designed through a genetic algorithm, so that the activity in each fragment and the system safety are improved while the honest node number in each fragment is ensured to be majority. Research results show that compared with other block chain fragmentation excitation mechanisms, the scheme provided by the invention can better improve the excitation fairness and the system safety and activity.
The invention uses golong and python to prove and simulate the scheme of the excitation mechanism. The simulation parameters are shown in table 1:
table 1: simulation parameter examples.
In the simulation experiment, three points are mainly concerned: (1) the change of GA fitness; (2) the RMSE change of the quantity of the nodes participating in the consensus among the fragments; (3) and (4) node consensus participation rate of the whole fragmentation system. Meanwhile, the change of the transaction uniform distribution mechanism in the indexes is compared.
Fig. 3 shows the change in fitness of GA during population iteration. Assuming that the initial reputation value of each node is randomly generated, the fitness is about 5.678 at the beginning, and the number of the reference and common nodes in the five shards is 65, 56, 63, 57 and 68 respectively. With the iteration of the population, chromosomes with high fitness are gradually eliminated, so that the optimal fitness in the population gradually becomes smaller, becomes stable after 150 generations and does not become smaller until a threshold value of the fitness invariant times is met, and a result is output. The finally found transaction amount distribution scheme enables the number of the shared common identification nodes in the five fragments to be 63, 64, 63, 64 and 63 respectively. Therefore, compared with the initial result, the indexes of the total number of the nodes participating in the consensus and the root mean square error between the fragments are obviously improved.
Fig. 4 illustrates the process of the scheme of the present invention and the existing transaction uniform distribution scheme on the RMSE of the number of participating consensus nodes between the segments as the reputation value RMSE changes. The experimental result shows that when the credit values among the fragments are unevenly distributed, the scheme of the invention can dynamically maintain the balance of the number of the reference and common identification nodes in each fragment. Specifically, as the reputation value RMSE increases, the number of nodes participating in consensus among the segments increases, i.e., the trade uniform allocation scheme becomes more unbalanced. The scheme provided by the invention can be gradually stabilized in a very low range along with the increase of the credit value RMSE, and the fairness and the activity among the fragments can be ensured.
Fig. 5 illustrates the process of the scheme of the present invention and the existing transaction uniform distribution scheme in the change of the consensus participation rate of the whole sharding system along with the change of the reputation value RMSE. The test result shows that compared with the existing uniform distribution scheme, the scheme of the invention can always ensure that more nodes participate in consensus, has better excitation effect and is beneficial to the maintenance of the whole fragmentation system.
The control and experiment result verifies that compared with a general transaction uniform distribution scheme, the transaction distribution scheme of the invention can stimulate the nodes to participate in consensus, can ensure the activity and fairness of the fragmentation system, and has obvious superiority.
Correspondingly to the method, the invention also provides a fragment-based inter-fragment collaborative excitation system under the unauthorized block chain architecture, which comprises a fragment structure of a service fragment and a plurality of common fragments, wherein the service fragment and the common fragments comprise an unauthorized main node and an unauthorized common node, and the service fragment and the common fragments comprise an unauthorized main node and an unauthorized common node;
the service fragment is used for generating a public unbiased verifiable random number based on a verifiable random number VRF algorithm and distributing the registered node to a common fragment;
the service fragments receive the transaction of a user, random numbers generated based on a VRF algorithm are used as seeds, the divided transaction amount ratio of each fragment is used as a chromosome, an optimal transaction distribution scheme is obtained based on a multi-target genetic algorithm, and the transaction is distributed among common fragments through a main node of the service fragments based on the transaction distribution scheme;
the common fragments are used for receiving transactions, verifying the transactions based on a mutual recognition protocol of a Byzantine fault-tolerant algorithm (BFT), returning signatures to the main node in the fragments by the common nodes participating in the mutual recognition decision, generating sub-blocks after the signatures are received by the main node in the fragments and sending the sub-blocks to the service fragments, wherein the sub-block heads in the sub-blocks comprise the number of the signatures returned by the common nodes of the current common fragments and the transaction verification duration of each common node;
the service fragment also predicts consensus strategies adopted by the common nodes by adopting utility value functions corresponding to different consensus strategies based on the common nodes in the common fragment in a static game model, calculates credit value ratio of the common nodes based on credit values of the common nodes in the common fragment after the previous round of block generation, and performs reward distribution corresponding to transaction fees of the common nodes in the common fragment based on the credit value ratio;
the service fragments receive the sub-blocks from the common fragments and obtain the transaction verification duration of the common nodes, the credit value corresponding to each node in the block round process is calculated based on the transaction verification duration of the common nodes, the sub-blocks from the common fragments are integrated and the credit values are packaged, and a final block is generated and is broadcasted in the whole network.
Those of ordinary skill in the art will appreciate that the various illustrative components, systems, and methods described in connection with the embodiments disclosed herein may be implemented as hardware, software, or combinations of both. Whether this is done in hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Features that are described and/or illustrated with respect to one embodiment may be used in the same way or in a similar way in one or more other embodiments and/or in combination with or instead of the features of the other embodiments in the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A node excitation method under a fragment-based unauthorized blockchain architecture is characterized by comprising the following steps:
a fragment forming step, in which the determined nodes of the service fragments generate public unbiased verifiable random numbers based on a verifiable random number VRF algorithm, and the registered nodes are distributed to common fragments to form a fragment structure comprising one service fragment and a plurality of common fragments, wherein the service fragment and the common fragments comprise unauthorized main nodes and unauthorized common nodes;
a transaction allocation step, wherein the service fragments receive the transaction of a user, random numbers generated based on a VRF algorithm in the fragment forming step are used as random seeds, the divided transaction amount of each fragment is used as a chromosome, a fitness function of a genetic algorithm is obtained based on respective corresponding objective functions of the total number of nodes participating in consensus and the total number of nodes not participating in consensus in the previous round of consensus process fragments, an optimal transaction allocation scheme is obtained by using the genetic algorithm, and the transaction is allocated among common fragments through a main node of the service fragments based on the transaction allocation scheme;
a verification and consensus step comprising:
the common fragments which receive the transaction verify the transaction based on the mutual recognition protocol of Byzantine fault-tolerant algorithm BFT, the common nodes which participate in the mutual recognition decision return signatures to the main nodes in the fragments, the main nodes in the fragments generate sub-blocks after receiving the signatures and send the sub-blocks to the service fragments, and the sub-block heads in the sub-blocks comprise the number of the signatures returned by the common nodes of the current common fragments and the transaction verification duration of each common node;
the service fragment predicts consensus strategies adopted by all common nodes by adopting utility value functions corresponding to different consensus strategies through common nodes in the common fragment based on a static game model, calculates credit value ratio of all common nodes based on credit values of the common nodes in the common fragment after the previous round of block generation, and performs reward distribution corresponding to transaction fees of the common nodes in the common fragment based on the credit value ratio;
and a block outputting step, namely, the service fragments receive the sub-blocks from the common fragments and obtain the transaction verification duration of each common node, the credit value corresponding to each node in the block outputting process is calculated based on the transaction verification duration of each common node, the sub-blocks from the common fragments are integrated and the credit values are packaged, and a final block is generated and is subjected to whole-network broadcasting.
2. The method according to claim 1, characterized in that the method further comprises the steps of:
each node within a common fragment synchronizes reputation values of other nodes within the common fragment based on the broadcast of the service fragment.
3. The method of claim 1, further comprising:
and the service fragment determines the block reward of the main node in the common fragment based on the number of the signatures packaged into the sub-blocks and distributes the reward.
4. The method of claim 1,
the slice forming step includes: the nodes of the service fragments run a VRF algorithm based on public information to generate a public unbiased verifiable random number for the current operation, the registered nodes in the previous operation generate public verifiable identities by solving the workload proof PoW problem generated by the current random number, and the registered nodes are distributed into all common fragments based on the bit information of the last specific digit of the PoW result to form the fragment structure;
the method for obtaining the optimal transaction allocation scheme by utilizing the verifiable transaction allocation mechanism based on the genetic algorithm comprises the following steps: taking the total number of the nodes which are selected to participate in consensus and the total number of the nodes which are selected to be invalid between the segments as targets, distributing weights to different target functions and integrating the weights into one target function, and performing intersection, variation and selection of chromosomes on the basis of the random seeds and the fitness function; when the fitness of the optimal chromosome no longer rises, the final trading allocation plan result will be output.
5. The method of claim 4, wherein the assigning weights to different objective functions and integrating into one objective function comprises assigning weights to different objective functions and integrating into one objective function based on the following formula:
wherein,express getFThe minimum value of (a) is determined,Fis a fitness function of the genetic algorithm,the root mean square error representing the number of the selected nodes participating in the consensus among the slices,the total number of the failed nodes is selected on behalf of the whole slicing system,andare respectively asAndthe corresponding weight coefficients.
6. The method of claim 1, wherein the utility value functions for the different consensus strategies comprise:
wherein,a utility value function is selected for the node when participating in the consensus strategy,selecting a utility value function for the node when the node does not participate in the consensus strategy;andprobability of signature being selected by master node and the secondjThe number of nodes packed by the master node in each fragment;is as followsiThe transaction amount of a common segment is in proportion,fin order to be a fee for a transaction,the revenue generated for a unit of computing resource,the computational resources are invested in for the nodes,Tthe total transaction amount received for the service fragment,in order for a node to go into a loss of fragmentation,the wear is verified for each transaction,in order to recognize the loss in common,for the loss of authentication between a node and a single node,is divided into piecesNumber of verification nodes within.
7. The method of claim 1, wherein calculating the reputation value of each common node based on the transaction verification duration of each common node comprises:
calculating the initial reputation value of the node by the service fragment through the transaction verification duration of the node in each common fragment according to the following formula:
wherein,is as followsiEach piece ofMiddle nodejThe reputation value during this round of block out,representative nodejThe length of time the transaction is verified,a timestamp indicating that the master node sent the transaction to regular node j in regular shard,indicating that the master node received a normal nodejA time stamp to verify the signature for the transaction;representing slicesAll nodes within the cluster verify the average value of the transaction duration,representing shardsThe number of internal nodes;
and normalizing the calculated initial credit value to obtain a common node credit value.
8. The method of claim 1, wherein the calculating the ratio of the reputation values of the common nodes based on the reputation values of the common nodes in the common shard after the previous round of chunking comprises:
calculating the credit value ratio of each common node based on the following formula:
9. The method of claim 1,
the transaction verification time length is the difference between the timestamp recorded by the main node when each common node returns the signature to the main node and the timestamp when the main node sends the packaging transaction to other nodes in the common sub-slice;
the integrating the sub-blocks from the respective common patches and packaging the reputation values comprises integrating the sub-blocks from the respective common patches and packaging the reputation values based on a Byzantine fault tolerance algorithm.
10. A node excitation system under a fragment-based unauthorized blockchain architecture is characterized by comprising a fragment structure of a service fragment and a plurality of common fragments, wherein the service fragment and the common fragments comprise an unauthorized main node and an unauthorized common node;
the service fragment is used for generating a public unbiased verifiable random number based on a verifiable random number VRF algorithm and distributing the registered node to a common fragment;
the service fragments receive the transaction of a user, random numbers generated based on a VRF algorithm are used as random seeds, the divided transaction amount of each fragment is used as a chromosome, an optimal transaction distribution scheme is obtained based on a multi-target genetic algorithm, and the transaction is distributed among common fragments through a main node of the service fragments based on the transaction distribution scheme;
the common fragments are used for receiving transactions, verifying the transactions based on a mutual recognition protocol of a Byzantine fault-tolerant algorithm (BFT), returning signatures to the main node in the fragments by the common nodes participating in the mutual recognition decision, generating sub-blocks after the signatures are received by the main node in the fragments and sending the sub-blocks to the service fragments, wherein the sub-block heads in the sub-blocks comprise the number of the signatures returned by the common nodes of the current common fragments and the transaction verification duration of each common node;
the service fragment also predicts consensus strategies adopted by the common nodes by adopting utility value functions corresponding to different consensus strategies based on the common nodes in the common fragment in a static game model, calculates credit value ratio of the common nodes based on credit values of the common nodes in the common fragment after the previous round of block generation, and performs reward distribution corresponding to transaction fees of the common nodes in the common fragment based on the credit value ratio;
the service fragments receive the sub-blocks from the common fragments and obtain the transaction verification duration of the common nodes, the credit value corresponding to each node in the block round process is calculated based on the transaction verification duration of the common nodes, the sub-blocks from the common fragments are integrated and the credit values are packaged, and a final block is generated and is broadcasted in the whole network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110593805.1A CN113037504B (en) | 2021-05-28 | 2021-05-28 | Node excitation method and system under fragment-based unauthorized block chain architecture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110593805.1A CN113037504B (en) | 2021-05-28 | 2021-05-28 | Node excitation method and system under fragment-based unauthorized block chain architecture |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113037504A true CN113037504A (en) | 2021-06-25 |
CN113037504B CN113037504B (en) | 2021-08-03 |
Family
ID=76456202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110593805.1A Active CN113037504B (en) | 2021-05-28 | 2021-05-28 | Node excitation method and system under fragment-based unauthorized block chain architecture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113037504B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115174565A (en) * | 2022-05-18 | 2022-10-11 | 国网河南省电力公司信息通信公司 | Consensus method and device based on block chain fragmentation technology |
CN116233145A (en) * | 2023-05-05 | 2023-06-06 | 北京邮电大学 | Block chain asynchronous consensus method and device based on slicing strategy |
CN116506444A (en) * | 2023-06-28 | 2023-07-28 | 北京科技大学 | Block chain stable slicing method based on deep reinforcement learning and reputation mechanism |
CN117221335A (en) * | 2023-11-08 | 2023-12-12 | 西安电子科技大学 | Wireless blockchain network slicing method and device, electronic equipment and storage medium |
CN117527834A (en) * | 2024-01-04 | 2024-02-06 | 成都理工大学 | Improved PBFT consensus method based on reputation scoring mechanism |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109934710A (en) * | 2018-11-08 | 2019-06-25 | 杭州基尔区块链科技有限公司 | The intelligent common recognition mechanism suitable for intellectual property alliance chain based on bilateral card |
CN110599261A (en) * | 2019-09-21 | 2019-12-20 | 江西理工大学 | Electric automobile safety electric power transaction and excitation system based on energy source block chain |
CN110677485A (en) * | 2019-09-30 | 2020-01-10 | 大连理工大学 | Dynamic layered Byzantine fault-tolerant consensus method based on credit |
US20200026699A1 (en) * | 2018-07-20 | 2020-01-23 | True Blockchain Technology Ltd. | Highly Performant Decentralized Public Ledger with Hybrid Consensus |
-
2021
- 2021-05-28 CN CN202110593805.1A patent/CN113037504B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200026699A1 (en) * | 2018-07-20 | 2020-01-23 | True Blockchain Technology Ltd. | Highly Performant Decentralized Public Ledger with Hybrid Consensus |
CN109934710A (en) * | 2018-11-08 | 2019-06-25 | 杭州基尔区块链科技有限公司 | The intelligent common recognition mechanism suitable for intellectual property alliance chain based on bilateral card |
CN110599261A (en) * | 2019-09-21 | 2019-12-20 | 江西理工大学 | Electric automobile safety electric power transaction and excitation system based on energy source block chain |
CN110677485A (en) * | 2019-09-30 | 2020-01-10 | 大连理工大学 | Dynamic layered Byzantine fault-tolerant consensus method based on credit |
Non-Patent Citations (2)
Title |
---|
MINGYU HOU等: "A Blockchain Based Architecture for IoT Data Sharing Systems", 《2020 IEEE INTERNATIONAL CONFERENCE ON PERVASIVE COMPUTING AND COMMUNICATIONS WORKSHOPS (PERCOM WORKSHOPS)》 * |
李忠诚等: "一种基于权益代表的可扩展共识协议", 《应用科学学报》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115174565A (en) * | 2022-05-18 | 2022-10-11 | 国网河南省电力公司信息通信公司 | Consensus method and device based on block chain fragmentation technology |
CN115174565B (en) * | 2022-05-18 | 2023-08-15 | 国网河南省电力公司信息通信公司 | Consensus method and device based on block chain slicing technology |
CN116233145A (en) * | 2023-05-05 | 2023-06-06 | 北京邮电大学 | Block chain asynchronous consensus method and device based on slicing strategy |
CN116233145B (en) * | 2023-05-05 | 2023-08-01 | 北京邮电大学 | Block chain asynchronous consensus method and device based on slicing strategy |
CN116506444A (en) * | 2023-06-28 | 2023-07-28 | 北京科技大学 | Block chain stable slicing method based on deep reinforcement learning and reputation mechanism |
CN116506444B (en) * | 2023-06-28 | 2023-10-17 | 北京科技大学 | Block chain stable slicing method based on deep reinforcement learning and reputation mechanism |
CN117221335A (en) * | 2023-11-08 | 2023-12-12 | 西安电子科技大学 | Wireless blockchain network slicing method and device, electronic equipment and storage medium |
CN117221335B (en) * | 2023-11-08 | 2024-03-19 | 西安电子科技大学 | Wireless blockchain network slicing method and device, electronic equipment and storage medium |
CN117527834A (en) * | 2024-01-04 | 2024-02-06 | 成都理工大学 | Improved PBFT consensus method based on reputation scoring mechanism |
CN117527834B (en) * | 2024-01-04 | 2024-03-26 | 成都理工大学 | Improved PBFT consensus method based on reputation scoring mechanism |
Also Published As
Publication number | Publication date |
---|---|
CN113037504B (en) | 2021-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113037504B (en) | Node excitation method and system under fragment-based unauthorized block chain architecture | |
US11301602B2 (en) | Simulation-based testing of blockchain and other distributed ledger systems | |
CN110535836B (en) | Trust block chain consensus method based on role classification | |
Chai et al. | Proof-of-reputation based-consortium blockchain for trust resource sharing in internet of vehicles | |
Li et al. | Game-theoretic analysis of cooperation incentive strategies in mobile ad hoc networks | |
CN110580653B (en) | Block chain consensus mechanism based on transaction | |
Manshaei et al. | A game-theoretic analysis of shard-based permissionless blockchains | |
CN116669111A (en) | Mobile edge computing task unloading method based on blockchain | |
CN111078787A (en) | Block chain consensus method based on random number mapping | |
Kwantwi et al. | Blockchain-based computing resource trading in autonomous multi-access edge network slicing: A dueling double deep Q-learning approach | |
CN115428399A (en) | System and method for dynamically expanding computations on a distributed ledger network | |
Aldini | Formal approach to design and automatic verification of cooperation-based networks | |
Li et al. | How hard is takeover in dpos blockchains? understanding the security of coin-based voting governance | |
CN109120437B (en) | Artificial intelligence block cloud ecosystem based on DABFT consensus mechanism | |
Tang et al. | A Game-Enabled Blockchain Consensus and Incentive Mechanism for Secure and Efficient Mobile Crowdsensing | |
Xie et al. | Double auction mechanisms in edge computing resource allocation for blockchain networks | |
Gao et al. | Deep reinforcement learning based node pairing scheme in edge-chain for IoT applications | |
Zhao et al. | Safe and Efficient Delegated Proof of Stake Consensus Mechanism Based on Dynamic Credit in Electronic Transaction | |
CN111522884B (en) | Threat information transaction alliance chain transaction promotion method based on benefit distribution | |
CN114742583A (en) | Quality-guaranteed type Internet of vehicles crowd sensing and exciting method | |
Quan et al. | Intra-Shard and Inter-Shard Collaborative Incentive Scheme for Shard-Based Permissionless Blockchain | |
Anta et al. | Multi-round master-worker computing: a repeated game approach | |
Huang et al. | Secure sharding scheme of blockchain based on reputation | |
Oyinloye et al. | SIM-P—A Simplified Consensus Protocol Simulator: Applications to Proof of Reputation-X and Proof of Contribution | |
CN118074886B (en) | Multi-level committee-based decentralized node management method in blockchain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |