WO2023160086A1 - Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique - Google Patents

Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique Download PDF

Info

Publication number
WO2023160086A1
WO2023160086A1 PCT/CN2022/135403 CN2022135403W WO2023160086A1 WO 2023160086 A1 WO2023160086 A1 WO 2023160086A1 CN 2022135403 W CN2022135403 W CN 2022135403W WO 2023160086 A1 WO2023160086 A1 WO 2023160086A1
Authority
WO
WIPO (PCT)
Prior art keywords
consensus
transaction
round
node
execution
Prior art date
Application number
PCT/CN2022/135403
Other languages
English (en)
Chinese (zh)
Inventor
徐文博
林鹏
Original Assignee
蚂蚁区块链科技(上海)有限公司
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 蚂蚁区块链科技(上海)有限公司 filed Critical 蚂蚁区块链科技(上海)有限公司
Publication of WO2023160086A1 publication Critical patent/WO2023160086A1/fr

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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0633Workflow analysis
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Definitions

  • This document belongs to the field of block chain technology, and in particular relates to a block chain transaction processing method, block chain nodes and electronic equipment.
  • blockchain Due to its advantages of openness, non-tamperability, and decentralization, blockchain is increasingly favored by all walks of life.
  • the processing flow of blockchain transactions mainly includes four stages: transaction consensus, transaction execution, transaction execution confirmation, and transaction writing block.
  • these four stages are executed sequentially, that is to say, after the blockchain client initiates the transaction, the execution result of the transaction cannot be known immediately (the transaction needs to complete the consensus before being executed), which affects user experience.
  • the purpose of the embodiments of this specification is to provide a processing method of blockchain transactions, blockchain nodes and electronic equipment, which can improve the efficiency of confirmation of execution results of blockchain transactions.
  • a blockchain transaction processing method including:
  • the consensus node of the blockchain executes the transaction execution operation of the first transaction set in the Nth round of consensus proposals, where N is a positive integer;
  • the consensus node executes the consensus operation of the first transaction set in the N round consensus proposal
  • the consensus node After the execution of the transaction execution operation is completed, the consensus node initiates a transaction execution determination operation for the first transaction set;
  • the consensus node After the consensus node has reached a consensus on all the transaction sets proposed by the N-round consensus and completed the transaction execution confirmation operation, it performs a block writing operation on all the transaction sets proposed by the N-round consensus.
  • a block chain transaction processing device including:
  • the transaction consensus module executes the consensus operation of the first transaction set in the Nth round of consensus proposals, where N is a positive integer;
  • the transaction execution module executes the transaction execution operation of the first transaction set
  • the transaction execution confirmation module after the execution of the transaction execution operation is completed, initiates the transaction execution confirmation operation of the first transaction set;
  • the block writing module executes a block writing operation on all transaction sets proposed by the N-th round of consensus after reaching a consensus on all transaction sets proposed by the N-th round of consensus and completing the transaction confirmation operation.
  • an electronic device including: a memory, a processor, and a computer program stored on the memory and operable on the processor is proposed, and the computer program is executed by the processor:
  • a computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the The electronic device performs the following operations:
  • the consensus node of the blockchain can execute the transaction execution operation on the transaction in advance before completing the consensus operation of the transaction, and initiate the transaction execution confirmation operation after the transaction execution operation is completed, thereby improving the finalization of the transaction.
  • the confirmation efficiency is high, so that the client user can know the transaction execution result as soon as possible, which improves the user experience to a certain extent.
  • the advance confirmation of transaction execution will also execute the block writing operation earlier, which improves the transaction efficiency of the blockchain, thereby improving the business throughput of the blockchain, which is in line with the high concurrency of blockchain business in the future. development trend.
  • FIG. 1 is a schematic flowchart of a transaction processing method according to an embodiment of this specification.
  • FIG. 2 is a schematic flow diagram of a traditional PBFT protocol.
  • Fig. 3 is a schematic diagram of the first type of process for executing a PBFT protocol transaction on-chain in the transaction processing method of the embodiment of this specification.
  • FIG. 4 is a schematic diagram of a second flow chart of executing a PBFT protocol transaction on-chain in the transaction processing method of the embodiment of this specification.
  • Fig. 5 is a schematic diagram of a third flow chart of executing a PBFT protocol transaction on-chain in the transaction processing method according to the embodiment of this specification.
  • Fig. 6 is a schematic diagram of a fourth flow chart of executing a PBFT protocol transaction on-chain in the transaction processing method of the embodiment of this specification.
  • FIG. 7 is a schematic diagram of a fifth flow chart of executing a PBFT protocol transaction on-chain in the transaction processing method of the embodiment of this specification.
  • FIG. 8 is a schematic structural diagram of a blockchain node in an embodiment of this specification.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present specification.
  • the processing flow of blockchain transactions mainly includes four stages: transaction consensus, transaction execution, transaction execution confirmation, and transaction block writing.
  • these four stages are executed sequentially, that is to say, after the blockchain client initiates a transaction, the transaction must first complete the consensus before execution. In this way, the client cannot immediately know the execution result of the transaction, and this delay problem can be perceived by the client user. If the delay is serious, it will affect the user experience.
  • this document aims to propose a technical solution to improve the efficiency of confirmation of execution results of blockchain transactions.
  • Fig. 1 is a flow chart of a processing method of a blockchain transaction according to an embodiment of this specification. The method shown in Figure 1 can be executed by the corresponding blockchain nodes below, including the following steps:
  • the consensus node of the blockchain executes the consensus operation of the first transaction set in the consensus proposal of the Nth round, where N is a positive integer.
  • the first transaction set may include all transactions requiring consensus in the Nth round of consensus proposals, or some transactions requiring consensus in the Nth round of consensus proposals, which is not specifically limited here.
  • the consensus node is the consensus master node of the blockchain, it is necessary to create the N-round consensus proposal and send the N-round consensus proposal to the consensus backup node of the blockchain.
  • the consensus backup node obtains the N round of consensus proposals
  • the blockchain consensus nodes (including the consensus master node and the consensus backup node) begin to perform consensus operations on the first transaction set.
  • the consensus node is the consensus backup node of the blockchain, it will perform consensus operations on the first transaction set after receiving the Nth round of consensus proposals sent by the consensus master node of the blockchain.
  • the consensus node executes the transaction execution operation of the first transaction set.
  • the consensus node can execute the transaction execution operation on the first transaction set without reaching a consensus on the first transaction set.
  • the consensus node can execute the transaction execution operation of the first transaction set in parallel when executing the consensus operation of the first transaction set after the N-round consensus proposal is initiated.
  • the consensus operations performed by consensus nodes mainly include: consensus verification and consensus message sending and receiving. That is to say, in the parallel mode, consensus nodes can at least use the time of waiting to receive consensus messages sent by other consensus nodes to perform transaction execution operations, thereby improving the processing efficiency of blockchain transactions.
  • the consensus node After the transaction execution operation is completed, the consensus node initiates a confirmation operation on the transaction execution of the first transaction set.
  • the transaction execution determination operation refers to the operation of confirming the transaction execution result.
  • the consensus node After the consensus node completes the transaction execution operation of the first transaction set, it will send the transaction execution confirmation message of the first transaction set to other consensus nodes in the blockchain, and the transaction execution confirmation message carries the transaction execution confirmation message of the first transaction set. Hash information; similarly, when other consensus nodes complete the transaction execution operation of the first transaction set, they will also send the transaction execution confirmation message of the first transaction set to the consensus node in this step.
  • the consensus node in this step receives the transaction execution confirmation message carrying the hash information of the same first transaction set sent by 2f other consensus nodes, it can confirm the transaction execution of the first transaction set (f is the area Amount of Byzantine Fault Tolerance set by the blockchain). It should be understood that after the transaction execution in the first transaction set is confirmed, the transaction execution result in the first transaction set can be fed back to the corresponding client and be perceived by the client user in advance.
  • the consensus node After the consensus node reaches a consensus on all the transaction sets proposed by the N-round consensus and completes the transaction execution confirmation operation, it performs a block writing operation on all the transaction sets proposed by the N-round consensus.
  • the block writing operation in the traditional serial mode can only be executed after the transaction execution results of all transaction sets proposed by the N round of consensus are confirmed, while the above steps based on the embodiment of the present invention can complete the transaction execution operation and transaction execution confirmation in advance In this way, the block writing operation will also be executed in advance, thereby shortening the time-consuming of blockchain transactions on the chain, and improving the transaction processing efficiency of the blockchain.
  • the consensus node can generate a temporary block proposed by the N-round consensus after completing the transaction confirmation operation for all transaction sets proposed by the N-round consensus; at this time, if If a consensus has not been reached on all transaction sets proposed by the N round of consensus, the consensus node will wait; if a consensus has been reached on all transaction sets proposed by the N round consensus, the consensus node will directly transfer the temporary area The block is written into the blockchain, thus saving the time-consuming operation of writing blocks.
  • the consensus node of the blockchain can execute the transaction execution operation on the transaction in advance before completing the consensus operation of the transaction, and initiate the transaction execution confirmation operation after the transaction execution operation is completed, so that Improve the confirmation efficiency of transaction finalization, so that client users can know the transaction execution results as soon as possible, which improves the user experience to a certain extent.
  • the advance confirmation of transaction execution will also execute the block writing operation earlier, which improves the transaction efficiency of the blockchain, thereby improving the business throughput of the blockchain, which is in line with the high concurrency of blockchain business in the future. development trend.
  • the consensus nodes of the blockchain perform consensus operations based on the Practical Byzantine Fault Tolerance (PBFT) protocol.
  • PBFT Practical Byzantine Fault Tolerance
  • the consensus process of the traditional PBFT protocol mainly includes:
  • the main consensus node receives a request from the Client and assigns a number to the request.
  • the consensus main node broadcasts a pre-prepare message to the consensus backup node.
  • This pre-prepare message mainly includes the current consensus view (view), the consensus main The node's digest (digest) and the above block hash information, etc.
  • each consensus backup node After receiving the pre-prepare message, each consensus backup node verifies the information in the pre-prepare message. If the test is successful, it goes directly to the prepare phase. If the verification fails, the consensus process ends.
  • each of the consensus backup nodes participating in the consensus checks whether the pre-prepare message is legal. If the pre-prepare message is legal, then the consensus proposal is determined to be prepared on the replica, and the consensus backup node adds the pre-prepare message to the local Log, and sends the prepare message to other consensus backup nodes participating in the consensus.
  • Each of all consensus nodes sends a commit message to other consensus nodes after entering the prepared state, and adds the commit message sent by itself to the local Log (representing its own approval).
  • a consensus node finds that there is a quorum (quorum is a set of a certain number of replicas required to ensure all replica data consistency requirements and fault tolerance requirements) agreeing to number assignment, it will broadcast a commit message to all other nodes. At the same time, it will also receive commit messages from other nodes one after another.
  • each node receives 2f commit messages not including those sent by itself (f is the number of malicious nodes in the alliance chain, and the 2f commit messages do not include those sent by itself commit message), it means that the consensus node has a certificate named committed certificate, and the request has reached the committed state on this consensus node. At this time, only through this consensus node, it can be concluded that the request has reached the prepared state in a quorum, that is, all consensus nodes of the same quorum have agreed to the allocation of number n. When the request initiated by the Client reaches the committed state, it means that the consensus of the whole network has been reached.
  • the consensus master node in this application scenario needs to select the first transaction set from its own transaction pool to initiate the Nth round of consensus proposal, and in the Pre-Prepare phase, pass The Pre-Prepare message sends the transaction data of the first transaction set to the consensus backup node of the blockchain.
  • the consensus node determines the transaction data of the first transaction set, it can execute the transaction execution operation on the first transaction set. That is to say, in this application scenario, the consensus master node can execute transactions on the first transaction set as early as the Pre-Prepare stage, and the consensus backup node needs to obtain the transaction data of the first transaction set through the Pre-Prepare message After that, execute the transaction execution operation on the first transaction set in the Prepare phase.
  • each consensus node of the blockchain can generate a temporary block of the first transaction set before the Commit phase.
  • the Commit message can be reused to complete the transaction execution confirmation operation. That is, each consensus node of the blockchain sends the hash information of the temporary block of the first transaction set to other blockchain nodes of the blockchain through a Commit message in the Commit phase. Afterwards, any consensus node will confirm the transaction execution of the first transaction set if it receives the Commit message from 2f other consensus nodes carrying the hash information of the temporary block of the same first transaction set.
  • P1 is the consensus master node proposed by the N-round consensus
  • P2, P3, and P4 are the consensus proposed by the N-round consensus
  • the traditional transaction on-chain process based on the PBFT protocol is to execute the consensus operation of the pre-prepare stage, the consensus operation of the prepare stage, the consensus operation of the Commit stage, and Transaction execution operation ⁇ transaction execution confirmation operation (represented by shaded squares) and write block operation (represented by unfilled squares).
  • the application scenario of the embodiment of this specification is shown in Figure 3 based on the transaction on-chain process of the PBFT protocol. That is, before the consensus operation of the Commit phase of the PBFT protocol, P1 directly generates the temporary area proposed by the Nth round of consensus, and sends a Commit message carrying the hash information of the temporary block proposed by the Nth round of consensus in the Commit phase to other consensus nodes. It should be understood that since the consensus proposal of the Nth round only includes the first transaction set, the hash information of the temporary block proposed by the Nth round consensus is the hash information of the first transaction set.
  • the Commit message sent by 2f other consensus nodes carrying the hash information of the temporary block of the same N-round consensus proposal can confirm the final execution of all transactions in the N-round consensus proposal, and directly transfer the N-round consensus proposal
  • the proposed interim block is written to the blockchain.
  • the above is an example of how the consensus node executes the transaction execution operation and the transaction execution confirmation operation when the consensus proposal contains only one transaction set.
  • the method of the embodiment of the present invention can also be shown in Figure 4, where the consensus master node and the consensus backup node perform transaction execution operations together in the Prepare phase; or as shown in Figure 5, the consensus master node and the consensus backup node Execute the transaction execution operation after the Prepare phase, and enter the Commit phase after completing the transaction execution operation. It should be understood that no matter what the changes are, within the consensus stage of a certain transaction set, the parallel execution of transaction execution operations and transaction execution confirmation on the transaction set shall fall within the scope of protection of this document.
  • the consensus nodes can complete consensus operations on multiple intersections of the N-round consensus proposals in batches as shown in Figure 6 , transaction execution operation and transaction execution confirmation operation.
  • FIG. 6 takes the N-round consensus proposal including the first intersection, the second transaction set and the third transaction set as an example.
  • the consensus node is set with the first CPU thread responsible for performing consensus operations (it can also be a CPU core, which will not be described here), the second CPU thread responsible for performing transaction execution operations and transaction execution confirmation operations, and the second CPU thread responsible for performing block writing operations.
  • the third CPU thread, the first CPU thread, the second CPU thread and the third CPU thread are parallel to each other.
  • the consensus node executes the consensus operation of the first transaction set through the first CPU thread, and at the same time executes the transaction execution operation and transaction execution confirmation operation of the first transaction set through the second CPU thread.
  • the consensus node starts to execute the consensus operation of the second transaction set through the first CPU thread, and at the same time executes the transaction execution operation and transaction execution of the second transaction set through the second CPU thread Confirm the action.
  • the consensus node starts to execute the consensus operation of the third transaction set through the first CPU thread, and at the same time executes the transaction execution operation and transaction execution of the third transaction set through the second CPU thread Confirm the action.
  • the consensus node starts to execute the block writing operation on the first transaction set, the second transaction set and the third transaction set through the third CPU thread.
  • the consensus node can also As shown in Figure 7, on the basis of completing consensus operations, transaction execution operations, and transaction execution confirmation operations for multiple intersections of the N-th round of consensus proposals in batches, set more CPU threads to implement:
  • the transaction set executes the transaction execution operation, if there is a second transaction set that has not yet completed the consensus in the consensus proposal of the Nth round, then the consensus operation is performed on the second transaction set in parallel.
  • the transaction processing method shown in Figure 7 further utilizes the advantages of CPU multi-core and multi-threading to improve the efficiency of blockchain transactions in a parallel manner.
  • the transaction execution operations of the second transaction set should be executed after the transaction execution operations of the first transaction set are completed.
  • the transaction execution operations of the third transaction set should be executed after Execute after the transaction execution operation of the second transaction set is completed.
  • the method in this application scenario executes the consensus operation on the first transaction set proposed by the N-th round of consensus, it also executes the transaction execution operation on the first transaction set in parallel, thereby improving the transaction execution confirmation efficiency of the first transaction set , so that client users can know the transaction execution results as soon as possible, which can improve user experience to a certain extent.
  • the parallel operation of consensus operation and transaction execution operation also shortens the time-consuming on-chain of blockchain transactions, which means that the business throughput of blockchain has also been improved.
  • the execution of the transaction by the consensus node will not waste time. This is because the consensus proposal timeout period set by the existing blockchain is generally several seconds to tens of seconds, and the consensus node has sufficient time to complete the transaction execution operation during the timeout period.
  • the consensus node can also cache the generated temporary block for use in subsequent rounds of consensus proposals.
  • the timeout of the Nth round of consensus proposal as an example, after the consensus node generates the temporary block of the Nth round of consensus proposal, if the timeout of the Nth round of consensus proposal ends, the temporary block of the first transaction set can be cached first , and when performing the consensus operation on the transaction set proposed by the N+1 round consensus, if the consensus proposal of the N+1 round is consistent with the transaction set proposed by the N round consensus (that is, the consensus node of the N+1 round consensus proposal Initiate a consensus proposal of the same transaction set), skip the transaction execution operation on the second transaction set, and use the cached temporary block of the first transaction set as the temporary block of the second transaction set.
  • the consensus node can choose to delete the cached temporary block of the first transaction set to clear the cache space.
  • the above process is applicable to the scenario where the consensus master node recovers and re-initiates the consensus proposal after a downtime in the consensus stage, or the consensus proposal timeout triggers the view switch of the blockchain, and the new consensus master node restarts the transaction set proposed by the original consensus Scenarios for initiating consensus proposals.
  • FIG. 8 is a schematic structural diagram of a block chain node 800 according to an embodiment of the present invention, including:
  • the transaction consensus module 810 executes the consensus operation of the first transaction set in the Nth round of consensus proposals, where N is a positive integer;
  • the transaction execution module 820 executes the transaction execution operation of the first transaction set
  • the transaction execution confirmation module 830 after the execution of the transaction execution operation, initiates the transaction execution confirmation operation of the first transaction set;
  • the block writing module 840 executes a block writing operation on all transaction sets proposed by the N-th round of consensus after reaching a consensus on all transaction sets proposed by the N-th round of consensus and completing transaction confirmation operations.
  • the consensus node of the blockchain can execute the transaction execution operation on the transaction in advance before completing the consensus operation of the transaction, and initiate the transaction execution confirmation operation after the transaction execution operation is completed, thereby improving transaction finalization.
  • the confirmation efficiency is high, so that the client user can know the transaction execution result as soon as possible, which improves the user experience to a certain extent.
  • the advance confirmation of transaction execution will also execute the block writing operation earlier, which improves the transaction efficiency of the blockchain, thereby improving the business throughput of the blockchain, which is in line with the high concurrency of blockchain business in the future. development trend.
  • the transaction execution confirmation module 830 is specifically configured to: send the transaction execution confirmation message of the first transaction set to other consensus nodes of the blockchain, the transaction execution confirmation message carrying the hash of the first transaction set and receiving the transaction execution confirmation message carrying the hash information of the first transaction set sent by other consensus nodes, and receiving the hash information of the same first transaction set sent by 2f other consensus nodes After the transaction execution confirmation message of the information, the transaction execution of the first transaction set is confirmed, and f is the number of Byzantine fault tolerance set by the blockchain.
  • the block writing module 840 is specifically configured to: generate a temporary block proposed by the N-round consensus after completing the transaction confirmation operation for all transaction sets proposed by the N-round consensus; If all transaction sets proposed by the Nth round of consensus have reached a consensus, the consensus node will wait; if a consensus has been reached on all transaction sets proposed by the Nth round of consensus, then the consensus node will The temporary block proposed by the consensus round is written into the blockchain.
  • the transaction execution module 820 executes the transaction execution operation of the first transaction set in parallel.
  • the consensus node performs a consensus operation based on the practical Byzantine fault-tolerant PBFT protocol; if the consensus node is the consensus master node of the block chain, the transaction execution module 820 executes the first transaction set in the transaction consensus module 810. During the consensus operation of the Pre-Prepare stage of the PBFT protocol, the transaction execution operation of the first transaction set is executed in parallel; if the consensus node is used as the consensus backup node of the block chain, the transaction execution module 820 is When the consensus module 810 executes the consensus operation of the Prepare phase of the PBFT protocol on the first transaction set, it executes the transaction execution operation of the first transaction set in parallel.
  • the transaction execution module 820 completes the transaction execution operation performed on the first transaction set before the transaction consensus module 810 executes the consensus operation of the guaranteed Commit phase of the PBFT protocol on the first transaction set; the transaction execution confirmation module 830 When the transaction execution module 820 executes the consensus operation of the Commit stage of the PBFT on the first transaction set, it sends the Commit message as the transaction execution confirmation message of the first transaction set to other members of the block chain.
  • a consensus node wherein the Commit message sent by the consensus node carries hash information of the first transaction set generated by the consensus node.
  • the consensus node if the consensus proposal of the Nth round only includes the first transaction set, the consensus node generates the The temporary block proposed by the N-round consensus, wherein the Commit message sent by the consensus node carries the hash information of the temporary block proposed by the N-round consensus generated by the consensus node, and the N-round consensus
  • the hash information of the proposed temporary block is used as the hash information of the first transaction set.
  • the N-th round of consensus proposes multiple transaction sets including the first transaction set
  • the consensus node executes the transaction execution operation on the first transaction set
  • a second transaction set if there is a second transaction set, Then, a consensus operation is performed on the second transaction set in parallel, where the second transaction set is a transaction set that has not yet completed consensus in the N round of consensus proposals.
  • block chain node of the embodiment of the present invention also includes:
  • the caching module after the transaction execution module 820 generates the temporary block proposed by the N round consensus, if the N round consensus proposal ends overtime, then cache the temporary block proposed by the N round consensus; Specifically, when the transaction execution module 820 performs the consensus operation on the consensus proposal of the N+1 round, if the consensus proposal of the N+1 round is consistent with the transaction set proposed by the consensus proposal of the Nth round, skip the operation of the consensus proposal of the N+1 round.
  • the transaction set proposed by the N+1 round of consensus executes the transaction execution process, and the temporary block proposed by the Nth round of consensus is used as the temporary block proposed by the N+1 round of consensus.
  • the cache module deletes the temporary block that can delete the cached temporary block of the consensus proposal of the N round.
  • the blockchain node in the embodiment of this specification can be used as the execution body of the transaction processing method shown in FIG. 1 above, so it can realize the functions realized by the transaction processing method in FIG. 1 . Since the principle is the same, this article will not repeat them.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present specification.
  • the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory.
  • the memory may include a memory, such as a high-speed random-access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • RAM random-Access Memory
  • non-volatile memory such as at least one disk memory.
  • the electronic device may also include hardware required by other services.
  • the processor, the network interface and the memory can be connected to each other through an internal bus, which can be an ISA (Industry Standard Architecture, industry standard architecture) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnection standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard architecture) bus, etc.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one double-headed arrow is used in FIG. 9 , but it does not mean that there is only one bus or one type of bus.
  • Memory for storing programs.
  • the program may include program code, and the program code includes computer operation instructions.
  • Storage which can include internal memory and nonvolatile storage, provides instructions and data to the processor.
  • the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a blockchain transaction processing device on a logical level.
  • the transaction processing device can refer to a blockchain node or a A component in a blockchain node.
  • the processor executes the program stored in the memory, and is specifically used to perform the following operations:
  • the consensus node of the block chain can execute the transaction execution operation on the transaction in advance before completing the consensus operation of the transaction, and initiate the transaction execution confirmation operation after the transaction execution operation is completed, thereby improving the transaction finality.
  • Optimized confirmation efficiency so that client users can know the transaction execution results as soon as possible, which improves the user experience to a certain extent.
  • the advance confirmation of transaction execution will also execute the block writing operation earlier, which improves the transaction efficiency of the blockchain, thereby improving the business throughput of the blockchain, which is in line with the high concurrency of blockchain business in the future. development trend.
  • each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the electronic equipment in this specification does not exclude other implementations, such as logic devices or the combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, It can also be a hardware or logic device.
  • the embodiment of this specification also proposes a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs include instructions.
  • the portable electronic device can be made to execute the method of the embodiment shown in Figure 1, and is specifically used to perform the following steps:

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • Technology Law (AREA)
  • Retry When Errors Occur (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Des modes de réalisation de la présente invention concernent un procédé de traitement de transactions d'une chaîne de blocs, un nœud de chaîne de blocs et un dispositif électronique. Le procédé comprend les étapes suivantes : un nœud de consensus d'une chaîne de blocs exécute un mécanisme de consensus d'un premier ensemble de transactions dans un énième tour de proposition de consensus, N étant un nombre entier positif ; le nœud de consensus exécute un processus d'exécution de transactions du premier ensemble de transactions ; après achèvement de l'exécution du processus d'exécution de transactions, le nœud de consensus démarre un processus de détermination d'exécution de transactions pour le premier ensemble de transactions ; et après qu'un consensus a été atteint pour tous les ensembles de transactions dans le énième tour de proposition de consensus et que les processus de détermination d'exécution de transaction sont terminés, le nœud de consensus exécute un processus d'écriture de bloc pour tous les ensembles de transactions dans le énième tour de proposition de consensus.
PCT/CN2022/135403 2022-02-24 2022-11-30 Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique WO2023160086A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210178246.2 2022-02-24
CN202210178246.2A CN114529414A (zh) 2022-02-24 2022-02-24 一种区块链的交易处理方法、区块链节点及电子设备

Publications (1)

Publication Number Publication Date
WO2023160086A1 true WO2023160086A1 (fr) 2023-08-31

Family

ID=81624487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135403 WO2023160086A1 (fr) 2022-02-24 2022-11-30 Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique

Country Status (2)

Country Link
CN (1) CN114529414A (fr)
WO (1) WO2023160086A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529414A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链的交易处理方法、区块链节点及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108648078A (zh) * 2018-05-02 2018-10-12 杭州秘猿科技有限公司 一种交易预处理方法、装置及电子设备
CN110020859A (zh) * 2019-03-28 2019-07-16 杭州秘猿科技有限公司 一种并行执行的区块链共识方法、装置及电子设备
US20190354518A1 (en) * 2018-05-01 2019-11-21 Michael Zochowski Chain mesh network for decentralized transaction systems
CN112991066A (zh) * 2021-04-27 2021-06-18 支付宝(杭州)信息技术有限公司 联盟链中的共识方法、装置和电子设备
CN113836232A (zh) * 2021-09-24 2021-12-24 支付宝(杭州)信息技术有限公司 联盟链中的共识方法和系统
CN114529414A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链的交易处理方法、区块链节点及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190354518A1 (en) * 2018-05-01 2019-11-21 Michael Zochowski Chain mesh network for decentralized transaction systems
CN108648078A (zh) * 2018-05-02 2018-10-12 杭州秘猿科技有限公司 一种交易预处理方法、装置及电子设备
CN110020859A (zh) * 2019-03-28 2019-07-16 杭州秘猿科技有限公司 一种并行执行的区块链共识方法、装置及电子设备
CN112991066A (zh) * 2021-04-27 2021-06-18 支付宝(杭州)信息技术有限公司 联盟链中的共识方法、装置和电子设备
CN113836232A (zh) * 2021-09-24 2021-12-24 支付宝(杭州)信息技术有限公司 联盟链中的共识方法和系统
CN114529414A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链的交易处理方法、区块链节点及电子设备

Also Published As

Publication number Publication date
CN114529414A (zh) 2022-05-24

Similar Documents

Publication Publication Date Title
TWI714847B (zh) 區塊鏈共識網路中處理共識請求的方法、裝置和電子設備
US11368317B2 (en) Consensus method of consortium blockchain, and consortium blockchain system
US11410171B2 (en) Blockchain consensus method and device and electronic equipment
CN108648078B (zh) 一种交易预处理方法、装置及电子设备
US20210314179A1 (en) Methods and consensus nodes for block generation
WO2021109471A1 (fr) Procédé et dispositif pour ajouter de manière dynamique un noeud de consensus dans une chaîne de blocs
CN105988862A (zh) 分布式事务处理方法及装置
WO2023160086A1 (fr) Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
CN109002462B (zh) 一种实现分布式事务的方法及系统
WO2022160901A1 (fr) Procédé de consensus de chaîne de blocs, nœud de consensus et dispositif électronique
WO2023045617A1 (fr) Procédé et appareil de traitement de données de transaction, dispositif et support
US20210165810A1 (en) Transaction processing method, apparatus, and device and computer storage medium
WO2023160088A1 (fr) Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
WO2023160092A1 (fr) Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
US11803447B2 (en) Transaction processing method, apparatus, and electronic device for blockchain
CN115409507A (zh) 区块处理方法、区块处理装置、计算机设备及存储介质
CN112162988A (zh) 一种分布式事务的处理方法、装置和电子设备
CN110865874B (zh) 事务提交的方法和装置
CN112445761B (zh) 一种文件校验方法、装置及存储介质
CN116860362B (zh) 一种应用于流程编排引擎的插件事务管理方法及装置
CN113326268A (zh) 一种数据写入、读取方法及装置
CN112667148A (zh) 一种集群存储数据在线迁移的方法及系统
CN114357079A (zh) 一种基于区块链的数据处理方法、节点设备、系统及平台
CN117520449A (zh) 一种数据运营管理方法、装置、设备及存储介质
CN117687744A (zh) 一种硬件事务内存中对事务进行动态调度的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22928346

Country of ref document: EP

Kind code of ref document: A1