CN115423472A - Block chain consensus system and control method thereof - Google Patents

Block chain consensus system and control method thereof Download PDF

Info

Publication number
CN115423472A
CN115423472A CN202210010651.3A CN202210010651A CN115423472A CN 115423472 A CN115423472 A CN 115423472A CN 202210010651 A CN202210010651 A CN 202210010651A CN 115423472 A CN115423472 A CN 115423472A
Authority
CN
China
Prior art keywords
authorizer
block
consensus
credit
transaction
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.)
Pending
Application number
CN202210010651.3A
Other languages
Chinese (zh)
Inventor
林飞龙
陈中育
齐嘉浩
王晓虎
马永进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Normal University CJNU
Original Assignee
Zhejiang Normal University CJNU
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Normal University CJNU filed Critical Zhejiang Normal University CJNU
Priority to CN202210010651.3A priority Critical patent/CN115423472A/en
Publication of CN115423472A publication Critical patent/CN115423472A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of block chains, and discloses a block chain consensus system and a control method thereof.A PoPB consensus mechanism uses a plan behavior theory to model a decision process of individual participation consensus in a decentralized environment, and analyzes the influence of subjective will, social credit and work reporting factors on decision behaviors; estimating the number of groups participating in the consensus mechanism by using a statistical probability model to realize the controllability of the scale of the groups participating in the consensus; constructing a decentralization and credibility measurement index system, and realizing the credit threshold setting with tunable two indexes and the optimization control of participating in the scale of the consensus group; a dynamic authorization group mechanism is provided to strengthen the dynamic adaptability of the consensus mechanism. The PoPB consensus mechanism realizes good balance of decentralization and credit by introducing a credit threshold determination algorithm and a dynamic authorizer group mechanism, and is a block chain consensus mechanism with good reliability, decentralization, credibility and resource saving.

Description

