CN113610523A - Credible contract consensus method, device and equipment for improving performance of alliance chain - Google Patents

Credible contract consensus method, device and equipment for improving performance of alliance chain Download PDF

Info

Publication number
CN113610523A
CN113610523A CN202110900881.2A CN202110900881A CN113610523A CN 113610523 A CN113610523 A CN 113610523A CN 202110900881 A CN202110900881 A CN 202110900881A CN 113610523 A CN113610523 A CN 113610523A
Authority
CN
China
Prior art keywords
transaction
endorsement
consensus
node
sdk
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
CN202110900881.2A
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.)
Runlian Software System Shenzhen Co Ltd
Original Assignee
Runlian Software System Shenzhen Co Ltd
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 Runlian Software System Shenzhen Co Ltd filed Critical Runlian Software System Shenzhen Co Ltd
Priority to CN202110900881.2A priority Critical patent/CN113610523A/en
Publication of CN113610523A publication Critical patent/CN113610523A/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/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • 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

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a credible contract consensus method, a device and equipment for improving the performance of a alliance chain, wherein the credible contract consensus method for improving the performance of the alliance chain comprises the following steps: comparing whether the chain code data used for simulating the execution of the transaction with the chain code data in the name space is consistent or not by the endorsement node; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark of inconsistent comparison to the SDK; the client side carries out consensus decision on the comparison result of the endorsement nodes through the SDK, and if the transaction is judged to reach consensus, the next step is carried out; the client sends a transaction proposal to the sequencing node through the SDK; the sequencing node sequences transactions, constructs blocks and sends the blocks to the accounting node; the accounting node checks whether the transaction conforms to the endorsement policy, verifies, prepares and submits the transaction through the ledger submitter, and updates the state database through the ledger submitter. The checking time that all accounting nodes recall the namespace checking version, name, transaction content, parameters and the like is saved, and the performance of the alliance chain is improved.

Description

