CN111046037A - Transaction processing method of block chain, electronic device and storage medium - Google Patents

Transaction processing method of block chain, electronic device and storage medium Download PDF

Info

Publication number
CN111046037A
CN111046037A CN201911128683.8A CN201911128683A CN111046037A CN 111046037 A CN111046037 A CN 111046037A CN 201911128683 A CN201911128683 A CN 201911128683A CN 111046037 A CN111046037 A CN 111046037A
Authority
CN
China
Prior art keywords
transaction
endorsement
node
result
proposal
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
CN201911128683.8A
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.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software 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 Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN201911128683.8A priority Critical patent/CN111046037A/en
Publication of CN111046037A publication Critical patent/CN111046037A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Accounting & Taxation (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses a transaction processing method of a blockchain, electronic equipment and a storage medium, wherein the transaction processing method of the blockchain comprises the following steps: a first node of the block chain receives a transaction proposal from a transaction end; detecting whether the current state meets an endorsement condition; if yes, the transaction proposal is endorsed to form an endorsement result. By means of the mode, the nodes meeting the endorsement condition can be screened for endorsement, calculation loss of the nodes in the block chain system is reduced, and accuracy and reliability of endorsement results are improved.

Description

Transaction processing method of block chain, electronic device and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method for processing a transaction in a blockchain, an electronic device, and a storage medium.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The blockchain is essentially a decentralized database, with the characteristics of decentralization, openness, independence, security and anonymity. Due to the characteristic that the blockchain account book data cannot be tampered, the transaction performed on the blockchain is safer and more reliable.
The block chain has wide application prospect in many fields such as financial field, internet of things and logistics field, public management, energy, traffic, digital copyright field, insurance field and the like.
Disclosure of Invention
The technical problem that this application mainly solved is: the transaction processing method, the electronic device and the storage medium of the block chain are provided, the nodes meeting the endorsement condition can be screened out for endorsement, the computational power loss of the nodes in the block chain system is reduced, and the accuracy and the reliability of the endorsement result are improved.
In order to solve the technical problem, the application adopts a technical scheme that: a method for processing blockchain transaction is provided, which comprises the following steps:
a first node of the block chain receives a transaction proposal from a transaction end;
detecting whether the current state meets an endorsement condition;
if yes, the transaction proposal is endorsed to form an endorsement result.
Optionally, the detecting whether the current state satisfies the endorsement condition comprises:
detecting whether the first node is offline, down, network delay, insufficient resources or gives up endorsements or not;
and if not, determining that the endorsement condition is met.
Optionally, endorsement of the transaction proposal to form an endorsement result further comprises:
acquiring signature information of a transaction end in a transaction proposal;
verifying whether the signature information is valid;
if so, the step of endorsing the transaction proposal to form an endorsing result is executed.
Optionally, endorsement of the transaction proposal to form an endorsement result further comprises:
verifying whether the transaction proposal meets preset transaction conditions; the preset transaction conditions comprise at least one of correct format, write-in authority and no repeated submission;
if so, the step of endorsing the transaction proposal to form an endorsing result is executed.
Optionally, endorsing the transaction proposal to form an endorsement result comprises:
executing a block chain intelligent contract to simulate a transaction proposal;
endorsements are made to the results of the simulated transactions to form endorsement results.
Optionally, the result of simulating the transaction includes at least a hash value and a read-write set of the transaction proposal;
endorsement of the results of the simulated transaction to form an endorsement result comprises:
the first node digitally signs the result of the simulated transaction using a private key to form an endorsement result; the endorsement result at least comprises a hash value, a read-write set and a digital signature of the first node of the transaction proposal.
Optionally, if it is detected that the current state does not satisfy the endorsement condition, stopping endorsement of the transaction proposal;
and sending the message of endorsement failure to the transaction end.
Optionally, the first node sends the endorsement result to the transaction end, so that the transaction end sends the transaction proposal and the endorsement result to a second node of the block chain after verifying that the endorsement result meets the endorsement policy of the block chain, and the transaction proposal and the endorsement result are sorted and packaged by the second node to form a block;
receiving a block broadcast by a second node;
the block is stored.
In order to solve the above technical problem, another technical solution adopted by the present application is: an electronic device is provided that includes a processor, a memory, and communication circuitry; the processor is respectively coupled with the memory and the communication circuit. The communication circuit is used for the electronic equipment to communicate with the transaction end; the memory is used for storing program instructions; the processor is used for executing program instructions to realize the transaction processing method of the blockchain.
In order to solve the above technical problem, the present application adopts another technical solution: a storage medium is provided for storing program instructions executable by a processor to implement the above blockchain transaction processing method.
The beneficial effect of this application is:
according to the method and the device, endorsement is carried out on the transaction proposal of the transaction end to be linked through the block chain link point pair, the reliability of the transaction proposal can be effectively improved, whether the node meets the endorsement condition or not through detecting the current state before endorsement, the node meeting the endorsement condition can be automatically screened for endorsement, the calculation loss of the node in a block chain system is effectively reduced, the accuracy and the reliability of an endorsement result are improved, and more accurate endorsement is realized.
Drawings
FIG. 1 is a block chain system according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating a first embodiment of a transaction processing method for a blockchain according to the present application;
FIG. 3 is a schematic flow chart diagram illustrating a second embodiment of a transaction processing method for a blockchain according to the present application;
FIG. 4 is a schematic flow chart diagram illustrating a third embodiment of a transaction processing method for a blockchain according to the present application;
FIG. 5 is a schematic flow chart diagram illustrating a fourth embodiment of a transaction processing method for a blockchain according to the present application;
FIG. 6 is a partial flow diagram of an embodiment of a block chain transaction processing method of the present application;
FIG. 7 is a schematic diagram of an embodiment of an electronic device of the present application;
FIG. 8 is a schematic structural diagram of an embodiment of a storage medium according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The inventors of the present application have found, through long-term research: when the block chain platform carries out endorsement on a transaction, because the node which is offline, failed, invalid or unwilling to participate in endorsement cannot be automatically identified and eliminated, the reliability of the endorsement result is easily reduced, while the untrusted endorsement also causes redundant calculation loss of the node, the time for a transaction party to wait for obtaining the endorsement result is easily prolonged, and the transaction efficiency is reduced. To solve these problems, the present application proposes at least the following embodiments.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of the present invention. The blockchain system 10 in this embodiment at least includes a transaction end 11, a first node 12 and a second node 13. The transaction terminal 11 is a device for enabling a user participating in a transaction in the blockchain network to perform information interaction with the blockchain system 10. The transaction end 11 may receive information of a transaction initiated by a user and form a transaction proposal, and send the transaction proposal to the first node 12 in the blockchain system 10 for endorsement. The transaction end 11 is, for example, a computer, a tablet, a mobile phone, and the like, and can participate in a transaction of the blockchain network by running a corresponding application program. The transaction end 11 may also be a node in the blockchain system 10, and may participate in functions of blockchain transaction, communication, accounting, storage, and the like. The transaction end 11 is, for example, a lightweight node in the blockchain system 10, and can participate in transactions in the blockchain and store self-related blockchain data, without storing a complete blockchain ledger book, so that the transaction efficiency of the transaction end 11 can be effectively improved. The transaction end 11 may also join an organization in the blockchain system 10 to participate in intra-organization or inter-organization transactions. As shown in fig. 1, the transaction end 11 is added to the organization of the blockchain system 10, so that the blockchain system 10 can manage the transaction end 11 conveniently, and the security of the transaction in the blockchain system 10 can be maintained.
In the present embodiment, the blockchain system 10 includes at least one first node 12, and the first node 12 is configured to receive the transaction proposal from the transaction terminal 11 and endorse the transaction proposal. Each first node 12 may bind a corresponding endorsement policy and endorse the transaction proposal according to the rules of the endorsement policy. The first nodes 12 may participate in an organization in the blockchain system 10, each organization including at least one first node 12, the first nodes 12 collectively participating in endorsement of a proposal for a transaction. Alternatively, the first node 12 may be dynamically converted to an endorsement node, an accounting node or a master node. For example, when the transaction end 11 sends a transaction proposal to the first node 12 for endorsement, the requested first node 12 endorses the transaction proposal as an endorsement node, and other nodes in the blockchain system 10 may participate in verification and accounting of the transaction proposal as ordinary accounting nodes. The first node 12 may also include certain nodes in the organization, such as management nodes, which have high credibility, stable operation and high calculation power and can provide credible endorsements for the transaction proposal.
The blockchain system 10 further includes a plurality of second nodes 13, and the second nodes 13 are configured to sort and pack the endorsed transaction proposals into blocks. For example, the second node 13 may receive the transaction proposal and the corresponding endorsement result sent by the transaction terminal 11, and sequence and package the transaction proposal and the endorsement result to store the transaction proposal in an uplink. The second node 13 may participate in the organization of the blockchain system, each organization having a respective ordering node. Alternatively, the second nodes 13 may also be managed in a centralized manner, as shown in fig. 1, the second nodes 13 may form an organization individually, which is convenient for management and is beneficial to improving the efficiency of sorting and packaging.
In some embodiments, the blockchain system 10 further includes a CA node, configured to receive an identity registration request from the transaction end 11, and return a registration password for user login and generate an identity certificate when the identity information of the transaction end 11 is verified to meet a specification. The CA node may further store the identity information of the transaction end 11 that has completed registration, and broadcast the identity information of the transaction end 11 into the blockchain network, so that other nodes may acquire the identity information of the transaction end 11 to verify the identity of the transaction end 11 each time the transaction end 11 participates in a transaction.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a transaction processing method of a blockchain according to the present application. The embodiment comprises the following steps:
s101: the first node receives a transaction proposal from a transaction end.
The transaction proposal at the transaction end includes, for example, identity information of parties involved in the transaction, transaction value, transaction type, and other related transaction information. And after the transaction end creates a transaction proposal, the transaction proposal is sent to the first node. The first node receiving the transaction proposal is converted into an endorsement node, and the endorsement is carried out on the received transaction proposal.
In this embodiment, the plurality of first nodes may receive the transaction proposal of the transaction end respectively. For example, the transaction end selects the first nodes needing endorsement, and sends the transaction proposals to the first nodes respectively. Or after a certain first node receives a transaction proposal of a transaction end, the transaction proposal can also be sent to other first nodes for endorsement.
In some embodiments, the first node may also be a block link point required by the endorsement policy corresponding to the transaction proposal. For example, before the transaction end sends the transaction proposal to the first node in the blockchain system, the endorsement policy corresponding to the transaction proposal may be predetermined. When the transaction endorsement is carried out, the transaction proposal can be sent to the first node required by the endorsement strategy, so that more accurate endorsement is realized.
S102: and detecting whether the current state meets an endorsement condition.
After receiving a transaction proposal of a transaction end, the first node can detect whether the current state meets an endorsement condition. The endorsement condition refers to a condition that the first node can correctly endorse, for example, the first node can participate in endorsement, runs normally, has sufficient computing power and cloud resources, and the like. The first node can confirm whether the transaction proposal can be endorsed correctly by detecting whether the current state meets the endorsement condition.
In some embodiments, detecting whether the current state satisfies the endorsement condition may further include: and detecting whether the first node is offline, down, network delay, insufficient resources or gives up endorsements. And if the first node is detected to have no conditions of off-line, downtime, network delay, insufficient resources or endorsement abandoning, determining that the endorsement condition is met.
In some embodiments, the first node may also monitor the resource usage of the first node at the cloud end at any time by running the operation and maintenance management service of the corresponding block chain, and when detecting that an abnormal situation such as offline, downtime, network delay, or an abnormal event such as the cloud end resource usage of the first node has reached an upper limit or a cloud resource lease is due, the first node automatically exits from the block chain system and stops the services such as related endorsements or bookings without affecting the normal operation of the block chain, so that the transaction security and the billing efficiency of the block chain system can be effectively improved.
In this embodiment, if the first node detects that the current state satisfies the endorsement condition, the following step S103 is executed. In some embodiments, if it is detected that the current state does not satisfy the endorsement condition, the endorsement may be stopped, for example, the following steps S104 to S105 are performed.
Before endorsement is carried out on a transaction proposal, the first node detects whether the endorsement condition is met or not in advance, and can give up participating in endorsement when the endorsement condition is not met, so that the calculation loss of the nodes in a block chain system can be effectively reduced, endorsement can be carried out on the nodes meeting the endorsement condition by screening, the accuracy and the reliability of endorsement results are effectively improved, and more accurate endorsement is realized.
S103: endorsement of the transaction proposal to form an endorsement result.
In this embodiment, when the first node detects that the current state satisfies the endorsement condition, the transaction proposal may be endorsed and an endorsement result may be formed. The first node endorses the transaction proposal, for example, including verifying the legitimacy and declaring of the transaction proposal. The validity of the transaction proposal verified by the first node is, for example, the validity of the identities of the transaction parties, the validity and feasibility of the transaction content, and the like. And the first node carries out endorsement after verifying that the transaction proposal is legal and forms an endorsement result. In the embodiment, the first node endorses the transaction proposal of the transaction end to be linked, so that the reliability of the transaction proposal can be effectively improved.
In some embodiments, S103 may further include: executing a block chain intelligent contract to simulate a transaction proposal; endorsements are made to the results of the simulated transactions to form endorsement results.
When the first node endorses the transaction proposal, the first node can determine the intelligent contract called by the transaction proposal and simulate the transaction of the transaction proposal by executing the intelligent contract. For example, the first node may obtain the transaction parameters in the transaction proposal, invoke the corresponding smart contract and populate the transaction parameters to perform the simulated transaction. The result of the simulated transaction includes at least a hash value and a read-write set of the transaction proposal. The first node simulates the transaction proposal by calling the intelligent contract, so that the feasibility of the transaction proposal can be verified. For some invalid transaction proposals, the first node can refuse to endorse the invalid transaction proposals so as to improve the reliability of the transactions in the blockchain system.
And after the first node carries out the simulated transaction, carrying out endorsement on the result of the simulated transaction and forming an endorsement result. Endorsement of the result of the simulated transaction by the first node includes, for example: the first node digitally signs the result of the simulated transaction using the private key to form an endorsement result.
In this embodiment, the first node may call a transaction endorsement policy verification function (EVCC) to endorse the result of the simulated transaction, that is, endorse the transaction proposal by signing the result of the simulated transaction. For example, after the first node performs the simulated transaction, verifies that the result of the simulated transaction is feasible, and decides to endorse the result of the simulated transaction, the result of the simulated transaction may be digitally signed using the private key to form an endorsement result. The endorsement result at least comprises a hash value, a read-write set and a digital signature of the transaction proposal.
In some embodiments, if the result of the verification of the simulated transaction is invalid after the first node performs the simulated transaction, the steps S104 to S105 may be further performed.
S104: the endorsement of the transaction proposal is stopped.
When the first node detects that the current state does not meet the endorsement condition or the result of the verification simulation transaction is invalid, the first node can stop endorseing the transaction proposal so as to reduce redundant calculation amount and improve the reliability of the transaction proposal.
S105: and sending the message of endorsement failure to the transaction end.
The first node can also send the message of endorsement failure to the transaction end. For example, when detecting that the current state does not satisfy the endorsement condition, the first node may send an endorsement failure message to the transaction end in time. The endorsement failure message may include a specific reason for the endorsement failure, for example, a network delay of the first node, a cloud resource usage reaching an upper limit, a rejection of the endorsement, and the like. The first node sends the endorsement failure message to the transaction end, so that the transaction end can initiate an endorsement request to other nodes again after receiving the endorsement failure message, and the endorsement time is saved.
The first node can also send the message of endorsement failure to the transaction end when the result of the simulated transaction is verified to be invalid. The endorsement failure message can also comprise a result of the simulated transaction, so that the transaction end can know the reason of the endorsement failure and quickly check the errors of the transaction proposal when receiving the endorsement failure message so as to resubmit the correct transaction proposal.
According to the method, the reliability of the transaction proposal can be effectively improved by endorsing the transaction proposal of the transaction end to be linked through the block chain link point, whether the first node meets the endorsing condition or not through detecting the current state before endorsing is carried out by the first node, the first node meeting the endorsing condition can be automatically screened for endorsing, the calculation loss of the nodes in the block chain system is effectively reduced, the accuracy and the reliability of endorsing results are improved, and more accurate endorsing is realized.
In the present embodiment, the sequence of steps S101 to S105 is the description sequence in the present embodiment, and is not limited to the sequence of the method in the execution process of the present embodiment. Some steps may be permuted, provided that the method can be implemented.
Referring to fig. 3, fig. 3 is a schematic flow chart of a transaction processing method of the blockchain according to a second embodiment of the present invention. This embodiment is further described on the basis of the first embodiment of the transaction processing method of the blockchain of the present application, and the steps of this embodiment that are the same as those of the first embodiment of the transaction processing method of the blockchain of the present application are not described herein again. The embodiment comprises the following steps:
s201: the first node receives a transaction proposal from a transaction end.
S202: and detecting whether the current state meets an endorsement condition.
In this embodiment, if it is detected that the current state satisfies the endorsement condition, the following steps S203 to S204 or S205 may be performed.
In some embodiments, if it is detected that the current status does not satisfy the endorsement condition, the following steps S207 to S208 may be further performed.
S203: and acquiring signature information of a transaction end in a transaction proposal.
In this embodiment, before endorsing the transaction proposal to form an endorsing result, the first node may further obtain signature information of the transaction end in the transaction proposal for verification. For example, after receiving the transaction proposal, the first node may analyze the signature information of the transaction end in the transaction proposal. The signature information is, for example, a digital signature obtained by the transaction end using its own private key for signature, and can be verified by a corresponding public key. Alternatively, the signature information may also include an MSP (membership service provider) identifier of the transaction end, and the identity of the transaction end may be verified by querying the corresponding MSP identifier.
S204: and verifying whether the signature information is valid.
The first node verifies whether the signature information is valid, for example, by inquiring the identity information of the transaction end stored in the blockchain system, the first node matches with the signature information of the transaction end in the transaction proposal, and if the matching is successful, the first node verifies that the signature information is valid; and if the matching fails, verifying that the signature information is invalid. In some embodiments, the transaction end participates in the organization of the blockchain system, the signature information of the transaction end may further include an MSP identifier, and the first node may verify the identity of the transaction end and the organization information where the transaction end is located by querying the corresponding MSP identifier in the blockchain system. The first node can determine whether the source of the transaction proposal is legal by verifying whether the signature information is valid.
In this embodiment, if the first node verifies that the signature information of the transaction proposal is valid, the step S205 or S206 may be executed. In some embodiments, if the verification signature information is invalid, the steps S207 to S208 may be further performed.
The first node endorses the transaction proposal when verifying that the source of the transaction proposal is legal, so that the reliability and the safety of the transaction can be effectively improved. For the transaction proposal with illegal source, the first node can refuse to endorse, thereby effectively reducing redundant computing power loss caused by some malicious transaction proposals.
S205: and verifying whether the transaction proposal meets the preset transaction condition.
In this embodiment, before the first node endorses the transaction proposal to form an endorsement result, it may also verify whether the transaction proposal meets a preset transaction condition. The preset transaction condition includes, for example, at least one of a correct format, a write right, and no duplicate submissions.
The format of the transaction proposal is correct, for example, the related transaction information including transaction parameters, transaction types and the like meets the preset format requirement. The transaction proposal has write permission, for example, the transaction proposal satisfies the transaction rule of the current blockchain network and can be stored in the current blockchain ledger. The non-repeat submission of the transaction proposal may include, for example, the transaction proposal not repeatedly applying for endorsements from the current first node for a predetermined period of time. The first node may determine whether the contents of the transaction proposal are legal by verifying whether the transaction proposal satisfies a preset transaction condition.
In this embodiment, if the first node verifies that the transaction proposal satisfies the preset transaction condition, the step S206 may be executed. In some embodiments, if the verification signature information is invalid, the steps S207 to S208 may be further performed.
The first node endorses the transaction proposal when verifying that the transaction proposal meets the preset transaction conditions, so that the reliability and the safety of the transaction can be effectively improved. For the transaction proposal which does not meet the preset transaction condition, the first node can refuse to endorse the transaction proposal so as to reduce redundant computing power loss.
S206: endorsement of the transaction proposal to form an endorsement result.
In some embodiments, if the first node detects that the current state does not satisfy the endorsement condition, or verifies that the signature information of the transaction end is invalid, or verifies that the transaction proposal does not satisfy the preset transaction condition, the following steps S207 to S208 may be further performed.
S207: the endorsement of the transaction proposal is stopped.
S208: and sending the message of endorsement failure to the transaction end.
In this embodiment, the endorsement failure message may further include a specific reason for the endorsement failure, for example, verifying that signature information of the transaction end in the transaction proposal is invalid; or the transaction proposal is verified not to be in accordance with the preset transaction condition. Therefore, the transaction end can check the errors of the transaction proposal in time, so as to resubmit the correct transaction proposal.
In the embodiment, the first node can automatically screen the first node meeting the endorsement condition for endorsement by detecting whether the current state meets the endorsement condition before endorsement, so that the accuracy and the reliability of the endorsement result are improved, and more accurate endorsement is realized; before endorsement is carried out on the transaction proposal, the first node can determine whether the source of the transaction proposal is legal or not by verifying the signature information of the transaction end in the transaction proposal, and can also verify whether the transaction proposal meets the preset transaction conditions or not before endorsement so as to determine the legality of the content of the transaction proposal, thereby effectively improving the reliability and the safety of the transaction; for the transaction proposal that the signature information is invalid or does not meet the preset transaction condition, the first node can refuse to endorse the transaction proposal, thereby effectively reducing the redundant computing power loss.
In the present embodiment, the sequence of steps S201 to S208 is the description sequence in the present embodiment, and is not limited to the sequence of the method in the execution process of the present embodiment. Some steps may be performed in reverse order or simultaneously, provided that the method can be implemented. For example, the steps S202, S203 to S204, and S205 may be partially or completely executed, and may be executed separately in any order or simultaneously without affecting the implementation of the method.
Referring to fig. 4, fig. 4 is a schematic flow chart of a transaction processing method of the blockchain according to the third embodiment of the present invention. This embodiment is further described on the basis of the first embodiment of the transaction processing method of the blockchain of the present application, and the steps of this embodiment that are the same as those of the first embodiment of the transaction processing method of the blockchain of the present application are not described herein again. The embodiment comprises the following steps:
s301: the first node receives a transaction proposal from a transaction end.
S302: and detecting whether the current state meets an endorsement condition.
In this embodiment, if it is detected that the current status satisfies the endorsement condition, the following step S303 is performed.
In some embodiments, if it is detected that the current status does not satisfy the endorsement condition, the following steps S307 to S308 may be further performed.
S303: endorsement of the transaction proposal to form an endorsement result.
S304: and sending the endorsement result to a transaction end.
In this embodiment, after the first node endorses the transaction proposal to form an endorsement result, the endorsement result may be sent to the transaction end, so that the transaction end sends the transaction proposal and the endorsement result to the second node of the block chain after verifying that the endorsement result satisfies the endorsement policy, and the second node sorts and packages the transaction proposal and the endorsement result to form a block.
After the transaction end receives the endorsement result, whether the endorsement result meets the endorsement strategy can be verified. For example, verifying that the endorsement result satisfies the endorsement policy may include: verifying whether the digital signature of the corresponding first node in the endorsement result is correct, verifying whether the number of effective endorsement results meets the number required by the endorsement policy, and verifying whether the effective endorsement results meet the endorsement results comprising the organization specified by the endorsement policy and/or the first node. When the transaction end verifies that the endorsement result meets the endorsement strategy, the conclusion that the transaction proposal is endorsed correctly can be obtained. And after confirming that the transaction proposal is correctly endorsed, the transaction end sends the transaction proposal and the corresponding endorsement result to the second node for uplink storage.
In this embodiment, the second node may be a sorting node, and sorts and packages the transaction proposal and endorsement result to form a block. The second node can also verify the legality of the transaction proposal and the corresponding endorsement result before packaging, and sort and package the transaction proposal and the endorsement result when the transaction proposal and the endorsement result are verified to be correct. The second node packs and links the transaction proposal and endorsement result at the same time, thereby effectively ensuring the traceability of the transaction proposal endorsement and improving the security and reliability of the transaction.
S305: blocks broadcast by the second node are received.
In this embodiment, the first node may be dynamically converted to an endorsement node and an accounting node. And the second node packs the transaction proposal and the endorsement result into a block and broadcasts the block to other nodes in the block chain system. The first node may receive the block broadcast by the second node, and at this point, the first node may transition to an accounting node, and may verify the data in the block for pre-storage checking.
S306: the block is stored.
In this embodiment, the first node may store the complete blockchain ledger. The first node may store the block as it is received from the second node. Optionally, before the first node stores the block, the first node may also verify data in the block, and add the block to the end of the block chain if verification is correct, so as to effectively reduce loss caused by invalid or malicious transaction proposals and improve the security and reliability of the block chain account book.
S307: the endorsement of the transaction proposal is stopped.
In this embodiment, if the first node detects that the current state does not satisfy the endorsement condition, the endorsement of the transaction proposal may be stopped, so as to reduce the redundant computation power loss.
S308: and sending the message of endorsement failure to the transaction end.
In this embodiment, after stopping endorsement, the first node may further send an endorsement failure message to the transaction end, so that the transaction end may request endorsement from other first nodes in time, thereby avoiding low transaction efficiency caused by time delay.
This embodiment treats the transaction proposal of the transaction end of cochain and carries out endorsement through first node, can effectively promote the reliability of transaction proposal, first node is through detecting whether the current state satisfies the endorsement condition before the endorsement, the first node that can the autofilter satisfies the endorsement condition carries out the endorsement, effectively reduce the power consumption of node in the block chain system, and promote the degree of accuracy and the credibility of endorsement result, realize more accurately endorsement, it packs cochain with the transaction proposal and endorsement result simultaneously in this embodiment, can effectively guarantee the traceability of transaction proposal endorsement, improve the security and the reliability of transaction.
In this embodiment, the sequence of steps S301 to S308 is the description sequence in this embodiment, and is not limited to the sequence of the method in the execution process of this embodiment. Some steps may be performed in reverse order or simultaneously, provided that the method can be implemented.
Referring to fig. 5, fig. 5 is a schematic flow chart of a transaction processing method of the blockchain according to the fourth embodiment of the present invention. The present embodiment takes the blockchain system as an execution subject, which is further described on the basis of the first to third embodiments of the transaction processing method of the blockchain of the present application, and the steps of the present embodiment that are the same as the first to third embodiments of the transaction processing method of the blockchain of the present application are not repeated herein. The embodiment comprises the following steps:
s401: the transaction end sends a transaction proposal to the first node.
In this embodiment, the transaction end may receive information of a transaction initiated by a user and form a transaction proposal. And after the transaction end creates a transaction proposal, the transaction proposal is sent to the first node. The first node receiving the transaction proposal is converted into an endorsement node, and the endorsement is carried out on the received transaction proposal.
In some embodiments, the transaction end may determine the endorsement policy corresponding to the transaction proposal in advance before sending the transaction proposal to the first node in the blockchain system. When the transaction endorsement is carried out, the transaction proposal can be sent to the first node required by the endorsement strategy, so that more accurate endorsement is realized. For example, at least one endorsement policy is included in the blockchain network. After a transaction proposal is created, the transaction end determines an intelligent contract called by the transaction proposal, and determines an endorsement policy corresponding to the transaction proposal from at least one endorsement policy of the block chain based on the intelligent contract. And the transaction end sends the transaction proposal to a first node required by the endorsement policy for endorsement.
S402: the first node detects whether the current state meets an endorsement condition.
In this embodiment, after receiving the transaction proposal of the transaction end, the first node may first detect whether the current state meets the endorsement condition. Examples include: and detecting whether the first node is offline, down, network delay, insufficient resources or gives up endorsements and the like, and if the first node does not have the conditions, determining that the endorsement condition is met.
In this embodiment, if the first node detects that the current state satisfies the endorsement condition, the following step S403 may be performed. If the first node detects that the current state does not meet the endorsement condition, the endorsement can also be stopped, and a message (not shown) of transaction failure is sent to the transaction end.
S403: the first node verifies whether the signature information of the transaction end in the transaction proposal is valid.
In this embodiment, if the first node verifies that the signature information of the transaction proposal is valid, the following step S404 may be executed. In some embodiments, if the verification signature information is invalid, the endorsement may also be stopped, and a transaction failure message (not shown) may be sent to the transaction end.
S404: the first node verifies whether the transaction proposal meets preset transaction conditions.
In this embodiment, if the first node verifies that the transaction proposal does not satisfy the preset transaction condition, the following step S405 may be executed. In some embodiments, if the verification signature information is invalid, the endorsement may also be stopped, and a transaction failure message (not shown) may be sent to the transaction end.
S405: the first node endorses the transaction proposal to form an endorsement result.
S406: and the first node sends the endorsement result to the transaction end.
S407: and the transaction end verifies whether the endorsement result meets the endorsement strategy.
After the transaction end receives the endorsement result, whether the endorsement result meets the endorsement strategy can be verified. For example, verifying that the endorsement result satisfies the endorsement policy may include: verifying whether the digital signature of the corresponding first node in the endorsement result is correct, verifying whether the number of effective endorsement results meets the number required by the endorsement policy, and verifying whether the effective endorsement results meet the endorsement results comprising the organization specified by the endorsement policy and/or the first node. When the transaction end verifies that the endorsement result meets the endorsement strategy, the conclusion that the transaction proposal is endorsed correctly can be obtained.
In some embodiments, the endorsement policy comprises at least one sub-policy. The transaction end verifying whether the endorsement result meets the endorsement policy can further comprise: verifying whether the endorsement result meets a preset number of sub-strategies; and if so, determining that the endorsement policy is satisfied. The preset number may be one or more. The preset number may also be the number of all sub-policies in the endorsement policy. The sub-strategies may include rules related to validity, number, organization, preset nodes and the like of endorsement results. For example, as shown in fig. 6, verifying whether the endorsement result satisfies the sub-policy may further include the steps of:
s4071: verifying whether the endorsement result is from the first node.
In this embodiment, after receiving the endorsement result, the transaction end may verify whether the endorsement result is from the first node required by the endorsement policy, that is, whether the endorsement result is sent by the first node. For example, the transaction end may confirm whether the endorsement result is from the first node by verifying the identity information of the blockchain node sending the endorsement result. The transaction end can receive endorsement results from the block chain nodes and verify the endorsement results respectively.
In some embodiments, it may also be verified whether the endorsement result is from the first node by verifying the identifying information of the blockchain node. For example, verifying whether the endorsement result is from the first node may comprise: acquiring identification information of block link points corresponding to endorsement results; verifying whether the identification information matches the identity information of the first node; and if so, determining that the endorsement result comes from the first node. If the verification identification information does not match the identity information of the first node, the endorsement result is determined not to come from the first node, and the transaction end can discard the endorsement result.
The identification information of the blockchain node may be used to identify each node in the blockchain system. In some embodiments, the first node may also be a blockchain node in the organization of the blockchain system. Each organization of the blockchain system has a respective MSP (Membership Service Provider) identifier, and each blockchain node in the organization has an identity certificate issued by the management node in the organization. When verifying whether the endorsement result comes from the first node, the transaction end can verify whether the MSP identifier of the block chain node sending the endorsement result meets the endorsement strategy; if so, further verifying whether the identity certificate of the block chain node is correct; and if the result is correct, determining that the source of the endorsement result is legal. If the MSP identification does not meet the endorsement policy or the identity certificate is incorrect through verification at the transaction end, the endorsement node is determined not to be from the first node, and the endorsement result can be discarded. The transaction end can more quickly verify the source of the transaction result by utilizing the MSP identification and the identity certificate, and the accuracy of the verification result can be improved.
In this embodiment, if the transaction side verifies that the endorsement result is from the first node, step S4072 may be executed. In some embodiments, if the transaction-side verifies that the endorsement result is not from the first node, it may be determined that the endorsement result does not satisfy the endorsement policy, and the endorsement result may be discarded.
In some embodiments, the blockchain system may have some blockchain nodes that steal information of the first node to maliciously imitate endorsement results, which may cause the endorsement results to be unreliable and affect the execution of blockchain transactions. After the transaction end verifies that the endorsement result comes from the first node, the transaction end can further verify the digital signature in the endorsement result.
S4072: and verifying whether the digital signature of the endorsement result is correct.
In the embodiment, the first node carries out the simulated transaction by calling the intelligent contract, and carries out digital signature on the result of the simulated transaction to form the endorsement result. The transaction end can further verify the source of the transaction result by verifying the digital signature in the endorsement result. For example, after receiving the endorsement result, the transaction end analyzes the endorsement result to obtain a digital signature in the endorsement result, and verifies the endorsement result by using the public key of the first node; if the verification is correct, the digital signature is correct; if the verification fails, the digital signature is incorrect. The transaction end can receive endorsement results from the block chain nodes, and the transaction end can verify the digital signatures of the endorsement results respectively.
In this embodiment, if the digital signature of the endorsement result verified by the transaction end is correct, that is, the endorsement result is determined to be a valid endorsement result, the verification endorsement result satisfies the sub-policy. And if the digital signature of the endorsement verification result at the transaction end is incorrect, the endorsement verification result does not meet the sub-strategy, and the endorsement result is invalid. In some embodiments, the transaction end may wait to collect more valid endorsement results after verifying that the digital signature of the endorsement result is correct.
In the embodiment, the transaction end can quickly confirm the validity of the endorsement result by verifying whether the endorsement result comes from the first node and verifying whether the digital signature of the endorsement result is correct. The transaction end can keep the effective endorsement result and discard the invalid endorsement result, so that the credibility of the endorsement result can be effectively ensured, and the condition that the incredible endorsement result influences the block chain transaction is avoided.
S4073: and verifying whether the number of endorsement results meets the sub-policy.
In this embodiment, the receiving, by the transaction end, the endorsement result of the first node may include: endorsement results from at least one first node are collected. And the endorsement results of the first node collected by the transaction end are effective endorsement results. The transaction end can verify the validity of the endorsement result when receiving the endorsement result every time, abandon the invalid endorsement result, and collect the valid endorsement result, so that the safety and the reliability of the endorsement result can be effectively improved. The effective endorsement result may be the effective endorsement result determined in the steps S4071 to S4072 described above.
In this embodiment, the sub-policy includes a requirement for the number of endorsement results, such as requiring at least one valid endorsement result. And after the transaction end collects the endorsement results of the first node, verifying whether the number of the endorsement results meets the sub-strategy, and if so, determining that the endorsement results meet the sub-strategy. By collecting endorsement results meeting the quantity required by the sub-strategies, the credibility of transaction endorsement can be effectively improved. In some embodiments, the transaction end may count the endorsement results received from the first node, and may stop receiving the endorsement results when a number of endorsement results satisfying the sub-policy requirement are collected. The transaction end can also send a message of stopping endorsement to the first node when stopping receiving the endorsement result so as to reduce the computational power loss of the first node.
S4074: verifying whether the endorsement result satisfies the endorsement result of the first node in the organization at least comprising the requirements of the sub-policy.
In this embodiment, the blockchain system may include one or more organizations, and the sub-policy may require that the endorsement result come from at least one organization. For example, sub-policy I requires that the endorsement results include at least the endorsement results for the first node in organizations Org1, Org2, and Org 3; sub-policy ii requires that the endorsement results include at least the endorsement results for the first node in the organizations Org1, Org2 and Org 4. In the blockchain system according to the present embodiment, a plurality of organizations may be provided, and the first nodes of the plurality of organizations endorse the transaction proposal, thereby effectively improving the reliability of the transaction endorsement and reducing the possibility of joint cooperation between nodes in a certain organization.
The transaction end can determine the first node of which organization the endorsement result comes from by acquiring the digital signature of the endorsement result or the identification information of the first node and the like. The transaction end can classify and process the received endorsement results according to the organization so as to verify the endorsement results.
In this embodiment, if the transaction side verifies that the endorsement result satisfies the endorsement result of the first node in the organization at least including the requirement of the sub-policy, the step of S4075 may be continuously performed. In some embodiments, if the transaction-side verification endorsement result does not satisfy the endorsement result of the first node in the organization at least including the endorsement result required by the sub-policy, the transaction-side verification endorsement result may further continue to collect the endorsement result of the first node, or a warning message may be sent to the first node that does not send the endorsement result to remind the first node of performing the endorsement in time.
In some embodiments, the verifying whether the endorsement result satisfies the sub-policy by the transaction terminal may further include: verifying whether the endorsement result meets the number of endorsement results of the first node of each organization required by the sub-policy. For example, the sub-policy i requires that the endorsement result at least includes an endorsement result of 5 first nodes of Org1, an endorsement result of 3 first nodes of Org2, and an endorsement result of 4 first nodes of Org3, and when verifying that the endorsement result satisfies the sub-policy, the transaction end also verifies whether the endorsement results include the endorsement results required by the sub-policy. The block chain system can individually customize the sub-strategies according to the calculation power of the first node of each organization, the type of the transaction proposal, the requirements of the transaction party and the like, more fits the actual transaction requirements, and is beneficial to improving the credibility of the transaction endorsement and the efficiency of the block chain transaction.
S4075: and verifying whether the endorsement result meets the endorsement result at least comprising a preset first node in the organization.
In this embodiment, the sub-policy may further include selection of a blockchain node for endorsement. After the transaction end verifies that the endorsement result meets the endorsement result at least comprising the first node in the organization required by the sub-policy, whether the endorsement result meets the endorsement result at least comprising the preset first node in the organization can be further verified. For example, the sub-policy i may further require that the endorsement result at least includes an endorsement result of a preset first node Admin1 in the organization Org 1; sub-strategy II requires that the endorsement results at least comprise endorsement results of a preset first node Admin4 in organization Org 4.
The preset first nodes are, for example, some block chain nodes which are stable in operation, high in calculation power and high in reputation in the organization. For example, it is preset that the first node is a management node in an organization, and the management node participates in managing the joining, running, exiting and the like of other blockchain nodes in the organization. The endorsement result formed by the endorsement of the transaction proposal by the preset first node usually has higher reliability, and is beneficial to improving the reliability of the transaction endorsement. The transaction end can determine which organization the endorsement result comes from by acquiring identification information, such as MSP (mixed-service provider) identification, of a first node corresponding to the endorsement result, and then verify whether the endorsement result comes from the preset first node in the organization or not by acquiring a digital signature of the endorsement result.
In some embodiments, the transaction end may perform verification by any combination of conditions AND, OR, noutoff when verifying whether the endorsement policy satisfies the sub-policy. For example, AND ('Org 1. member', 'Org 2. member', 'Org 3. member') requires that the endorsement results include at least endorsement results that organize Org1, Org2, AND Org3, AND wherein each organization has an endorsement result of at least 1 first node. Also for example, OR ('Org 1. member', 'Org 2. member') requires that the endorsement results include at least endorsement results that organize at least 1 first node in Org1 OR Org2. As another example, OR ('Org 1. member', AND ('Org 2. member', 'Org 3. member')), requires that the endorsement results include at least an endorsement result of 1 first node that organizes Org1, OR at least 1 first node that organizes Org2 AND Org3, respectively. As another example, OR ('Org 1. admin', AND ('Org 2. member', 'Org 3. member')), requires that the endorsement results include at least an endorsement result of 1 preset first node that organizes Org1, OR at least an endorsement result of 1 first node that organizes Org2 AND Org3, respectively.
In this embodiment, if the transaction side verifies that the endorsement result satisfies the endorsement policy, the step S408 is executed. In some embodiments, if the endorsement verification result at the transaction end does not satisfy the endorsement policy, the transaction end may continue to wait for collecting the endorsement result of the first node, or may abandon the transaction proposal (not shown).
S408: and the transaction end sends the transaction proposal and the endorsement result to the second node.
In this embodiment, when the transaction end verifies that the endorsement result satisfies the endorsement policy, that is, after the transaction end confirms that the transaction proposal is correctly endorsed, the transaction end sends the transaction proposal and the endorsement result to the second node for distributed storage.
S409: and the second node sorts and packs the transaction proposal and endorsement result to form a block.
In this embodiment, the second node is, for example, a sorting node, and may sort and package the transaction proposal and endorsement result to form a block. The second node can also verify the legality of the transaction proposal and the corresponding endorsement result before packaging, and sort and package the transaction proposal and the endorsement result when the transaction proposal and the endorsement result are verified to be correct. The second node packs and links the transaction proposal and endorsement result at the same time, thereby effectively ensuring the traceability of the transaction proposal endorsement and improving the security and reliability of the transaction.
S410: the second node broadcasts the blocks for distributed storage.
And the second node packs the transaction proposal and the endorsement result into blocks and broadcasts the blocks to the accounting node in the block chain system, and the accounting node stores the blocks after verifying that the blocks are correct. In some embodiments, the first node may also participate in accounting, at which time the first node participates in the verification and storage of the block as an accounting node.
S411: and the first node receives the block and stores the block.
In the embodiment, the reliability of the transaction proposal can be effectively improved by endorsing the transaction proposal of the transaction end to be linked through the block chain link points, and the first node can automatically screen the first node meeting the endorsing condition for endorsing by detecting whether the current state meets the endorsing condition before endorsing, so that the accuracy and reliability of endorsing results are improved, and more accurate endorsing is realized; the first node can also verify whether the transaction proposal meets the preset transaction conditions before endorsement so as to determine the legality of the transaction proposal and effectively improve the reliability and safety of the transaction; for the transaction proposal that the signature information is invalid or does not meet the preset transaction condition, the first node can refuse to endorse the transaction proposal, thereby effectively reducing the redundant computing power loss; the second node packs and links the transaction proposal and endorsement result after correct endorsement at the same time, thereby effectively ensuring the traceability of the endorsement of the transaction proposal and improving the security and reliability of the transaction.
In the present embodiment, the sequence of steps S401 to S411 is the description sequence in the present embodiment, and is not limited to the sequence of the method in the execution process of the present embodiment. Some steps may be performed in reverse order or simultaneously, provided that the method can be implemented.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of an electronic device according to the present application. The electronic device 50 in this embodiment comprises a processor 51, a memory 52 and a communication circuit 53, wherein the processor 51 is coupled to the memory 52 and the communication circuit 53. The communication circuit 53 is used for the electronic device 50 to communicate with the transaction terminal. The memory 52 is used to store program instructions. The processor 51 is configured to execute the program instructions to implement at least the steps of the first to third embodiments of the block chain transaction processing method of the present application.
In this embodiment, the electronic device 50 is, for example, a computer, a tablet, a mobile phone, and the like. The electronic device 50 may also be a node in a blockchain network, and may participate in functions such as transaction, communication, accounting, or storage of the blockchain.
In the present embodiment, the processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having signal processing capabilities. The processor 51 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In this embodiment, for more execution processes and functions of the electronic device 50, reference may be made to the first to third embodiments of the block chain transaction processing method in the present application, which are not described herein again.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a storage medium according to the present application. The storage medium 60 in this embodiment is used for storing program instructions 61, and the program instructions 61 can be executed by the processor to implement the steps of the first to third embodiments of the block chain transaction processing method described above.
The method for processing transaction of blockchain according to the first to third embodiments of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of software functional units and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium 60 includes: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or other devices, such as a mobile terminal including a storage medium.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1.A blockchain transaction processing method, comprising:
a first node of the block chain receives a transaction proposal from a transaction end;
detecting whether the current state meets an endorsement condition;
and if so, endorsing the transaction proposal to form an endorsing result.
2. The method of claim 1,
the detecting whether the current state meets the endorsement condition comprises:
detecting whether the first node is offline, down, network delay, insufficient resources or gives up endorsements;
and if not, determining that the endorsement condition is met.
3. The method of claim 1,
before the endorsing the transaction proposal to form an endorsing result, the method further comprises:
acquiring signature information of the transaction end in the transaction proposal;
verifying whether the signature information is valid;
if yes, executing the step of endorsing the transaction proposal to form an endorsing result.
4. The method of claim 1,
before the endorsing the transaction proposal to form an endorsing result, the method further comprises:
verifying whether the transaction proposal meets preset transaction conditions; the preset transaction conditions comprise at least one of correct format, write-in authority and no repeated submission;
if so, executing the step of endorsing the transaction proposal to form an endorsing result.
5. The method of claim 1,
said endorsing said transaction proposal to form an endorsement result comprises:
executing a smart contract for the blockchain to simulate a transaction for the transaction proposal;
endorsement of the result of the simulated transaction to form the endorsement result.
6. The method of claim 5, wherein the result of the simulated transaction comprises at least a hash value and a read-write set of the transaction proposal;
said endorsing the result of said simulated transaction to form said endorsement result comprises:
the first node digitally signs the result of the simulated transaction using a private key to form the endorsement result; wherein the endorsement result at least comprises a hash value, a read-write set, and a digital signature of the first node of the transaction proposal.
7. The method of claim 1, further comprising:
if the current state is detected not to meet the endorsement condition, stopping endorsement of the transaction proposal;
and sending a message of endorsement failure to the transaction end.
8. The method of claim 1, further comprising:
the first node sends the endorsement result to the transaction end, so that the transaction end sends the transaction proposal and the endorsement result to a second node of the block chain after verifying that the endorsement result meets the endorsement policy of the block chain, and the transaction proposal and the endorsement result are sorted and packaged by the second node to form a block;
receiving the blocks broadcast by the second node;
and storing the block.
9. An electronic device comprising a processor, a memory, and communication circuitry, the processor coupling the memory and the communication circuitry;
the communication circuit is used for the electronic equipment to communicate with a transaction end;
the memory is to store program instructions;
the processor is used for executing the program instructions to realize the method of any one of claims 1 to 8.
10. A storage medium for program instructions executable by a processor to implement the method of any one of claims 1 to 8.
CN201911128683.8A 2019-11-18 2019-11-18 Transaction processing method of block chain, electronic device and storage medium Pending CN111046037A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911128683.8A CN111046037A (en) 2019-11-18 2019-11-18 Transaction processing method of block chain, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911128683.8A CN111046037A (en) 2019-11-18 2019-11-18 Transaction processing method of block chain, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN111046037A true CN111046037A (en) 2020-04-21

Family

ID=70232767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911128683.8A Pending CN111046037A (en) 2019-11-18 2019-11-18 Transaction processing method of block chain, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111046037A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598650A (en) * 2020-04-28 2020-08-28 深圳壹账通智能科技有限公司 Resource request transaction method based on block chain network and related device
CN111915325A (en) * 2020-06-24 2020-11-10 普华云创科技(北京)有限公司 Tracing method and system for block chain transaction information and computer readable storage medium
CN113379420A (en) * 2021-06-25 2021-09-10 远光软件股份有限公司 Block chain execution intelligent contract method, computer equipment and block chain system
CN113726525A (en) * 2021-09-09 2021-11-30 国网电子商务有限公司 Energy industry cloud network data tracing method and device
CN114463121A (en) * 2020-11-10 2022-05-10 中移物联网有限公司 Transaction information processing method and device based on block chain and electronic equipment
CN114531490A (en) * 2020-11-04 2022-05-24 中国移动通信有限公司研究院 Endorsement request processing method, block chain system and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493204A (en) * 2018-10-16 2019-03-19 平安科技(深圳)有限公司 Business bookkeeping methods and terminal device based on block chain
CN109767212A (en) * 2018-10-11 2019-05-17 平安科技(深圳)有限公司 Assets exchanging method, system, terminal and storage medium based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109767212A (en) * 2018-10-11 2019-05-17 平安科技(深圳)有限公司 Assets exchanging method, system, terminal and storage medium based on block chain
CN109493204A (en) * 2018-10-16 2019-03-19 平安科技(深圳)有限公司 Business bookkeeping methods and terminal device based on block chain

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598650A (en) * 2020-04-28 2020-08-28 深圳壹账通智能科技有限公司 Resource request transaction method based on block chain network and related device
CN111915325A (en) * 2020-06-24 2020-11-10 普华云创科技(北京)有限公司 Tracing method and system for block chain transaction information and computer readable storage medium
CN111915325B (en) * 2020-06-24 2024-04-26 云南花伍科技有限公司 Method, system and computer readable storage medium for tracing blockchain transaction information
CN114531490A (en) * 2020-11-04 2022-05-24 中国移动通信有限公司研究院 Endorsement request processing method, block chain system and electronic equipment
CN114463121A (en) * 2020-11-10 2022-05-10 中移物联网有限公司 Transaction information processing method and device based on block chain and electronic equipment
CN113379420A (en) * 2021-06-25 2021-09-10 远光软件股份有限公司 Block chain execution intelligent contract method, computer equipment and block chain system
CN113726525A (en) * 2021-09-09 2021-11-30 国网电子商务有限公司 Energy industry cloud network data tracing method and device

Similar Documents

Publication Publication Date Title
CN111046037A (en) Transaction processing method of block chain, electronic device and storage medium
CN111127005A (en) Transaction endorsement method for block chain, electronic device and storage medium
CN111427957B (en) Block chain voting information verification method, device, equipment and storage medium
CN112163856A (en) Consensus method and system for block chain and Internet of things fusion scene
CN111382456A (en) Proposal message processing method, device, equipment and storage medium
CN112632629B (en) Voting management method, device, medium and electronic equipment based on block chain
CN111523890A (en) Data processing method and device based on block chain, storage medium and equipment
CN112700251B (en) Identity confirmation method, device and system in financial scene
CN113326516A (en) Block chain consensus method, block chain system and computer equipment
CN112597240B (en) Federal learning data processing method and system based on alliance chain
CN111222174A (en) Joining method, verification method, device and storage medium of block chain node
CN111010282B (en) Block chain-based information processing method, related device and storage medium
WO2021233109A1 (en) Blockchain-based message processing method and apparatus, and device and storage medium
CN112700250B (en) Identity authentication method, device and system in financial scene
CN112087502A (en) Method, device and equipment for processing request and storage medium
WO2023116790A1 (en) Method and apparatus for executing computing task, and storage medium and electronic apparatus
CN115701078A (en) Cross-chain transaction processing method and device, electronic equipment and storage medium
CN112700327B (en) User confirmation method, device and system in financial scene
CN111210348B (en) Block chain transaction method, electronic device and storage medium
CN112037062B (en) Transaction consensus method, device, electronic equipment and readable storage medium
CN113806816A (en) Electronic file management method and device based on block chain and electronic equipment
CN115708119A (en) Cross-chain transaction system, method, device and storage medium
CN109213806A (en) Pollutant discharge of enterprise data processing method and system based on block chain
CN111222989B (en) Transaction method of multi-channel blockchain, electronic equipment and storage medium
WO2023098327A1 (en) Blockchain-based block processing method and apparatus, device, storage medium, and program product

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200421

RJ01 Rejection of invention patent application after publication