Block chain consensus system and control method thereof
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a block chain consensus system and a control method thereof.
Background
At present, the block chain technology is also called as distributed book technology. Different from the traditional centralized service, the block chain performs decentralized point-to-point affairs in a distributed system in which nodes do not need to trust each other, thereby solving the problem of single point failure commonly existing in the traditional centralized system. In the traditional decentralized scenario, if the central server fails, the whole system will be attacked greatly or even destructively. The block chain enables the nodes to maintain the operation of the system together through a decentralized technology, and even if part of the nodes are in failure, the operation of the whole system cannot be influenced. In addition, the block chain also realizes the security attribute of non-tampering and traceability due to the special data structure. A blockchain is essentially a linked list of hash values linked together. Each current chunk references the hash value of the chunk header of the last chunk. The design enables that tampering at any place in the whole block chain can be detected.
The most representative application in blockchains is digital cryptocurrency. Once a node successfully finds this random number, it is authorized to add the new chunk generated to the chain of chunks and receive a reward. This way of making a node recognize that a new block is legal is called a consensus mechanism of block chains.
The existing consensus mechanisms include Proof of workload, proof of rights (PoS), proof of authority (PoA), and the byzantine consensus algorithm (PBFT), etc. The PoW consensus mechanism has a very high de-centralization degree and safety, but is also subject to scaling due to the waste of a large amount of computing resources and energy. PoS proposes a concept of "equity," the higher the equity the greater the chance of being authorized to obtain an upload block. The PoS solves the problem of high resource consumption of PoW to a certain extent, but has the centralized problem caused by over-high rights and interests of individual nodes. The authority authentication (PoA) performs unified uploading of new blocks by electing an authoritative node among the numerous nodes. This time, while greatly improving the opening efficiency, also severely compromises the degree of decentralization of the blockchain. Although the byzantine fault-tolerant consensus algorithm (PBFT) solves the problem of byzantine in an asynchronous environment, it is more commonly used in private networks or licensed networks because of its poor performance, and has insufficient scalability in public network environments. Therefore, it is desirable to design a new blockchain consensus system and a control method thereof.
Through the above analysis, the problems and defects of the prior art are as follows:
(1) Existing PoW consensus mechanisms waste significant computing resources and energy.
(2) The existing PoS has the centralized problem caused by overhigh rights and interests of individual nodes.
(3) The current authority certificate (PoA) severely impairs the degree of decentralization of the blockchain.
(4) The existing Byzantine fault-tolerant consensus algorithm (PBFT) is more commonly used in private networks or licensed networks due to poor performance, and has insufficient expansibility in public network environments.
The difficulty in solving the above problems and defects is: (1) Modeling individual behaviors from the perspective of planning a behavior theory for a decentralized block chain consensus mechanism;
(2) Based on a plan behavior theoretical model, a statistical probability tool is utilized to provide controllability of a block chain consensus mechanism and provide a control theory and a control method;
(3) Constructing a performance index of a block chain consensus mechanism, and giving a consensus mechanism parameter optimization design theory and a method with balanced performance indexes;
(4) And (4) considering the reliability of the consensus mechanism, and designing a consensus mechanism implementation method based on the dynamic authorization group.
The significance of solving the problems and the defects is as follows:
the block chain consensus mechanism is safe, efficient and controllable through a dynamic authorization group mechanism.
Disclosure of Invention
The invention provides a block chain consensus system and a control method thereof, aiming at the problems in the prior art. Is marked as a consensus mechanism based on the theory of planned behavior, namely a PoPB consensus mechanism.
The invention is realized in this way, a control method of a block chain consensus system, comprising:
modeling a decision process of individual participation consensus in a decentralized environment by using a plan behavior Theory (TPB), and acquiring influence factors of subjective will, social credit and work report on decision behaviors; estimating the number of groups participating in the consensus mechanism by using a probability model, and controlling the scale of the groups participating in the consensus by using a computable credit threshold; a block chain consensus mechanism is combined to construct a decentralization and credibility measuring index system, and credit threshold setting with tunable two indexes and optimal control of the scale of the group participating in consensus are carried out; dynamic adaptability of enhanced consensus mechanism using dynamic grant set mechanism
Further, the control method of the block chain consensus system comprises the following steps:
step one, a PoPB consensus process is provided from the perspective of block chain transaction processing;
step two, proposing consensus process modeling based on the plan behavior theory;
step three, proposing a consensus protocol design based on the dynamic authorization group;
and step four, providing a data structure design of the PoPB.
Further, the PoPB consensus process in step one comprises:
(1) And (3) transaction proposal: a user puts forward a service transaction by calling an intelligent contract; after the intelligent contract is called to process the self service, the user signs the transaction and sends the transaction to the block chain network;
(2) Transaction verification: the other users who receive the transaction carry out verification according to transaction verification rules, including verifying the signature of the transaction presenter, the account balance, the standardization of the intelligent contract and the transaction fee used; if the user successfully verifies the transaction, broadcasting the transaction to its neighboring nodes; otherwise, the transaction will be discarded;
(3) Block generation: the blockchain authorizer will collect transactions broadcast over the blockchain network; if an authorizer authenticates in turn and generates a block, packaging the transactions which are not authenticated into a block; after the modification of the authorizer group and the credit score of the authorizer are also recorded in the block, the authorizer signs a new block and broadcasts it onto the network;
(4) Block verification: any user accepting the new tile can be verified by the tile verification rules, including the updating of the validity authorization set for the transaction concerned, the credit score of the authorizer, and the legitimacy of the authorizer; if the user successfully authenticates the block, connecting the block to the blockchain ledger and storing locally; when most network nodes successfully verify the block, the consensus of the transaction and the new block can be completed.
Further, the theoretical model of planning behavior in step two includes:
the individual behavior is the result of a deliberate plan, reflecting the individual's behavioral intent, i.e., the individual's propensity to behave in a particular manner; behavior attitude A, subjective specification S and perceptual behavior control P are three main factors for determining behavior intention, a linear combination model is formed, and final individual behaviors are determined, namely:
B=A+S+P;
wherein B represents the final intent of the behavior;
attitude: the attitude represents the individual willingness of the consensus process of the block chain ecosystem, and refers to the favorable and unfavorable evaluation of the individual on the consensus process;
subjective specification: subjective norms are a social factor, referring to the perceived social pressure of the act of performing or not performing a process of joining consensus;
and (3) perception behavior control: refers to the perceived ease of execution of an action, believed to reflect past experience and expected resistance; in blockchains, the expectation of consensus process return and the difficulty of authorizer competition reflect factors in perceptual behavior control.
Further, the consensus process modeling based on the theory of planned behavior in the second step comprises:
consensus process modeling based on planned behavior includes two sub-models: a credit model and a consensus regulation model based on planned behavior;
the credit model is designed for reputation assessment of users in a blockchain network; the consensus regulation model based on the planned behavior is used for establishing a credit threshold value required by the credit sub-model;
(1) And (3) credit model:
in a block chain network, each individual is uniquely marked by an address, which is expressed as an address tag; each time an individual makes a transaction, the protocol gives an evaluation of its transaction; in a block generation period, the block collects all transactions of an individual in the period, and the individual credit in the block is summarized according to evaluation in the transactions; by using
Figure BDA0003457207210000051
Representing the reputation value recorded by the individual address in the block with height of the block; evaluation of an individual after a transaction is given by the individual with whom the transaction is being conducted, using c address Indicates that if the evaluation is positive, c address =C + (ii) a If negative, c address =C - (ii) a If the evaluation is not referential, c address =C 0 (ii) a In one block, the individual reputation of an individual address is represented as
Figure BDA0003457207210000052
Wherein M represents the number of transactions in the block; the total credit rating for an individual address is expressed as the sum of the reputation values in the most recent K blocks,
Figure BDA0003457207210000053
wherein current height represents the current highest block height; calculating credit evaluation through a sliding window with the size of K to ensure the comprehensiveness of the evaluation of the agreement on the individual, submitting an application called an authorizer by the individual with higher credit evaluation, and obtaining a reward by the authorizer through generating a block;
(2) Consensus regulation and control model based on plan behaviors
A consensus regulation and control model based on the plan behavior is used for controlling the generation of the authorizer; according to the meterThe theory of the division defines the willingness of an individual i to apply for what is called an authorizer as: b i =a i +s i +p i (ii) a Wherein, a i Representing attitude, s i Representation and C i Associated subjective Specifications, p i Representing a perceptual behavior control;
Figure BDA0003457207210000054
where β represents a parameter for normalization, N represents the number of blocks, C max A maximum limit representing a credit;
Figure BDA0003457207210000055
wherein N is AG Representing the total number of authorized users set by the protocol;
the total number of willing application authorizers is expressed as:
Figure BDA0003457207210000056
the protocol allows N for increasing the fault tolerance of the application CA The applicants refer to as candidates, where N CA ≥N AG (ii) a Then the desired N is passed CA To adjust the trust threshold C T
Figure BDA0003457207210000061
When the protocol needs to set N AG When the authorizer is authorized, the number N of individuals who can theoretically participate in the application is calculated AP (ii) a According to N CA Can adjust C T The difference in (2) is the difficulty of dynamically setting the application;
the credit of the authorizer applicant satisfies the normal distribution, and is evaluated as C + Satisfy the requirement of
Figure BDA0003457207210000062
Evaluation was C 0 Satisfy the need of
Figure BDA0003457207210000063
Evaluation was C - Satisfy the requirements of
Figure BDA0003457207210000064
Credit threshold C for authorizer candidate T Determined from a normal probability distribution function as follows:
Figure BDA0003457207210000065
wherein λ is sum =K(λ + C +0 C 0- C - ),
Figure BDA0003457207210000066
In the PoPB consensus protocol, stability is expressed as:
Figure BDA0003457207210000067
wherein,
Figure BDA0003457207210000068
mean credit for all applicants; and fairness is expressed as:
Figure BDA0003457207210000069
between stability and fairness, the optimal number of candidate nodes and the credit threshold are determined by the following Jain's optimization problem:
Figure BDA00034572072100000610
s.t.N AG ≤N CA ≤N AP
wherein ε and
Figure BDA00034572072100000611
are weight parameters, and when they take the same value, the weights representing stability and fairness are the same; when in use
Figure BDA00034572072100000612
Taking N at the maximum CA And C T I.e. an optimal stability and fairness balance point is reached.
Further, the designing of the consensus protocol based on the dynamic grant set in step three includes:
(1) Authorization group initialization: establishing a first group of authorizers in the creature block, recording the addresses of all authorizers in an extra field of the creature block, and initializing a credit score of each authorizer as K CreditThreshold; wherein K is a positive integer, and CreditThreshold is used for judging whether a user is qualified to apply for a credit score threshold of an authorizer; the initialized credit score allows the authorization group to be served for a long time in the initial phase; a timer DutyTimer for calculating the working time of each authorizer is also recorded in the extra field;
(2) And (3) authorized authority distribution: when the blockchain starts to work, an authorizer collects and verifies transactions, and packs some of the transactions into one block according to a blockpacking rule; the PoPB protocol designates an authorizer recorded in the latest block as a round-valued authorizer through a simple algorithm, so as to obtain a boolean value BlockHeight% NumAuthorizers = = authorizerffset, where BlockHeight is the height of the previous block, numAuthorizers are the size of an authorization group, authorizerfset is the offset of the authorizer order relative to the alphabetical order in the authorization group, and each authorizer respectively obtains a boolean value; if the return value is true, the authorizer is an in-turn authorizer, and the others are all off-turn; the In-turn authorizer signs its block immediately and broadcasts it to the blockchain network; the robustness of block generation and the priority of in-turn authorizers are protected(ii) a With one per authorizer not being present
Figure BDA0003457207210000071
Signing the limit of more than one block within a block period;
(3) Block signature and verification: once the authorizer has the right to create a new tile, the tile header, including the authorized set with the group membership credit score and the on-time timer DutyTimers, will be updated; signing on the new block by using a private key; the signature of the block is also recorded in the "extra" field of the block header, used for block verification over the blockchain network; when a node receives a new block, extracting the signature and computing the public key using spec256k1 elliptic curve cryptography inverse solution; checking whether an address from the public key exists in the additional data and whether a corresponding authorizer qualifies for block generation; if so, the new block will be accepted as a valid block;
(4) Qualification of the authorizer: the address of the authorizer in the extra field is updated; if a node wants to become a new authorizer, a proposal will be sent; the authorizer receiving the proposal evaluates the credit score of the new applicant, and if the credit score of the applicant exceeds a credit threshold, the proposal is recorded and added into a local proposal pool; at each block period, if the proposal pool is not empty, the incumbent authorizer will vote for the applicant, and if the credit of the applicant exceeds the credit threshold, the incumbent authorizer will declare in the block header the vote that the applicant obtained; each authorizer maintains a local database named vote statistics for counting applicants' votes; when a new block is received, each authorizer checks the voting result and updates the local vote statistics; applicant obtains
Figure BDA0003457207210000081
The applicant will become a new authorizer and will be declared in the next block;
(5) The authorizer disqualifies: there are several situations that will disqualify an existing authorizer; in the first case, a user makes an offer to cancel an authorizer; more than half of the authorizers agree to cancel the authorizers' qualification, and will become common users; in the second case, an authorizer's credit score below the credit threshold will be disqualified; in the third case, an authorizer's DutyTimer exceeding the maximum continuous operating time indicated by MaxDutyTime will be disqualified; otherwise, increasing the DutyTimer by one; an authorizer is disqualified and the address and corresponding information are deleted from the chunk header of the next generated chunk;
the data structure of the PoPB in step four comprises a PoPB block header comprising:
PreHash, representing a hash value, a pointer to the previous block;
UncleHash, which represents the Hash value of the number block;
root, which represents the Root hash value of state Trie;
TxHash, which represents the root Hash value of tx Trie;
ReceiptHash, which represents a root hash value of a receipt Trie;
bloom, representing a Bloom filter;
difficulty, which represents the Difficulty of solving the hash problem for block generation proof;
number, which indicates the block Number on the block chain;
time, which represents block generation Time;
GasLimit, gasUsed, denotes gas usage rules;
extra, representing a variable length reserved field;
extra vanity,32 bits;
ExtraBody, representing the authorizer address array, credit score, and DutyTimer;
ExtraSeal, representing an authorizer;
the CoinBase represents the address of the voting authorizer;
nonce, which indicates the voting result, 0xf indicates addition, and 0x0 indicates deletion.
Another objective of the present invention is to provide a blockchain consensus system using the control method of the blockchain consensus system, wherein the blockchain consensus system comprises:
the consensus decision modeling module is used for modeling a decision process of individual participation in consensus in a decentralized environment by using a TPB (tire pressure monitor) theory and analyzing the influence of three factors, namely subjective will, social credit and work report on the decision behavior;
the group quantity estimation module is used for estimating the quantity of the groups participating in the consensus mechanism by utilizing a probability model, and providing a computable credit threshold to realize the controllability of the scale of the groups participating in the consensus;
the index system construction module is used for constructing a decentralized and credibility degree measurement index system by considering the characteristics of a block chain consensus mechanism, and realizing the credit threshold setting with tunable two indexes and the optimization control of the scale of the group participating in consensus;
and the authorization group mechanism building module is used for providing a dynamic authorization group mechanism and strengthening the dynamic adaptability of the consensus mechanism.
Another object of the present invention is to provide a computer apparatus, which includes a memory and a processor, the memory storing a computer program, which when executed by the processor, causes the processor to execute the control method of the block chain consensus system.
Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute a control method of the blockchain consensus system.
Another object of the present invention is to provide an information data processing terminal for implementing the function of the block chain consensus system.
By combining all the technical schemes, the invention has the advantages and positive effects that: the invention provides a block chain consensus system and a control method thereof, and provides a consensus mechanism based on the Theory of Planned Behavior (TPB), which is marked as Proof-of-planed-Behavior and is abbreviated as PoPB. The PoPB consensus mechanism firstly uses a TPB theory to model a decision process of individual participation consensus in a decentralized environment, and analyzes the influence of three factors, namely subjective willingness, social credit and work report, on the decision behavior; secondly, estimating the number of the group participating in the consensus mechanism by using a probability model, and providing a computable credit threshold to realize the controllability of the scale of the group participating in the consensus; then, considering the characteristics of a block chain consensus mechanism, constructing a decentralization and credibility degree measuring index system, and realizing the tunable credit threshold setting of the two indexes and the optimization control of the scale of the group participating in consensus; and finally, a dynamic authorization group mechanism is provided, the dynamic adaptability of the PoPB is strengthened, and the safety and reliability of the consensus process are improved. The PoPB provided by the invention not only has a solid model foundation, but also provides a theoretical basis and a definite solving algorithm for setting parameters in a consensus process, which are less possessed by the existing research results.
The invention provides a consensus protocol based on the Theory of Planned Behavior (TPB), namely Proof-of-planed-Behavior, which is abbreviated as PoPB. The protocol consists of a consensus regulation model based on a plan behavior theory and a block authentication protocol based on an authorization group. Compared to the above-mentioned consensus mechanism, poPB avoids the problem of high resource consumption. The members of the authorization group are controlled through the PoPB, and the dynamic authorization group is used for confirming and uploading blocks, so that the security and the robustness of consensus are enhanced. The PoPB has the following innovation points:
(1) Modeling a decision process of individual participation consensus in a decentralized environment by using a TPB (tire pressure monitoring) theory, and analyzing the influence of three factors, namely subjective willingness, social credit and work report on decision behaviors;
(2) Estimating the number of groups participating in the consensus mechanism by using a probability model, and providing a computable credit threshold to realize the controllability of the scale of the groups participating in the consensus;
(3) Considering the characteristics of a block chain consensus mechanism, constructing a decentralization and credibility degree measurement index system, and realizing the credit threshold setting with tunable two indexes and the optimization control of the scale of the group participating in consensus;
(4) A dynamic authorization group mechanism is provided, the dynamic adaptability of the PoPB is strengthened, and the safety and reliability of the block chain consensus process are improved.
In the invention, a novel consensus protocol PoPB is provided, which consists of a credit submodel and a consensus regulation and control model based on a planning behavior. The credit sub-model and the consensus regulatory model based on the planning behavior jointly enumerate an authorization group responsible for block generation. The authorization group replaces block uploading, so that the PoPB avoids consuming a large amount of resources to achieve consensus, and meanwhile, the credibility and reliability of a block chain are guaranteed. Tests prove that the PoPB realizes good balance of decentralization and credit by introducing a credit threshold determination algorithm and a dynamic authorizer group mechanism. In summary, poPB is a consensus mechanism with good reliability, decentralization, reliability, and resource saving.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a control method of a blockchain consensus system according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a control method of a blockchain consensus system according to an embodiment of the present invention.
Fig. 3 is a block diagram of a control system of the blockchain consensus system according to an embodiment of the present invention;
in the figure: 1. a consensus decision modeling module; 2. a population number estimation module; 3. an index architecture modeling block; 4. and an authorization group mechanism building module.
Fig. 4 is a schematic diagram illustrating the confirmation of the optimal threshold and the number of candidate nodes according to the embodiment of the present invention.
Fig. 5 is a comparison graph of the stability and fairness of PoPB, poT, and PoA provided in the embodiment of the present invention.
Fig. 6 is a graph of transaction amount and consensus delay as a function of transaction transmission period as provided by an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides a block chain consensus system and a control method thereof, and the following describes the present invention in detail with reference to the accompanying drawings.
As shown in fig. 1, the control method of the block chain consensus system provided by the embodiment of the present invention includes the following steps:
s101, modeling a decision process of individual participation consensus in a decentralized environment by using a planned behavior Theory (TPB), and analyzing the influence of subjective will, social credit and work report on the decision behavior;
s102, estimating the number of the groups participating in the consensus mechanism by using a probability model, and providing a computable credit threshold to realize the controllability of the scale of the groups participating in the consensus;
s103, combining the characteristics of a block chain consensus mechanism, constructing a decentralization and credibility degree measurement index system, and realizing credit threshold setting with tunable two indexes and optimal control of the scale of the group participating in consensus;
s104, a dynamic authorization group mechanism is provided to strengthen the dynamic adaptability of the consensus mechanism.
A schematic diagram of a control method of a block chain consensus system according to an embodiment of the present invention is shown in fig. 2.
As shown in fig. 3, the block chain consensus system provided by the embodiment of the present invention includes:
the consensus decision modeling module 1 is used for modeling a decision process of individual participation in consensus in a decentralized environment by using a TPB (tire pressure monitor) theory and analyzing the influence of three factors, namely subjective will, social credit and work report, on decision behaviors;
the group quantity estimation module 2 is used for estimating the quantity of the group participating in the consensus mechanism by utilizing a probability model, and providing a computable credit threshold to realize the control of the scale of the group participating in the consensus;
the index system construction module 3 is used for constructing a decentralized and credibility degree measurement index system by considering the characteristics of a block chain consensus mechanism, and realizing the credit threshold setting with tunable two indexes and the optimization control of the scale of the group participating in consensus;
and the authorization group mechanism building module 4 is used for proposing a dynamic authorization group mechanism and strengthening the dynamic adaptability of the consensus mechanism.
The technical solution of the present invention is further described below with reference to specific examples.
1. Summary of the invention
The block chain is a decentralized technology, also called a distributed book technology, and has the properties of tamper resistance, traceability and the like. The consensus mechanism, which is the most core part of the blockchain, plays a role in coordinating the scattered nodes to achieve consensus. Only operations that satisfy the consensus mechanism are acknowledged by the blockchain and recorded in the block. There are many consensus mechanisms of block chains, such as Proof of work (Proof of word), proof of rights and interests (Proof of state), and active byzantine fault-tolerant consensus algorithm (active byzantine fault tolerance). The invention provides a consensus mechanism based on the Theory of Planned Behavior (TPB), which is marked as Proof-of-planed-Behavior and is abbreviated as PoPB. The PoPB consensus mechanism firstly uses a TPB theory to model a decision process of individual participation in consensus in a decentralized environment, and analyzes the influence of factors of subjective and objective wishes, social credit and work reports on decision behaviors; secondly, estimating the number of the group participating in the consensus mechanism by using a probability model, and providing a computable credit threshold to realize the controllability of the scale of the group participating in the consensus; then, considering the characteristics of a block chain consensus mechanism, constructing a centering-removing and credibility degree measuring index system, and realizing the optimal control of the credit threshold setting and the participation consensus group scale with two tunable indexes; and finally, a dynamic authorization group mechanism is provided, the dynamic adaptability of the PoPB is enhanced, and the safety and the reliability of the consensus process are improved. The PoPB provided by the invention not only has a solid model foundation, but also provides a theoretical basis and a definite solving algorithm for setting parameters in a consensus process, which are less possessed by the existing research results.
The invention provides a consensus protocol based on the Theory of Planned Behavior (TPB), proof-of-planed-Behavior, abbreviated as PoPB. The protocol consists of a consensus regulatory model based on a planned behavior theory and a block authentication protocol based on an authorization group. Compared to the above-mentioned consensus mechanism, poPB avoids the problem of high resource consumption. The members of the authorization group are controlled through the PoPB, and the dynamic authorization group is used for confirming and uploading blocks, so that the security and the robustness of consensus are enhanced. The PoPB has the following innovation points:
1) Modeling a decision process of individual participation consensus in a decentralized environment by using a TPB (tire pressure monitoring) theory, and analyzing the influence of three factors, namely subjective will, social credit and work report on decision behaviors;
2) Estimating the number of the groups participating in the consensus mechanism by utilizing a probability model, and providing a computable credit threshold to realize the controllability of the scale of the groups participating in the consensus;
3) Considering the characteristics of a block chain consensus mechanism, constructing a decentralization and credibility degree measuring index system, and realizing the optimal control of the credit threshold setting with tunable two indexes and the scale of the group participating in consensus;
4) A dynamic authorization group mechanism is provided, the dynamic adaptability of the PoPB is strengthened, and the safety and the reliability of the block chain consensus process are improved.
2. PoPB consensus mechanism
Elicitation is obtained from a planned behavior theory, the theory is used for describing the behavior decision process of individuals, and a credit threshold C is established according to probability statistics of the behavior of an individual set T . Only applicants with credits above the threshold can join the authorization group. In order to ensure the authenticity of authorized group members, each authorizer has a defined maximum continuous duty cycle beyond which the authorizer will automatically exit the authorized group. If it is usedThe authorizer is early exited from the authorized group if it violates the work cycle.
The invention first proposes a PoPB consensus process from the point of view of transaction processing on the blockchain. Then, a consensus regulatory model based on planned behavior theory and an authorization group-based block authentication protocol will be introduced. Finally, a data structure design of PoPB is proposed.
2.1 PoPB consensus Process
Fig. 2 shows a schematic diagram of a PoPB consensus process from the perspective of the transaction process in the blockchain, which is described in detail as follows:
1) And (3) transaction proposal: the user proposes a service transaction by invoking an intelligent contract. After calling the intelligent contract to process the self service, the user signs the transaction and sends the transaction to the block chain network.
2) Transaction verification: other users who receive the transaction will verify the transaction according to the transaction verification rules, including verifying the signature of the transaction presenter, the account balance, the normalization of the intelligent contract, the transaction fee used, and the like. If a user successfully verifies the transaction, it broadcasts the transaction to its neighboring nodes. Otherwise, the transaction will be discarded.
3) Block generation: the block authorizer will collect the transactions broadcast over the blockchain network. If an authorizer takes turns authenticating and generates a block, it will pack the transactions that are not authenticated into a block. Modifications to the authorizer group and credit scores for the authorizers are also recorded in the block. The authorizer then signs the new tile and broadcasts it onto the network.
4) And (3) block verification: any user accepting a new tile may be verified by tile verification rules, including updating of the validity authorization set for the transaction involved, the credit score of the authorizer, and the legitimacy of the authorizer. If the user successfully authenticates the tile, it connects the tile to the blockchain ledger and stores it locally. After most network nodes successfully verify the block, the consensus certification of the transaction and the new block are completed.
2.2 consensus Regulation and control model based on planned behavior theory
This section will be described starting from two sections: planning action theory and planning action protocol.
2.2.1 theory of planned behavior
Human behavior is the result of deliberate planning, reflecting the individual's behavioral intent, i.e., the individual's propensity to act in a particular manner. The attitude of the behavior (denoted by a), the subjective norm (denoted by S) and the perceived behavior control (denoted by P) are the three main factors that determine the intent of the behavior, which form a linear combination model that determines the final individual behavior, namely:
B=A+S+P;
where B represents the final intent for the behavior.
Attitude: attitudes characterize the personal willingness to join the block chain ecosystem consensus process. It refers to the individual's favorable, unfavorable assessment of the process of joining the consensus.
Subjective specification: subjective norms are a social factor. It refers to the perceived social pressure of performing or not performing the act of joining the consensus process. For example, a person with a high social reputation tends to assume more social responsibility.
And (3) controlling the perception behaviors: it refers to the perceived difficulty of performing behavior, which is believed to reflect past experience and expected hindrances. In blockchains, the desirability of returning to the consensus process and the difficulty of the authorizer competing reflect the factors of perceptual behavioral control.
2.2.2 consensus Regulation and control model based on planned behavior theory
The plan action protocol contains two sub-models: a credit model and a consensus regulation model based on the planned behavior; .
The credit model is designed for reputation evaluation of users in a blockchain network. For rational individuals, their reputation must be kept at a premium if they want to make a long-term profit. Thus, the credit model may effectively prevent a user from conducting a dishonest transaction. While consensus regulation models based on planning activities are used to establish the credit thresholds required by the credit models, which will affect the degree of decentralization and reliability of overall blockchain consensus.
1) And (3) credit model:
in a blockchain network, each individual is uniquely identified with an address, denoted as an address tag. Each time an individual makes a transaction, the protocol gives an evaluation of its transaction. In a block generating period, the block collects all transactions of the individual in the period, and the individual credit in the block is summarized according to the evaluation in the transactions. By using
Figure BDA0003457207210000161
And the reputation value of the address of the individual recorded in the block with the height of the block is represented. Evaluation of an individual after a transaction is given by the individual with whom the transaction is being conducted, using c address Indicates that if the evaluation is positive, c address =C + (ii) a If negative, c address =C - (ii) a If the evaluation has no referential property, c address =C 0 . Then in one block the individual reputation of the individual address is represented as
Figure BDA0003457207210000162
Where M represents the number of transactions in the block. The total credit rating for an individual address is expressed as the sum of the reputation values in the most recent K blocks, i.e., the
Figure BDA0003457207210000163
Where current height represents the currently highest block height. Computing the credit rating through a sliding window of size K ensures the comprehensiveness of the rating of the agreement on the individual. Individuals with higher credit ratings may submit applications called authorizers, who may be compensated by generating blocks.
2) Consensus regulation model based on plan behaviors
A consensus regulatory model based on planned behavior is used to control the generation of authorizers. According to the planned behavior theory, the willingness of an individual i to apply for what is called an authorizer is defined as: b i =a i +s i +p i . Wherein, a i Expressing attitude, s i Representation and C i Associated subjective Specifications, p i Indicating a perceptual behavior control. In particular, the method comprises the following steps of,
Figure BDA0003457207210000164
where β represents a parameter for normalization, N represents the number of blocks, C max Represents a maximum limit of credits;
Figure BDA0003457207210000165
wherein N is AG Indicating the total number of authorizers for the protocol setting. Finally, the total number of persons who are willing to apply for the authorizer is expressed as:
Figure BDA0003457207210000171
protocol to increase fault tolerance of applications, allow N CA The applicants refer to as candidates, where N CA ≥N AG . Then the required N may be passed CA To adjust trust threshold C T
Figure BDA0003457207210000172
As can be seen from the above equation, when a protocol requires setting N AG When an authorizer is authorized, the number N of individuals who theoretically participate in the application can be calculated AP Then according to N CA Can adjust C T To dynamically set the application difficulty.
The credit of the authorizer applicant is assumed to satisfy a normal distribution, such as a rating of C + Satisfy the requirements of
Figure BDA0003457207210000173
Evaluation C 0 Satisfy the requirement of
Figure BDA0003457207210000174
Evaluation was C - Satisfy the requirement of
Figure BDA0003457207210000175
Credit threshold C for authorizer candidate T Can be determined from a normal probability distribution function as follows:
Figure BDA0003457207210000176
wherein λ is sum =K(λ + C +0 C 0- C - ),
Figure BDA0003457207210000177
In the PoPB consensus protocol, there are two conflicting factors. On the one hand, for stability reasons, it is desirable that the high credit applicant be able to become the authorizer; on the other hand, all requesters should have the same chance to become authorized due to fairness. Wherein the stability is expressed as:
Figure BDA0003457207210000178
wherein
Figure BDA0003457207210000179
Representing the average credit of all applicants. And fairness is expressed as:
Figure BDA00034572072100001710
between stability and fairness, the optimal number of candidate nodes and the credit threshold may be determined by the following Jain's optimization problem:
Figure BDA0003457207210000181
s.t.N AG ≤N CA ≤N AP
wherein ε and
Figure BDA0003457207210000182
are weight parameters, and when they take the same value, the weights representing stability and fairness are the same. When in use
Figure BDA0003457207210000183
Taking N at the maximum CA And C T I.e. an optimal stability and fairness balance point is reached. Solving for the optimal balance point may use the following dynamic credit threshold determination algorithm as follows:
Figure BDA0003457207210000184
2.3 authorization group mechanism
2.3.1. Authorization group initialization: a first set of authorizers is created in the creation block and the addresses of all authorizers are recorded in the "extra" field of the creation block, and a credit score for each authorizer is initialized to K CreditThreshold, where K is a positive integer and CreditThreshold is a credit score threshold to determine whether a user is eligible to apply for an authorizer. The initialized credit score allows the authorized group to be served for a long time in the initial phase. In addition, a DutyTimer (timer) that calculates the working time of each authorizer is also recorded in the "extra" field.
2.3.2.2. And (3) authorization authority distribution: when the blockchain begins to work, the authorizer collects and validates the transactions and packs some of them into a block according to the blockpacking rules. The PoPB protocol specifies an authorizer recorded in the latest block as a round-valued authorizer through a simple algorithm, thereby obtaining a boolean value BlockHeight% NumAuthorizers = = authorizerffset, where BlockHeight is the height of the previous block, numAuthorizers is the size of the authorized group, and authorzerfset is the authorizer-compliantThe offset of the order from the alphabetical order in the grant set, each grant gets a boolean value. If the returned value is true, the authorizer is an in-turn authorizer and the others are all off-turn. This algorithm ensures that only one in-turn grantor is selected in each block period. The In-turn authorizer can immediately sign its block and broadcast it to the blockchain network. Consider that the in-turn authorizer may be offline. To handle such a situation, the off-turn authorizers are also allowed to sign and broadcast their respective blocks, but with a random delay time. Thus, the robustness of block generation and the in-turn authorizer's priority is protected. In addition, in order to further ensure the fairness of the distribution of the authorization rights, each authorizer is not used
Figure BDA0003457207210000191
The limit of more than one block is signed within a block period.
2.3.3. Block signature and verification: once the authorizer has the right to create a new tile, he will update the tile header including the authorized set with the group membership credit score and DutyTimers. The new tile is then signed with the private key. The signature of the chunk is also recorded in the "extra" field of the chunk header, used for chunk verification over the blockchain network. Specifically, when a node receives a new block, it extracts the signature and computes the public key using spec256k1 elliptic curve cryptography inverse solution. It is then checked whether the address from the public key is present in the extra data and the corresponding authorizer qualifies for block generation. If so, the new block is accepted as a valid block.
2.3.4. Qualification of the authorizer: the address of the authorizer in the "extra" field will be updated since some new authorizers will qualify for joining or some old authorizers will be disqualified. If a node wants to become a new authorizer, it will send an offer. The authorizer receiving the offer will evaluate the credit score of the new applicant, and if the applicant's credit score exceeds a credit threshold,its proposal will be recorded and added to the local proposal pool. At each block period, if the proposal pool is not empty, the incumbent authorizer will vote on the applicant, and if the credit of one applicant exceeds the credit threshold, the incumbent authorizer will declare in the block header the vote that was obtained by the applicant. Each authorizer maintains a local database, called vote statistics, for the tallying of applicants' votes. When a new block is received, each authorizer will check the voting results and update the local vote statistics. Once an applicant has obtained
Figure BDA0003457207210000201
This applicant will become a new authorizer and will be declared in the next block.
2.3.5. The authorizer disqualifies: there are several situations in which an existing authorizer will be disqualified. In the first case, a user has a proposal to cancel an authorizer. Similar to the voting process in rule 4, if more than half of the authorizers agree to disqualify them, it will become a normal user. In the second case, if an authorizer's credit score is below the credit threshold, it will be disqualified. In the third case, if the DutyTimer of an authorizer exceeds the maximum continuous operating time indicated by MaxDutyTime, it will be disqualified; otherwise, the DutyTimer is increased by one. Once an authorizer is disqualified, its address and corresponding information is deleted from the chunk header of the next generated chunk.
2.4PoPB Block data Structure Specification
TABLE 1 PoPB Block header
Figure BDA0003457207210000202
The data structure of the PoPB protocol is crucial to its realism and cannot be arbitrarily defined. Therefore, the invention designs a PoPB data structure based on the EtherFang blockchain specification.
Data on all chains to achieve PoPB is specified and recorded in the block header as shown in table 1. The invention mainly reuses the data field of the specification block head of the Ether house block chain from the three aspects of Extra, coinbase and Nonce. Extra, which is a variable length, is stored in the block header and any information can be written. This data field is therefore used to record the address, credit score and DutyTimer for each authorizer. The chunk signature from the authorizer is also written in the Extra field. The data structure specification of the modified Extra is shown in table 1. Since the address of the block producer can be derived from its signature, there is no power consuming hashing problem in PoPB using PoW. The CoinBase and Nonce fields in the tile header may be reused in the voting process. Specifically, the address of the voting authority is listed in the CoinBase field, and the voting result is displayed in the Nonce field, as shown in table 1. Note that the conibase display order was adjusted in the work of the present invention for clear display.
3. Testing and verification
In the test, let C + =3,C 0 =1,C - = -10. To keep the block grant stable, the size of the grant set is set to N AG =3. Let epsilon =0.5 and credit account period K =1000. In addition, a maximum continuous tenure T of the authorizer is set max =1000。
3.1 functional comparison
The PoPB was compared with PoW, poA, poT and the results are shown in table 2. For different consensus protocols, different strategies are employed. In PoW, users generate tiles by competing to solve a hashed puzzle, which performs well in terms of system security and robustness. However, it is characterized by high energy consumption and unsustainability. PoA provides an open framework for election of block signers. In PoA, the user can be a signer of tile generation by voting, or can be cancelled by the voting process. But PoA does not consider social evaluation of users. The PoT takes the trust value of the user as a criterion for social evaluation and selects a verifier of the transaction according to his trust value. The PoT is weakly centered.
In PoPB, a model of the TPB-based autonomous consensus process is first established. Through the model, a computable threshold for the qualification of the block data authorizer is derived. In addition, a dynamic grantor group mechanism is proposed for credit and decentralization considerations. Jain's fairness is used to balance credit and decentralization well. Thus, popbs have the advantages of safety and robustness compared to poas and pots.
TABLE 2 functional comparison of PoPB, poW, poA, poT
Figure BDA0003457207210000211
Figure BDA0003457207210000221
3.2 optimal candidate node number validation
In PoPB, a node willing to participate in consensus is selected based on node behavior, and then the number of nodes in the authorized group is set. Through the dynamic credit threshold determination algorithm, the optimal credit threshold and the number of candidate nodes can be obtained. As can be seen from fig. 4, the credit threshold decreases as the number of candidate nodes increases. In addition, when the number of candidate nodes is fixed, jain's fairness of the protocol reaches the maximum, and an optimal credit threshold can be determined.
3.3 stability and fairness
The stability and fairness of PoPB were evaluated. The test was performed in a comparative manner, comparing PoPB with PoT and PoA. The comparative results are shown in FIG. 5.
Wherein the PoPB achieves a good balance between PoA and PoT. PoA gives equal rights to block link points as authorizers, while PoT only reserves a few high credit nodes as authorizers. PoPB sets a reasonable credit threshold, allowing some nodes with credit scores above the threshold to become authorizer candidates. Thus, poA can achieve high fairness but at the same time be accompanied by lower stability. Conversely, poT can achieve high stability, but fairness is low. And the PoPB realizes good balance of fairness and stability by introducing a credit threshold determination algorithm and a dynamic authorizer group mechanism.
3.4 transaction amount and consensus delay
The transaction amount and consensus delay were tested. By setting different transaction sending periods, different transaction strengths are evaluated. A hybrid test was chosen in this test. The results are shown in fig. 6. As the transaction transmission period increases from 200 milliseconds to 500 milliseconds, the blockchain network load decreases. Consequently, transaction and consensus delays are reduced.
4. In the invention, a novel consensus agreement PoPB is provided, which consists of a credit model and a consensus regulation model based on a plan behavior theory. And the credit model and the consensus regulation and control model based on the plan behavior theory jointly select an authorization group responsible for block generation. The authorization group replaces block uploading, so that the PoPB avoids consuming a large amount of resources to achieve consensus, and meanwhile, the credibility and reliability of a block chain are guaranteed. Tests prove that the PoPB realizes good balance of decentralization and credit by introducing a credit threshold determination algorithm and a dynamic authorizer group mechanism. In summary, poPB is a well-recognized mechanism with good reliability, decentralization, credibility, and resource conservation.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, is implemented in a computer program product that includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention may be generated in whole or in part when the computer program instructions are loaded or executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any modification, equivalent replacement, and improvement made by those skilled in the art within the technical scope of the present invention disclosed in the present invention should be covered within the scope of the present invention.