Credible contract consensus method, device and equipment for improving performance of alliance chain
Technical Field
The invention relates to the technical field of block chains, in particular to a credible contract consensus method, a credible contract consensus device and credible contract consensus equipment for improving the performance of a union chain.
Background
The original intention of the alliance chain is to realize enterprise-level application, but actually, each transaction generated according to the intelligent contract still needs all accounting nodes to perform consensus authentication, which keeps decentralization of transaction records to a certain extent, but greatly reduces the efficiency of transaction completion. And because of the independence of the intelligent contract in the alliance chain, the execution process and the generated transaction information cannot be maliciously polluted by the outside on the alliance chain, so the credibility of the transaction information is far higher than that of the public chain, but each transaction generated by the alliance chain according to the intelligent contract still needs a series of check and verification of all accounting nodes at present, and the transaction is recorded to be effective only when all the certificates are passed, thereby reducing the efficiency to a certain extent.
To ensure that valid transactions are generated for the latest version of the chain code. When the chain code is instantiated or updated, the endorsement node calls the LSCC system chain code (which is a built-in system chain code and is all called a life cycle management system chain code, and the main function is to manage the chain code deployed on the endorsement node) to store the chain code related data in an LSCC namespace. When a transaction occurs, all accounting nodes check the chain code information of each transaction extraction transaction execution against the chain code information of the lscc namespace. Performance is affected when the number of transactions is excessive.
The accounting node performs a large amount of transaction verification aiming at each transaction, including transaction parameter legality, transaction format correctness, whether transaction content is tampered, read-write set inspection and the like, and the accounting node efficiency is also influenced.
Disclosure of Invention
The invention aims to provide a credible contract consensus method, a credible contract consensus device and credible contract consensus equipment for improving the performance of a alliance chain, and aims to solve the problem that the transaction efficiency of the alliance chain is low in the prior art.
In a first aspect, an embodiment of the present invention provides a trusted contract consensus method for improving federation chain performance, including:
the client side calls a certificate service through the SDK to obtain an identity certificate;
the client constructs and submits a transaction proposal to an endorsement node according to the identity certificate;
the endorsement node carries out simulation execution transaction according to a transaction proposal to obtain a transaction result;
the endorsement node compares whether the chain code data used by the simulation execution transaction is consistent with the chain code data in the lscc naming space; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark with inconsistent contrast to the SDK;
the client side carries out consensus decision on the comparison result of the endorsement nodes through the SDK, if the transaction is judged to achieve consensus, the next step is carried out, otherwise, the consensus is returned to fail, and the processing is stopped;
the client sends a transaction proposal to a sequencing node through the SDK;
the sequencing node sequences transactions, constructs blocks and sends the blocks to an accounting node;
and the accounting node checks whether the transaction conforms to the endorsement policy, if so, the accounting book submitter verifies, prepares and submits the transaction, and updates the state database through the accounting book submitter, and if not, the processing is stopped.
In a second aspect, an embodiment of the present invention provides a trusted contract consensus apparatus for improving performance of a federation chain, including:
the client side obtains the certificate unit, is used for obtaining the identity certificate through the certificate service of SDK call;
the first client transaction proposal sending unit is used for constructing and submitting a transaction proposal to an endorsement node according to the identity certificate;
the endorsement node simulation execution transaction unit is used for performing simulation execution transaction according to a transaction proposal to obtain a transaction result;
the endorsement node comparison unit is used for comparing whether the chain code data used for simulating and executing the transaction is consistent with the chain code data in the lscc naming space; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark with inconsistent contrast to the SDK;
the client consensus decision unit is used for carrying out consensus decision on the comparison result of the endorsement nodes through the SDK, if the transaction is judged to achieve consensus, the next step is carried out, otherwise, the consensus is returned to fail, and the processing is stopped;
the second client transaction proposal sending unit is used for sending the transaction proposal to the sequencing node through the SDK;
the sequencing node block construction unit is used for conducting transaction sequencing, constructing blocks and sending the blocks to the accounting node;
and the accounting node checking unit is used for checking whether the transaction conforms to the endorsement policy, if so, verifying, preparing and submitting the transaction through the account book submitter, updating the state database through the account book submitter, and if not, stopping the processing.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the trusted contract consensus method for improving federation chain performance as described in the first aspect above.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the trusted contract consensus method for improving federation chain performance according to the first aspect.
The embodiment of the invention achieves contract (chain code) content and version consensus through the endorsement node when the transaction is initiated, which means that the transaction generated by the endorsement node according to the contract (chain code) is in certain conformity with the standard in version, content and legality, all subsequent bookkeeping nodes can prove that the transaction is legal only by performing endorsement policy authentication, so that the verification time of recalling 1scc naming space to verify version, name, transaction content, parameters and the like by all bookkeeping nodes is saved, the time of completing the transaction by the alliance chain is shortened on the premise of ensuring the transaction to be effective, and the performance of the alliance chain is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a trusted contract consensus method for improving federation chain performance according to an embodiment of the present invention;
fig. 2 is a sub-flowchart illustrating a trusted contract consensus method for improving federation chain performance before step S103 according to an embodiment of the present invention;
fig. 3 is a sub-flowchart illustrating a trusted contract consensus method for improving federation chain performance according to an embodiment of the present invention before step S105;
FIG. 4 is a sub-flowchart illustrating step S105 of a trusted contract consensus method for improving federation chain performance according to an embodiment of the present invention;
FIG. 5 is a sub-flowchart illustrating step S108 of the trusted contract consensus method for improving federation chain performance according to an embodiment of the present invention;
fig. 6 is a block diagram illustrating a trusted contract consensus apparatus for improving the performance of a federation chain according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, a trusted contract consensus method for improving the performance of a federation chain includes the following steps S101-S108.
S101: the client side calls a certificate service through the SDK to obtain an identity certificate;
in this embodiment, the client calls the certificate service through the SDK to register (acquire the identity certificate through CA authentication) so as to use the blockchain.
Where CA is digital authentication and SDK is a software development kit.
S102: the client constructs and submits a transaction proposal to an endorsement node according to the identity certificate;
in this embodiment, the transaction proposal may also be understood as a transaction proposal, and the client constructs the transaction proposal through the SDK and signs the transaction proposal using the private key of the user.
The signed transaction proposals are packaged and submitted to the endorsement nodes in the channel, and particularly the endorsement nodes receive the transaction proposals and are defined by the endorsement policy, and the client side sends the transaction proposals to the corresponding endorsement nodes according to the endorsement policy.
S103: the endorsement node carries out simulation execution transaction according to a transaction proposal to obtain a transaction result;
in the embodiment, the endorsement node calls the chain code to simulate and execute the transaction according to the transaction proposal; when the chain code is executed, the Read data (key value pair) is a local state database in the endorsement node, and the data Read by the chain code is collected into a Read Set; the account book is not changed by the writing operation of the chain code to the state database, and all the writing operations are recorded in a Write Set (Write Set); the read and write sets will be used in the accounting node to determine whether the transaction is ultimately written to the blockchain.
After the chain code is executed, the endorsement node signs information such as a Read-Write Set (Read-Write Set) obtained after the chain code is simulated and executed, and sends the signed information back to the client. At this time, the transaction information only agrees between the client and a single endorsement node, and the whole network agreement is not completed.
In an embodiment, the endorsement node performs a simulated transaction according to a transaction proposal to obtain a transaction result, and the method includes: the endorsement node checks the propofol signature.
In this embodiment, the MSP module is used to verify the signature at the time the transaction proposal is constructed and to determine whether the user is reasonably authorized to conduct the transaction proposal.
Wherein the propofol signature is a user signature.
Referring to fig. 2, in an embodiment, the endorsement node performs a simulation execution transaction according to a transaction proposal, which includes:
s201: the endorsement node judges whether the received transaction proposal is a signature transaction proposal for client instantiation or upgrading;
s202: if yes, updating the content of the lscc namespace and writing the corresponding chain code data, returning to the proposal waiting for transaction, and if not, not updating the lscc content and not writing the corresponding chain code data.
In this embodiment, when the transaction proposal received by the endorsement node is a signature transaction proposal for client instantiation or upgrade, the endorsement node does not perform simulated execution transaction, but performs updating on the content in the lscc namespace, and writes corresponding chain code data, so as to verify the intelligent contract content, version and name in the lscc namespace after subsequent simulated execution transaction, thereby ensuring that the current simulated execution transaction is the latest chain code execution result, the chain code content is not tampered, and the chain code version and name are also consistent.
In an embodiment, the chain code data includes a chain code combined hash, and the chain code combined hash is a result of the chain code hash, a chain code version, and a chain code name after being concatenated.
In the present embodiment, the chain code combined hash is adopted, so that sufficiently high security is ensured.
The chain code combination hashing comprises the steps of hashing the chain code, splicing the hashed chain code, the chain code version and the chain code name, and hashing the spliced data.
S104: the endorsement node compares whether the chain code data used by the simulation execution transaction is consistent with the chain code data in the lscc naming space; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark with inconsistent contrast to the SDK;
in this embodiment, after the endorsement node executes the transaction through simulation and obtains the transaction result, the chain code data is verified (i.e., the chain code data used when the transaction is executed through simulation is compared with the chain code data in the lscc namespace), and if the verification is passed (i.e., the chain code data is consistent), when the endorsement node sends the transaction result back to the SDK and signs, the corresponding verification result is sent to the SDK.
S105: the client side carries out consensus decision on the comparison result of the endorsement nodes through the SDK, if the transaction is judged to achieve consensus, the next step is carried out, otherwise, the consensus is returned to fail, and the processing is stopped;
in this embodiment, the comparison result is a verification result, statistics is performed after the SDK collects the comparison results of all endorsement nodes, and if all endorsement nodes obtain a mark with consistent comparison, a consensus can be obtained and the transaction is proved to be valid.
By the judgment mode, as long as contract (chain code) content and version consensus is achieved through the endorsement node when the transaction is initiated, the fact that the transaction generated by the endorsement node according to the contract (chain code) is in certain conformity with the standard in terms of version, content and legality means that all subsequent bookkeeping nodes can prove that the transaction is legal only by carrying out endorsement policy authentication, so that the verification time of recalling lscc namespace verification version, name, transaction content, parameters and the like by all bookkeeping nodes is saved, the time of completing the transaction by the alliance chain is shortened on the premise of ensuring the transaction to be effective, and the performance of the alliance chain is improved.
Referring to fig. 3, in an embodiment, the client performs consensus decision on the comparison result of the endorsement node through the SDK, if it is determined that the transaction achieves consensus, the next step is performed, otherwise, the consensus failure is returned, and the processing is terminated, where the steps include:
s301: endorsement signing is carried out on a transaction result, and the endorsement signing and the mark are returned to the SDK;
s302: the client side verifies the endorsement signature through the SDK to obtain a verification result;
s303: the SDK counts the number of endorsement nodes corresponding to the received endorsement signatures to obtain a statistical result;
s304: judging whether the transaction is successful in primary endorsement according to the verification result and the statistical result;
s305: if yes, the next step is carried out, if not, the check endorsement fails, and the processing is stopped.
In this embodiment, before verifying whether the agreement is achieved, the client checks the endorsement signature and counts the number of endorsement nodes corresponding to the endorsement returned after receiving the signature endorsement result of the endorsement node, and enters the next step when the check is successful and the number of endorsement nodes reaches a preset value, otherwise, the check of the endorsement is failed and the processing is terminated.
Referring to fig. 4, in an embodiment, the client performs consensus decision on the comparison result of the endorsement node through the SDK, if it is determined that the transaction achieves consensus, the next step is performed, otherwise, the process returns a failure of consensus, and the process is terminated, including:
s401: the client judges whether the transaction reaches a consensus or not according to the endorsement node number corresponding to the mark with consistent comparison received by the SDK;
s402: if yes, the next step is carried out, if not, the consensus failure is returned, and the processing is stopped.
In this embodiment, in order to determine that the endorsement node comparison results are inconsistent, it is determined that the transaction agrees after more than a number of endorsement nodes agree according to the actual application requirements.
S106: the client sends a transaction proposal to a sequencing node through the SDK;
in this embodiment, after receiving the signature endorsement result of the endorsement node, the client checks the signature of the endorsement node and compares the results of different endorsement nodes for consistency, and after obtaining the result of agreement, the client sends a transaction proposal to the sequencing node through the SDK.
Specifically, if the transaction proposal is a proposal for querying an account book, the client does not need to submit the transaction to the sequencing node. If the transaction proposal is a proposal for updating an account book, the client sends the read set, the write set, the signatures and the channel numbers of all endorsement nodes returned by the endorsement node to the sequencing node after collecting signature endorsement results of enough endorsement nodes meeting the endorsement policy (namely, reaching consensus).
S107: the sequencing node sequences transactions, constructs blocks and sends the blocks to an accounting node;
in this embodiment, the sorting node does not check the entire contents of the transaction proposals, but sorts the transaction proposals according to the channel numbers, then packs the transaction proposals of the same channel into blocks in batches, and sends the sorted transaction proposals to the accounting node.
S108: and the accounting node checks whether the transaction conforms to the endorsement policy, if so, the accounting book submitter verifies, prepares and submits the transaction, and updates the state database through the accounting book submitter, and if not, the processing is stopped.
In this embodiment, the accounting node only needs to perform an endorsement policy, and verifies and prepares the transaction (including verifying a read set (a read set)) through the ledger submitter, and after the verification is passed, submits the transaction and updates the state database through the ledger submitter, thereby completing the transaction.
Wherein, the verification endorsement strategy is mainly to verify whether the transaction is signed by the endorsement; the verification reading set is mainly used for verifying whether the state databases are consistent or not so as to prevent double flowers.
Referring to fig. 5, in an embodiment, the accounting node checks whether the transaction complies with the endorsement policy, and if so, validates, prepares and submits the transaction through the ledger submitter, and updates the status database through the ledger submitter, including:
s501: the accounting node checks the legality of the writing set and calls a vscc to verify a transaction endorsement strategy;
s502: the accounting node verifies and prepares the transaction through the account book submitter;
s503: and the accounting node submits the transaction and updates the state database through the account book submitter.
In this embodiment, the accounting node may check the legitimacy of the write set, invoke a vscc to verify a transaction endorsement policy, verify, prepare, and submit the transaction through the ledger submitter, and update the state database through the ledger submitter.
Referring to fig. 6, a trusted contract consensus apparatus for improving federation chain performance includes:
the client obtains the certificate unit 601, is used for obtaining the identity certificate through the certificate service that SDK calls;
a first client transaction proposal sending unit 602, configured to construct and submit a transaction proposal to an endorsement node according to the identity certificate;
the endorsement node simulation execution transaction unit 603 is used for performing simulation execution transaction according to a transaction proposal to obtain a transaction result;
an endorsement node comparison unit 604, configured to compare whether chain code data used by the simulation execution transaction is consistent with chain code data in the lscc namespace; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark with inconsistent contrast to the SDK;
the client consensus decision unit 605 is used for carrying out consensus decision on the comparison result of the endorsement nodes through the SDK, if the transaction is judged to achieve consensus, the next step is carried out, otherwise, the consensus is returned to fail, and the processing is stopped;
a second client transaction proposal sending unit 606, configured to send a transaction proposal to a sorting node through the SDK;
a sorting node block construction unit 607 for performing transaction sorting and constructing blocks, and sending the blocks to the accounting node;
and the accounting node checking unit 608 is used for checking whether the transaction conforms to the endorsement policy, if so, the transaction is verified, prepared and submitted through the ledger submitter, and the state database is updated through the ledger submitter, and if not, the processing is stopped.
An embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the above trusted contract consensus method for improving federation chain performance.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform a trusted contract consensus method of enhancing federation chain performance as described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. 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.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A trusted contract consensus method for improving performance of a federation chain, comprising:
the client side calls a certificate service through the SDK to obtain an identity certificate;
the client constructs and submits a transaction proposal to an endorsement node according to the identity certificate;
the endorsement node carries out simulation execution transaction according to a transaction proposal to obtain a transaction result;
the endorsement node compares whether the chain code data used by the simulation execution transaction is consistent with the chain code data in the lscc naming space; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark with inconsistent contrast to the SDK;
the client side carries out consensus decision on the comparison result of the endorsement nodes through the SDK, if the transaction is judged to achieve consensus, the next step is carried out, otherwise, the consensus is returned to fail, and the processing is stopped;
the client sends a transaction proposal to a sequencing node through the SDK;
the sequencing node sequences transactions, constructs blocks and sends the blocks to an accounting node;
and the accounting node checks whether the transaction conforms to the endorsement policy, if so, the accounting book submitter verifies, prepares and submits the transaction, and updates the state database through the accounting book submitter, and if not, the processing is stopped.
2. A trusted contract consensus method for enhancing federation chain performance as claimed in claim 1, wherein said endorsement node performs a simulated execution transaction according to a transaction proposal, previously comprising:
the endorsement node judges whether the received transaction proposal is a signature transaction proposal for client instantiation or upgrading;
if yes, updating the content of the lscc namespace and writing the corresponding chain code data, returning to the proposal waiting for transaction, and if not, not updating the lscc content and not writing the corresponding chain code data.
3. A trusted contract consensus method for improving federation chain performance as claimed in claim 1, wherein: the chain code data comprises chain code combination hash, and the chain code combination hash is a result of splicing the chain code hash, the chain code version and the chain code name and then hashing the chain code hash.
4. A trusted contract consensus method for improving federation chain performance as claimed in claim 1, wherein the endorsement node performs a simulated execution transaction according to a transaction proposal to obtain a transaction result, comprising: the endorsement node checks the propofol signature.
5. The method for consensus of trusted contracts for improving alliance link performance as claimed in claim 1, wherein the client performs consensus decision on the comparison result of endorsement node through the SDK, if the transaction is judged to achieve consensus, then the next step is performed, otherwise, the consensus is returned to fail, and the processing is terminated, and the method comprises the following steps:
endorsement signing is carried out on a transaction result, and the endorsement signing and the mark are returned to the SDK;
the SDK verifies the endorsement signature to obtain a verification result;
the SDK counts the number of endorsement nodes corresponding to the received endorsement signatures to obtain a statistical result;
judging whether the transaction is successful in primary endorsement according to the verification result and the statistical result;
if yes, the next step is carried out, if not, the check endorsement fails, and the processing is stopped.
6. The method for consensus of trusted contracts for improving alliance link performance as claimed in claim 1, wherein the client performs consensus decision on the comparison result of endorsement nodes through the SDK, if the transaction is judged to achieve consensus, then the next step is performed, otherwise, the consensus is returned to fail, and the process is terminated, comprising:
the client judges whether the transaction reaches a consensus or not according to the endorsement node number corresponding to the mark with consistent comparison received by the SDK;
if yes, the next step is carried out, if not, the consensus failure is returned, and the processing is stopped.
7. The method for credible contract consensus to improve alliance link performance as claimed in claim 1, wherein the accounting node checks whether the transaction complies with endorsement policy, if yes, then verifies, prepares and submits the transaction through ledger submitter, and updates the status database through ledger submitter, comprising:
the accounting node checks the legality of the writing set and calls a vscc to verify a transaction endorsement strategy;
the accounting node verifies and prepares the transaction through the account book submitter;
and the accounting node submits the transaction and updates the state database through the account book submitter.
8. A trusted contract consensus apparatus for enhancing federation chain performance, comprising:
the client side obtains the certificate unit, is used for obtaining the identity certificate through the certificate service of SDK call;
the first client transaction proposal sending unit is used for constructing and submitting a transaction proposal to an endorsement node according to the identity certificate;
the endorsement node simulation execution transaction unit is used for performing simulation execution transaction according to a transaction proposal to obtain a transaction result;
the endorsement node comparison unit is used for comparing whether the chain code data used for simulating and executing the transaction is consistent with the chain code data in the lscc naming space; if yes, signing the transaction result and returning a mark with consistent comparison to the SDK; if not, returning a mark with inconsistent contrast to the SDK;
the client consensus decision unit is used for carrying out consensus decision on the comparison result of the endorsement nodes through the SDK, if the transaction is judged to achieve consensus, the next step is carried out, otherwise, the consensus failure is returned, and the processing is stopped:
the second client transaction proposal sending unit is used for sending the transaction proposal to the sequencing node through the SDK;
the sequencing node block construction unit is used for conducting transaction sequencing, constructing blocks and sending the blocks to the accounting node;
and the accounting node checking unit is used for checking whether the transaction conforms to the endorsement policy, if so, verifying, preparing and submitting the transaction through the account book submitter, updating the state database through the account book submitter, and if not, stopping the processing.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements the trusted contract consensus method of improving federation chain performance of any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon a computer program, which when executed by a processor, causes the processor to execute the trusted contract consensus method of improving federation chain performance of any one of claims 1 to 7.
CN202110900881.2A 2021-08-05 2021-08-05 Credible contract consensus method, device and equipment for improving performance of alliance chain Pending CN113610523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110900881.2A CN113610523A (en) 2021-08-05 2021-08-05 Credible contract consensus method, device and equipment for improving performance of alliance chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110900881.2A CN113610523A (en) 2021-08-05 2021-08-05 Credible contract consensus method, device and equipment for improving performance of alliance chain