Claims (10)

1. A method for controlling a blockchain consensus system, the method comprising:
modeling a decision process of individual participation consensus in a decentralized environment by using a plan behavior theory, and acquiring influence factors of subjective willingness, social credit and work report on decision behaviors; estimating the number of the groups participating in the consensus mechanism by using a probability model, and controlling the scale of the groups participating in the consensus by using a computable credit threshold; a block chain consensus mechanism is combined to construct a decentralization and credibility degree measurement index system, and credit threshold setting with tunable two indexes and optimization control of the scale of the group participating in consensus are carried out; and reinforcing the dynamic adaptability of the consensus mechanism by utilizing a dynamic authorization group mechanism.
2. The method as claimed in claim 1, wherein the method comprises the steps of:
step one, a PoPB consensus process is proposed from the perspective of block chain transaction processing;
step two, proposing consensus process modeling based on a plan behavior theory;
step three, proposing a consensus protocol design based on the dynamic authorization group;
and step four, providing a data structure design of the PoPB.
3. The method of claim 2, wherein the PoPB consensus process in step one comprises:
(1) And (3) transaction proposal: a user puts forward a service transaction by calling an intelligent contract; after the intelligent contract is called to process the self service, the user signs the transaction and sends the transaction to the block chain network;
(2) Transaction verification: the other users who receive the transaction carry out verification according to transaction verification rules, including verifying the signature of a transaction presenter, the account balance, the standardization of an intelligent contract and the transaction cost used; if the user successfully verifies the transaction, broadcasting the transaction to its neighboring nodes; otherwise, the transaction will be discarded;
(3) Block generation: the blockchain authorizer will collect transactions broadcast over the blockchain network; if an authorizer authenticates in turn and generates a block, packaging the transactions which are not authenticated into a block; after the modification of the authorizer group and the credit score of the authorizer are also recorded in the block, the authorizer signs a new block and broadcasts it to the network;
(4) Block verification: any user accepting the new block can be verified through the block verification rule, including updating of the validity authorization group of the transaction concerned, credit score of the authorizer and validity of the authorizer; if the user successfully validates the block, connect the block to the blockchain ledger and store locally; when most network nodes successfully verify the block, the transaction's consensus certificate and the new block are completed.
4. The method as claimed in claim 2, wherein the theoretical model of planned behavior in step two comprises:
the individual behavior is the result of a deliberate plan, reflecting the individual's behavioral intent, i.e., the individual's propensity to act in a particular manner; behavior attitude A, subjective specification S and perceptual behavior control P are three main factors for determining behavior intention, a linear combination model is formed, and final individual behaviors are determined, namely:
B=A+S+P;
wherein B represents the final intent of the behavior;
attitude: the attitude represents the individual willingness of the consensus process of the block chain ecosystem, and refers to the favorable and unfavorable evaluation of the individual on the consensus process;
subjective specification: subjective norms are a social factor, which refers to the perceived social pressure of performing or not performing actions that join the consensus process;
and (3) perception behavior control: refers to the perceived ease of execution of an action, believed to reflect past experience and expected resistance; in blockchains, the expectation of return on consensus process and the difficulty of authorizer competition reflect the factors of perceptual behavior control.
5. The method as claimed in claim 2, wherein the modeling of the consensus process based on the planned behavior theory in step two comprises:
consensus process modeling based on planning behavior includes two sub-models: a credit model and a consensus regulation model based on planned behavior;
the credit model is designed for reputation assessment of users in a blockchain network; a consensus regulation model based on the planned behaviors is used for establishing a credit threshold value required by a credit sub-model;
(1) And (3) credit model:
in a block chain network, each individual is uniquely marked by an address, which is expressed as an address tag; each time an individual makes a transaction, the protocol gives an evaluation of its transaction; during a block generation period, the block collects all transactions of the individual during the period, and summarizes the individual in the block according to the evaluation in the transactionA reputation; by using
Figure FDA0003457207200000031
Representing the reputation value recorded by the individual address in the block with height of the block; evaluation of an individual after a transaction is given by the individual with whom the transaction is being conducted, using c address Indicates that if the evaluation is positive, c address =C + (ii) a If negative, c address =C - (ii) a If the evaluation has no referential property, c address =C 0 (ii) a In one block, the individual reputation of an individual address is represented as
Figure FDA0003457207200000032
Wherein M represents the number of transactions in the block; the total credit rating for an individual address is expressed as the sum of the reputation values in the most recent K blocks,
Figure FDA0003457207200000033
wherein current height represents the current highest block height; calculating credit evaluation through a sliding window with the size of K to ensure the comprehensiveness of the evaluation of the agreement on the individual, submitting an application called an authorizer by the individual with higher credit evaluation, and obtaining a reward by the authorizer through generating a block;
(2) Consensus regulation model based on plan behaviors
A consensus regulation model based on the planned behavior is used for controlling the generation of the authorizer; according to the planned behavior theory, the willingness of an individual i to apply for what is called an authorizer is defined as: b i =a i +s i +p i (ii) a Wherein, a i Expressing attitude, s i Is represented by the formula i Associated subjective Specifications, p i Representing perceptual behavior control;
Figure FDA0003457207200000034
where β represents a parameter for normalization, N represents the number of blocks, C max Maximum for representing creditA large value limit;
Figure FDA0003457207200000035
wherein N is AG Representing the total number of authorized persons set by the protocol;
the total number of willing application authorizers is expressed as:
Figure FDA0003457207200000036
the protocol allows N for increasing the fault tolerance of the application CA The applicants refer to as candidates, where N CA ≥A NG (ii) a Then the desired N is passed CA To adjust the trust threshold C T
Figure FDA0003457207200000041
When the protocol needs to set N AG When an authorizer is authorized, the number N of individuals who theoretically participate in the application is calculated AP (ii) a According to N CA Can adjust C T The difference in (2) is the difficulty of dynamically setting the application;
the credit of the authorizer applicant satisfies the normal distribution and is evaluated as C + Satisfy the requirement of
Figure FDA0003457207200000042
Evaluation was C 0 Satisfy the requirement of
Figure FDA0003457207200000043
Evaluation was C - Satisfy the requirement of
Figure FDA0003457207200000044
Credit threshold C for authorizer qualification T The method is determined from a normal probability distribution function, and specifically includes the following steps:
Figure FDA0003457207200000045
wherein λ is sum =K(λ + c +0 C 0- C - ),
Figure FDA0003457207200000046
In the PoPB consensus protocol, stability is expressed as:
Figure FDA0003457207200000047
wherein,
Figure FDA0003457207200000048
mean credit for all applicants; and fairness is expressed as:
Figure FDA0003457207200000049
between stability and fairness, the optimal number of candidate nodes and the credit threshold are determined by the following Jain's optimization problem:
Figure FDA00034572072000000410
s.t. N AG ≤N CA ≤N AP
wherein ε and
Figure FDA00034572072000000411
are weight parameters, when they take the same value, the weights representing stability and fairness are the same; when the temperature is higher than the set temperature
Figure FDA00034572072000000412
Taking N at maximum CA And C T I.e. an optimal stability and fairness balance point is reached.
6. The method as claimed in claim 2, wherein the step three of designing the consensus protocol based on the dynamic grant set comprises:
(1) Authorization group initialization: establishing a first group of authorizers in the creature block, recording the addresses of all authorizers in an extra field of the creature block, and initializing a credit score of each authorizer as K CreditThreshold; the credit score threshold is used for judging whether a user is qualified to apply for becoming an authorizer; the initialized credit score allows the authorization group to be served for a long time in the initial phase; a timer DutyTimer that calculates the working time of each authorizer is also recorded in the extra field;
(2) And (3) authorized authority distribution: when the blockchain starts to work, an authorizer collects and verifies transactions, and packs some of the transactions into one block according to a blockpacking rule; the PoPB protocol designates an authorizer recorded in the latest block as a round-valued authorizer through a simple algorithm, so as to obtain a boolean value BlockHeight% NumAuthorizers = = authorizerffset, where BlockHeight is the height of the previous block, numAuthorizers is the size of the authorization group, authorizerfset is the offset of the authorizer order relative to the alphabetical order in the authorization group, and each authorizer respectively obtains a boolean value; if the returned value is true, the authorizer is an in-turn authorizer, and the others are all off-turn; the In-turn authorizer immediately signs its block and broadcasts it to the blockchain network; the robustness of block generation and the priority of the in-turn authorizer are protected; with one per authorizer not being available
Figure FDA0003457207200000051
Signing a limit of more than one block within a block period;
(3) Block signature and verification: once the authorizer has the right to create a new tile, the tile header including the authorized set with the group membership credit and the on-time timer DutyTimers will be updated; signing on the new block by using a private key; the signature of the block is also recorded in the extra field of the block header, used for block verification over the blockchain network; when a node receives a new chunk, extracting the signature and computing the public key using spec256k1 elliptic curve cryptography inverse solution; checking whether an address from the public key exists in the additional data and whether a corresponding authorizer qualifies for block generation; if so, the new block is accepted as a valid block;
(4) Authorizer qualification: the address of the authorizer in the extra field is updated; if a node wants to become a new authorizer, a proposal will be sent; the authorizer receiving the proposal evaluates the credit score of the new applicant, and if the credit score of the applicant exceeds a credit threshold, the proposal is recorded and added into a local proposal pool; at each block period, if the proposal pool is not empty, the incumbent authorizer will vote on the applicant, and if the credit of the applicant exceeds the credit threshold, the incumbent authorizer will declare in the block header the vote that the applicant obtained; each authorizer maintains a local database named vote statistics for counting applicants' votes; when a new block is received, each authorizer checks the voting results and updates the local vote statistics; applicant obtains
Figure FDA0003457207200000061
Will become a new authorizer and will be declared in the next block;
(5) The authorizer disqualifies: there are several situations that will disqualify an existing authorizer; in the first case, a user has a proposal to cancel an authorizer; more than half of the authorizers agree to cancel the authorizers' qualification, and the user becomes a common user; in the second case, an authorizer's credit score below the credit threshold will be disqualified; in the third case, an authorizer's DutyTimer exceeding the maximum continuous operating time indicated by MaxDutyTime will be disqualified; otherwise, increasing the DutyTimer by one; an authorizer is disqualified, the address and corresponding information will be deleted from the chunk header of the next generated chunk;
the data structure of the PoPB in step four comprises a PoPB block header comprising:
PreHash, representing a hash value, a pointer to the previous block;
UncleHash, which represents the Hash value of the number block;
root, which represents the Root hash value of state Trie;
TxHash, which represents the root Hash value of tx Trie;
ReceiptHash, which represents a root hash value of a receipt Trie;
bloom, representing a Bloom filter;
difficilty, which represents the Difficulty of solving the hash problem for block generation proof;
number, which indicates the block Number on the block chain;
time, which represents a block generation Time;
GasLimit, gasUsed, denotes gas usage rules;
extra, representing a variable length reserved field;
extravanity,32 bits;
ExtraBody, representing the authorizer address array, credit score and DutyTimer;
ExtraSeal, representing an authorizer;
CoinBase, which represents the address of the voting authorizer;
nonce, which indicates the voting result, 0xf indicates addition, and 0x0 indicates deletion.
7. A blockchain consensus system applying the control method of the blockchain consensus system according to any one of claims 1 to 6, wherein the blockchain consensus system comprises:
the consensus decision modeling module is used for modeling the decision process of individual participation in consensus in a decentralized environment by using a TPB (tire pressure monitoring) theory and analyzing the influence of three factors, namely subjective willingness, social credit and work report, on decision behaviors;
the group quantity estimation module is used for estimating the quantity of the groups participating in the consensus mechanism by utilizing a probability model, and providing a computable credit threshold to realize the controllability of the scale of the groups participating in the consensus;
the index system construction module is used for constructing a decentralized and credibility measuring index system by considering the characteristics of a block chain consensus mechanism, and realizing the credit threshold setting with tunable two indexes and the optimization control of the scale of the group participating in consensus;
and the authorization group mechanism building module is used for providing a dynamic authorization group mechanism and strengthening the dynamic adaptability of the consensus mechanism.
8. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform a method of controlling the blockchain consensus system according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to execute a control method of a blockchain consensus system according to any one of claims 1 to 6.
10. An information data processing terminal characterized by being configured to implement the function of the block chain consensus system according to claim 7.
CN202210010651.3A 2022-01-05 2022-01-05 Block chain consensus system and control method thereof Pending CN115423472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210010651.3A CN115423472A (en) 2022-01-05 2022-01-05 Block chain consensus system and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210010651.3A CN115423472A (en) 2022-01-05 2022-01-05 Block chain consensus system and control method thereof