Publications (1)

Publication Number Publication Date
CN113610523A true CN113610523A (en) 2021-11-05

Family

ID=78307390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110900881.2A Pending CN113610523A (en) 2021-08-05 2021-08-05 Credible contract consensus method, device and equipment for improving performance of alliance chain

Country Status (1)

Country Link
CN (1) CN113610523A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257429A (en) * 2021-12-07 2022-03-29 中信银行股份有限公司 Aggregation transaction verification and signature verification method and system based on alliance chain
WO2024002468A1 (en) * 2022-06-28 2024-01-04 Huawei Cloud Computing Technologies Co., Ltd. Automated smart contract hot updates

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493056A (en) * 2018-12-04 2019-03-19 深圳市链联科技有限公司 A kind of block chain common recognition mechanism based on supply chain Ecological Information scene
WO2019125814A1 (en) * 2017-12-21 2019-06-27 Eland Blockchain Fintech Inc. Blockchain based information security system and method
CN110597911A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Certificate processing method and device for block chain network, electronic equipment and storage medium
CN110766551A (en) * 2019-09-10 2020-02-07 中国科学院信息工程研究所 Alliance chain based on improved Kafka consensus mechanism and transaction method
CN111047319A (en) * 2019-09-03 2020-04-21 腾讯科技(深圳)有限公司 Transaction processing method of block chain network and block chain network
CN112163954A (en) * 2020-10-28 2021-01-01 腾讯科技(深圳)有限公司 Transaction method and device based on block chain
CN112232822A (en) * 2020-12-08 2021-01-15 腾讯科技(深圳)有限公司 Transaction processing method, node, device and storage medium of block chain network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019125814A1 (en) * 2017-12-21 2019-06-27 Eland Blockchain Fintech Inc. Blockchain based information security system and method
CN109493056A (en) * 2018-12-04 2019-03-19 深圳市链联科技有限公司 A kind of block chain common recognition mechanism based on supply chain Ecological Information scene
CN111047319A (en) * 2019-09-03 2020-04-21 腾讯科技(深圳)有限公司 Transaction processing method of block chain network and block chain network
CN110766551A (en) * 2019-09-10 2020-02-07 中国科学院信息工程研究所 Alliance chain based on improved Kafka consensus mechanism and transaction method
CN110597911A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Certificate processing method and device for block chain network, electronic equipment and storage medium
CN112163954A (en) * 2020-10-28 2021-01-01 腾讯科技(深圳)有限公司 Transaction method and device based on block chain
CN112232822A (en) * 2020-12-08 2021-01-15 腾讯科技(深圳)有限公司 Transaction processing method, node, device and storage medium of block chain network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257429A (en) * 2021-12-07 2022-03-29 中信银行股份有限公司 Aggregation transaction verification and signature verification method and system based on alliance chain
CN114257429B (en) * 2021-12-07 2024-01-30 中信银行股份有限公司 Aggregation transaction signature verification and storage method and system based on alliance chain
WO2024002468A1 (en) * 2022-06-28 2024-01-04 Huawei Cloud Computing Technologies Co., Ltd. Automated smart contract hot updates