Publications (1)

Publication Number Publication Date
CN115423472A true CN115423472A (en) 2022-12-02

Family

ID=84230512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210010651.3A Pending CN115423472A (en) 2022-01-05 2022-01-05 Block chain consensus system and control method thereof

Country Status (1)

Country Link
CN (1) CN115423472A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635333A (en) * 2024-01-11 2024-03-01 国网山东省电力公司电力科学研究院 Block chain transaction execution method and block chain link point
CN118509158A (en) * 2024-07-18 2024-08-16 浙江万里共链科技发展有限公司 Method and system for optimizing PBFT alliance block chain consensus mechanism

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117635333A (en) * 2024-01-11 2024-03-01 国网山东省电力公司电力科学研究院 Block chain transaction execution method and block chain link point
CN118509158A (en) * 2024-07-18 2024-08-16 浙江万里共链科技发展有限公司 Method and system for optimizing PBFT alliance block chain consensus mechanism

Similar Documents

Publication Publication Date Title
Rebello et al. A security and performance analysis of proof-based consensus protocols
Liu et al. Stereotrust: a group based personalized trust model
CN115423472A (en) Block chain consensus system and control method thereof
Huang et al. Resource allocation and consensus of blockchains in pervasive edge computing environments
CN114297722A (en) Privacy protection asynchronous federal sharing method and system based on block chain
Cullen et al. Distributed ledger technology for IoT: Parasite chain attacks
Zhao et al. Toward trustworthy defi oracles: past, present, and future
CN117171786A (en) Decentralizing federal learning method for resisting poisoning attack
US20230352938A1 (en) Methods, systems, apparatuses, and devices for facilitating managing interconnection processes on a power transmission network
Cui et al. Blockchain enabled data transmission for energy imbalance market
Jiang et al. A consensus mechanism based on multi-round concession negotiation
Zhang et al. A hybrid trust evaluation framework for E-commerce in online social network: a factor enrichment perspective
Mezni et al. A negotiation‐based service selection approach using swarm intelligence and kernel density estimation
CN116996521B (en) Relay committee cross-chain interaction system and method based on trust evaluation model
Yuan et al. Lightweight and reliable decentralized reward system using blockchain
Zhao et al. A Blockchain Consensus Mechanism to Optimize Reputation-based Distributed Energy Trading in Urban Energy System
Gai et al. A Secure Sidechain for Decentralized Trading in Internet of Things
Pollrich Mediated audits
Hu et al. A dynamic service trading in a dlt-assisted industrial iot marketplace
Wang et al. Construction of Enterprise Asset Management Accounting System Based on Blockchain Technology
Scaffino et al. Alba: The Dawn of Scalable Bridges for Blockchains
Ding et al. A Fast Cross‐Chain Protocol Based on Trusted Notary Group for Metaverse
Liu et al. Research on cross-chain consensus models in complex trust environments
Cheng et al. Correlation trust authentication model for peer-to-peer networks
Liu Trust beyond reputation: Novel trust mechanisms for distributed environments

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