Similar Documents

Publication Publication Date Title
CN107396360B (en) Block verification method and device
CN110597911B (en) Certificate processing method and device for block chain network, electronic equipment and storage medium
CN109040029B (en) Method and apparatus for executing transactions in a blockchain
CN109829294B (en) Firmware verification method, system, server and electronic equipment
CN113610523A (en) Credible contract consensus method, device and equipment for improving performance of alliance chain
US20090228877A1 (en) Intelligent terminal and method for managing intelligent terminal system
EP3779760B1 (en) Blockchain-based data processing method and apparatus, and electronic device
JP5357152B2 (en) Information processing apparatus, information processing method, computer program and integrated circuit for realizing the same
CN110569251A (en) Data processing method, related equipment and computer readable storage medium
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN104537293A (en) Authentication device and system
CN111815321A (en) Transaction proposal processing method, device, system, storage medium and electronic device
CN110992178A (en) Verification method and device for block chain node, computer equipment and storage medium
CN109981278A (en) Applying digital certificate method, system, subscriber identification card, equipment and medium
CN110365711A (en) Multi-platform user identification relevancy method and device
CN115134069A (en) Block chain editing method and block chain link point
CN111258986A (en) Rollback method of block chain
CN110599175A (en) Block processing method and related equipment
CN111489156A (en) Transaction method based on block chain, electronic device and readable storage medium
CN113255011A (en) Block chain state mapping method, system, computer device and storage medium
CN111182527B (en) OTA (over the air) firmware upgrading method and device, terminal equipment and storage medium thereof
CN109409899B (en) Transaction verification method, device and system
CN111222989A (en) Transaction method of multi-channel block chain, electronic device and storage medium
CN112801662B (en) Business link access management method and system based on blockchain intelligent contract
CN113890751A (en) Method, apparatus and readable storage medium for controlling voting of alliance link authority

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