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

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

Info

Publication number
WO2023160092A1
WO2023160092A1 PCT/CN2022/135613 CN2022135613W WO2023160092A1 WO 2023160092 A1 WO2023160092 A1 WO 2023160092A1 CN 2022135613 W CN2022135613 W CN 2022135613W WO 2023160092 A1 WO2023160092 A1 WO 2023160092A1
Authority
WO
WIPO (PCT)
Prior art keywords
transactions
batch
consensus
batches
round
Prior art date
Application number
PCT/CN2022/135613
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 WO2023160092A1 publication Critical patent/WO2023160092A1/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 relates to the field of blockchain technology, and in particular to a processing method for blockchain transactions, blockchain 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 collection, transaction consensus, transaction execution, and block writing. In the prior art, these four stages are executed serially, resulting in relatively low processing efficiency of blockchain transactions.
  • 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 processing efficiency of blockchain transactions.
  • a method for processing blockchain transactions is provided, which is applied to blockchain nodes, including:
  • a method for processing blockchain transactions is provided, which is applied to blockchain nodes, including:
  • a blockchain node including:
  • the first transaction collection module collects the first batch of transactions in the Nth round consensus proposal of the blockchain, where the Nth round consensus proposal includes multiple batches of transactions, where N is a positive integer;
  • the first transaction consensus module performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, the transaction collection module simultaneously executes the collection operation of the second batch of transactions in batch order in parallel, Wherein, the second batch of transactions is a batch of transactions for which the N round of consensus proposals has not yet been collected;
  • the first transaction execution module performs a transaction execution operation on the first batch of transactions, and if there is a third batch of transactions, the transaction consensus module simultaneously executes the third batch of transactions according to the order of batches in parallel Consensus operation, wherein the third batch of transactions is a batch of transactions for which the N round of consensus proposals have been collected and consensus has not yet been completed;
  • the first transaction confirmation module sends the transaction execution results of the first batch of transactions in the blockchain to confirm the first batch of transactions
  • the first transaction block writing module executes a block writing operation on all batches of transactions proposed by the N-th round of consensus after obtaining the transaction confirmations of all the batches of transactions proposed by the N-th round of consensus.
  • an electronic device comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, the computer program being executed by the processor:
  • a computer-readable storage medium is provided.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the following steps are implemented:
  • a blockchain node including:
  • the second transaction collection module collects the first batch of transactions in the Nth round of consensus proposals of the blockchain, where the Nth round of consensus proposals includes multiple batches of transactions, where N is a positive integer;
  • the second transaction consensus module performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, the transaction collection module simultaneously executes the collection operation of the second batch of transactions in batch order in parallel, wherein, the second batch of transactions is a batch of transactions for which the N round of consensus proposals has not yet been collected;
  • the second transaction execution module if all batches of transactions proposed by the N-th round of consensus have completed consensus, perform transaction execution operations on all batches of transactions proposed by the N-th round of consensus;
  • the second transaction confirmation module sends the transaction execution results of the first batch of transactions in the block chain to confirm the transaction of the first batch of transactions;
  • the second transaction block writing module executes a block writing operation on all batches of transactions proposed by the N-th round of consensus after obtaining the transaction confirmations of all the batches of transactions proposed by the N-th round of consensus.
  • an electronic device comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, the computer program being executed by the processor:
  • a computer-readable storage medium is provided.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the following steps are implemented:
  • the blockchain nodes can perform easy collection, transaction consensus, transaction execution, and transaction confirmation in batches for each round of consensus proposals.
  • the execution operations of the previous batch of transactions and the collection operations of the next batch of transactions are also performed, thereby shortening the blockchain transaction time in parallel. Processing time, thereby improving the throughput of the blockchain to meet the needs of high-concurrency business scenarios.
  • Fig. 1 is a schematic flow chart of the first method for processing blockchain transactions provided by the embodiment of this specification.
  • Fig. 2 is a schematic diagram of the first time slot of the blockchain transaction processing method provided by the embodiment of this specification.
  • FIG. 3 is a schematic diagram of the second time slot of the blockchain transaction processing method provided by the embodiment of this specification.
  • Fig. 4 is a second schematic flowchart of the processing method of a blockchain transaction provided by the embodiment of this specification.
  • Fig. 5 is a schematic diagram of the third time slot of the blockchain transaction processing method provided by the embodiment of this specification.
  • Fig. 6 is a schematic structural diagram of the first type of blockchain node provided by the embodiment of this specification.
  • Fig. 7 is a schematic structural diagram of the second type of blockchain node provided by the embodiment of this specification.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
  • the current block chain completes the four operations of transaction collection, consensus, execution and block writing in a serial manner, which leads to relatively low processing efficiency of block chain transactions and limits the use of block chains. throughput.
  • the blockchain becomes more and more popular in all walks of life, the business volume will also show explosive growth.
  • the current transaction processing method is difficult to apply to scenarios with high business concurrency in the future.
  • this document aims to provide a technical solution that can improve the efficiency of blockchain transaction processing.
  • 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:
  • S102 Collect the first batch of transactions in the Nth round consensus proposal of the blockchain, where the Nth round consensus proposal includes multiple batches of transactions, and N is a positive integer.
  • each blockchain node of the blockchain can uniformly batch all transactions proposed by the N-th round of consensus according to the corresponding transaction initiation time based on the smart contract set in advance. subdivided. Alternatively, according to the order of transactions in the N-th round of consensus proposals, all transactions proposed by the N-th round of consensus are divided into batches.
  • S104 execute the consensus operation on the first batch of transactions, and if there is a second batch of transactions, execute the collection operation of the second batch of transactions in parallel in batch order, the second batch of transactions is the Nth round of consensus proposals that have not been completed Collected batches of transactions.
  • batch transactions that have not been collected in this step may include batch transactions that have not yet started collection, or batch transactions that have started collection but have not yet completed collection.
  • the batch order is the batch division order described in S102 above.
  • the blockchain nodes collect the transactions proposed by the N round of consensus in batches. After the target batch of transactions is collected, it can be executed at the same time: the consensus execution operation of the target batch of transactions and the collection operation of the next batch of transactions corresponding to the target batch of transactions. That is to say, the second batch of transactions mentioned in this step refers to the next batch of transactions of the first batch of transactions.
  • S106 perform transaction execution operations on the first batch of transactions, and if there is a third batch of transactions in parallel, perform consensus operations on the third batch of transactions in batch order, the third batch of transactions has been collected for the Nth round of consensus proposals Batch transactions that have completed and have not yet completed consensus.
  • batches of transactions whose consensus has not been completed in this step may include batches of transactions that have not yet started consensus, or batches of transactions that have started consensus but have not yet completed consensus.
  • the blockchain nodes perform consensus operations on the transactions proposed by the N-th round of consensus in batches. After the consensus operation of the target batch of transactions is completed, it can be executed simultaneously: the execution operation of the target batch of transactions and the consensus operation of the next batch of transactions corresponding to the target batch of transactions. That is to say, the third batch of transactions mentioned in this step refers to the next batch of transactions of the second batch of transactions.
  • the block chain node as the execution subject of this step can send the transaction confirmation request of the transaction execution result of the first batch of transactions to other block chain nodes in the block chain; if 2f other block chain nodes are received later If the transaction confirmation feedback is sent, the transaction confirmation of the first batch of transactions is confirmed.
  • f is the maximum number of abnormal consensus nodes allowed by the blockchain.
  • the blockchain nodes perform consensus operations on the transactions proposed by the N-th round of consensus in batches, but in the end, only one block writing operation may be performed. That is to say, in the embodiment of this specification, all batches of transactions proposed by the Nth round of consensus can be recorded in one block.
  • the blockchain nodes can execute collection, transaction consensus, transaction execution, and transaction confirmation in batches for each round of consensus proposals.
  • the execution operations of the previous batch of transactions and the collection operations of the next batch of transactions are also performed, thereby shortening the blockchain transaction time in parallel. Processing time, thereby improving the throughput of the blockchain to meet the needs of high-concurrency business scenarios.
  • the transaction execution results of the first batch of transactions can also be fed back to the corresponding blockchain client. That is to say, in the method of the embodiment of this specification, the block chain node can immediately feed back the transaction execution to the block chain client after each batch of transactions completes the transaction execution and gets the transaction confirmation, thereby significantly reducing the transaction time.
  • the transaction confirmation delay on the client side of the block chain improves the user experience.
  • the feedback strategy for transaction execution results can be determined based on the number of transactions in the N-th round of consensus proposals. For example, when the number of transactions in the N-th round of consensus proposals exceeds the preset threshold, you can choose to immediately feed back the transaction execution results to the blockchain client after each batch of transactions is executed and confirmed. Similarly, when the number of transactions in the N-round consensus proposal does not exceed the preset threshold, you can choose to complete the transaction execution and get transaction confirmation for all batches of transactions proposed by the N-round consensus proposal, and then send the N-round consensus proposal The transaction execution results of all batches of transactions are uniformly fed back to the corresponding blockchain client.
  • the method of the embodiment of this specification can set the first thread, the second thread, the third thread, the fourth thread and the fifth thread to be executed in parallel, so as to respectively execute the collection, consensus, and transaction of blockchain transactions.
  • These five operations are execution, transaction confirmation, and block writing.
  • the first thread is used to collect transactions in batches, that is, the first thread does not collect other batches of transactions before collecting a batch of transactions;
  • the second thread is used to perform consensus operations on transactions in batches, that is, the first thread The second thread does not execute the consensus operations of other batches of transactions before executing the consensus operation of a batch of transactions;
  • the third thread is used to execute the execution operations of transactions in batches, that is, before executing the execution operations of a batch of transactions The execution operations of other batches of transactions are not executed.
  • the fourth thread performs transaction confirmation in batches, that is, the transaction confirmation of other batches of transactions is not performed before the transaction confirmation of one batch of transactions is completed.
  • the fifth thread executes block writing operations uniformly after all batches of transactions proposed by each round of consensus are confirmed.
  • each round of consensus proposes that the subsequent batch of transactions cannot be executed earlier than the previous batch of transactions.
  • the execution phase takes more time than the collection and consensus phases. This causes each intermediate batch of transactions to wait for the execution of the previous batch of transactions after the consensus is completed.
  • This waiting time (T in Figure 2 represents the waiting time) will determine the efficiency of transaction data on-chain.
  • the transactions proposed by each round of consensus are divided into multiple small batches, which can reduce the time-consuming execution of each batch of transactions, that is, reduce the length of T in Figure 2, thereby improving the area Processing efficiency of blockchain transactions.
  • first thread, second thread, third thread, fourth thread and fifth thread may belong to different cores of the processor. That is to say, the embodiment of this description can perform the transaction collection operation, consensus operation, and execution operation on the same round of consensus proposals in a multi-core and multi-thread parallel manner.
  • the operation of feeding back the transaction execution result to the client can be executed immediately after the transaction is executed, one thread can be used to execute the transaction execution operation and the feedback operation of the transaction execution result. That is, the fourth thread mentioned above is the third thread mentioned above, and the consensus proposals of round N and round N+1 can present the time slot relationship shown in Figure 3.
  • the method in the embodiment of this specification can also perform the execution operation and block writing operation for all batches of transactions proposed in the N-round consensus proposal after all batches of transactions in the N-round consensus proposal have completed consensus .
  • the processing method of the blockchain transaction in the embodiment of this specification can also be shown in Figure 4, including the following steps:
  • S402. Collect the first batch of transactions in the Nth round consensus proposal of the blockchain, where the Nth round consensus proposal includes multiple batches of transactions.
  • S404 execute the consensus operation on the first batch of transactions, and if there is a second batch of transactions, execute the collection operation of the second batch of transactions in parallel in batch order, the second batch of transactions is the Nth round of consensus proposals that have not been completed Collected batches of transactions.
  • S408 sending the transaction execution results of all batches of transactions proposed by the Nth round of consensus in the blockchain to perform transaction confirmation on all the batches of transactions proposed by the Nth round of consensus.
  • Fig. 5 is a time slot relationship diagram for the N-th round and the N+1-th round of consensus proposals based on the method shown in Fig. 4 . It should be understood that the execution operations of all batches of transactions proposed by the N-th round of consensus can be performed at least after the execution of all batches of transactions proposed by the N-1 consensus round is completed.
  • the method shown in Figure 4 uses the first thread to collect transactions in batch order for each round of consensus proposals, that is, the first thread does not collect other batches of transactions before collecting one batch of transactions;
  • the round of consensus proposals executes the consensus operations of transactions in batch order, that is, the second thread does not execute the consensus operations of other batches of transactions before executing the consensus operations of one batch of transactions; All batches of transactions are executed uniformly; through the fourth thread, all batches of transactions in each round of consensus proposals are uniformly confirmed; through the fifth thread, all batches of transactions in each round of consensus proposals are uniformly written block operation.
  • the first thread, the second thread, the third thread, the fourth thread, and the fifth thread are threads executed in parallel.
  • the method shown in Figure 4 can also execute transaction collection and transaction consensus for each round of consensus proposals in batches.
  • the consensus operation is performed on the intermediate batch of transactions proposed by each round of consensus
  • the collection operation of the next batch of transactions is also performed, so that the processing time of the blockchain transaction can also be shortened in parallel, thereby improving the area.
  • the throughput of the block chain can meet the needs of high-concurrency business scenarios.
  • FIG. 6 is a schematic structural diagram of a blockchain node 600 according to an embodiment of this specification, including:
  • the first transaction collection module 610 collects the first batch of transactions in the Nth round consensus proposal of the blockchain, where the Nth round consensus proposal includes multiple batches of transactions, where N is a positive integer.
  • the first transaction consensus module 620 executes a consensus operation on the first batch of transactions, and if there is a second batch of transactions, the transaction collection module simultaneously executes the second batch of transactions in batch order in parallel A collection operation, wherein the second batch of transactions is a batch of transactions whose collection has not been completed for the N round of consensus proposals.
  • the first transaction execution module 630 performs transaction execution operations on the first batch of transactions, and if there is a third batch of transactions, the transaction consensus module simultaneously executes the third batch of transactions in batch order Consensus operation, wherein, the third batch of transactions is a batch of transactions for which the N round of consensus proposals have been collected and consensus has not yet been completed;
  • the first transaction confirmation module 640 sends the transaction execution result of the first batch of transactions in the block chain to perform transaction confirmation on the first batch of transactions.
  • the first transaction block writing module 650 executes a block writing operation on all batches of transactions proposed by the N-th round of consensus after obtaining the transaction confirmations of all the batches of transactions proposed by the N-th round of consensus.
  • the blockchain nodes in the embodiments of this specification can execute the transaction collection, transaction consensus and transaction execution of each round of consensus proposals in batches. Specifically, while executing the consensus operation on the intermediate batch of transactions, the execution operation of the previous batch of transactions and the collection operation of the next batch of transactions are also performed, thereby shortening the processing time of blockchain transactions in parallel, and further The throughput of the blockchain has been improved to meet the needs of high-concurrency business scenarios.
  • the first transaction collection module 610 executes the batch order The collection operation of batch transactions in N+1 rounds of consensus proposals.
  • the first transaction collection module 610 executes in parallel the second batch of transactions in batch order collection operation.
  • the first transaction collection module 610 performs batch order The collection operation of batch transactions in N+1 rounds of consensus proposals.
  • the first transaction collection module 610 executes the batch order The collection operation of batch transactions in N+1 rounds of consensus proposals.
  • the first transaction collection module 610 executes the first batch of transactions in batch order Consensus operations on batches of transactions that have been collected but have not yet completed consensus in the N+1 round of consensus proposals.
  • the first transaction confirmation module 640 sends a transaction confirmation request of the transaction execution result of the first batch of transactions to other blockchain nodes of the blockchain. Afterwards, if the transaction confirmation feedback sent by 2f other blockchain nodes is received, it is confirmed that the transaction confirmation of the first batch of transactions is obtained, and f is the maximum number of abnormal consensus nodes allowed by the blockchain.
  • the blockchain node shown in Figure 6 of the embodiment of this specification also includes:
  • the first transaction feedback module after obtaining the transaction confirmation of the first batch of transactions, feeds back the transaction execution results of the first batch of transactions to the corresponding block chain client; or, after obtaining the Nth After the transaction confirmation of all batches of transactions proposed by the consensus round, the transaction execution results of all batches of transactions proposed by the Nth round of consensus are fed back to the corresponding blockchain client.
  • the first transaction collection module 610 collects all batches of transactions in the N-th round of consensus proposals through a first thread, and the first thread does not collect other batches of transactions before collecting one batch of transactions.
  • the first transaction consensus module 620 executes consensus operations on all batches of transactions in the N-th round of consensus proposals through the second thread, and the second thread does not execute other batches of transactions before completing the consensus operation of a batch of transactions consensus operation.
  • the first transaction execution module 630 executes the execution operations of all batches of transactions in the N-th round consensus proposal through the third thread, and the third thread does not execute other batches before executing the execution operation of one batch of transactions
  • Transaction execution operation: the first transaction confirmation module 640 executes the transaction confirmation of all batches of transactions in the Nth round of consensus proposals through the fourth thread.
  • the first transaction block writing module 650 executes block writing operations on all batches of transactions in the Nth round of consensus proposals through the fifth thread. Wherein, the first thread, the second thread, the third thread, the fourth thread and the fifth thread are threads executed in parallel.
  • the second thread after the first thread collects the first batch of transactions, notify the second thread to perform a consensus operation on the first batch of transactions; After the consensus operation of a batch of transactions, notify the third thread to perform operations on the first batch of transactions; after the third thread executes the execution operations of the first batch of transactions, notify the The fourth thread performs transaction confirmation on the first batch of transactions.
  • the block chain node shown in FIG. 6 can be used as the execution subject of the processing method shown in FIG. 1 above, so it can realize the functions realized by the processing method in FIG. 1 to FIG. 3 . Since the principle is the same, this article will not repeat them.
  • FIG. 7 is a schematic structural diagram of a block chain node 700 in the embodiment of this specification, including:
  • the second transaction collection module 710 collects the first batch of transactions in the Nth round of consensus proposals of the blockchain, where the Nth round of consensus proposals includes multiple batches of transactions, where N is a positive integer;
  • the second transaction consensus module 720 performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, the transaction collection module simultaneously executes the collection operation of the second batch of transactions in batch order in parallel , wherein, the second batch of transactions is a batch of transactions that the N round of consensus proposals have not yet completed collection;
  • the second transaction execution module 730 if all batches of transactions proposed by the N-th round of consensus have completed consensus, perform transaction execution operations on all batches of transactions proposed by the N-th round of consensus;
  • the second transaction confirmation module 740 sends the transaction execution result of the first batch of transactions in the block chain to perform transaction confirmation on the first batch of transactions;
  • the second transaction block writing module 750 executes a block writing operation on all batches of transactions proposed by the N-th round of consensus after obtaining the transaction confirmations of all the batches of transactions proposed by the N-th round of consensus.
  • the second transaction collection module 710 executes the batch order The collection operation of batch transactions in N+1 rounds of consensus proposals.
  • the second transaction collection module 710 executes in parallel the processing of the second batch of transactions in batch order collection operation.
  • the second transaction collection module 710 performs batch order The collection operation of batch transactions in N+1 rounds of consensus proposals.
  • the second transaction collection module 710 executes the batch order The collection operation of batch transactions in N+1 rounds of consensus proposals.
  • the second transaction collection module 710 executes the batch order Consensus operations on batches of transactions that have been collected but have not yet completed consensus in the N+1 round of consensus proposals.
  • the second transaction confirmation module 740 sends a transaction confirmation request of the transaction execution result of the first batch of transactions to other blockchain nodes of the blockchain. Afterwards, if the transaction confirmation feedback sent by 2f other blockchain nodes is received, it is confirmed that the transaction confirmation of the first batch of transactions is obtained, and f is the maximum number of abnormal consensus nodes allowed by the blockchain.
  • the blockchain node shown in Figure 7 of the embodiment of this specification also includes:
  • the second transaction feedback module after obtaining the transaction confirmation of all batches of transactions proposed by the Nth round of consensus, feeds back the transaction execution results of all batches of transactions proposed by the Nth round of consensus to the corresponding blockchain client end.
  • the second transaction collection module 710 collects all batches of transactions in the N-th round of consensus proposals through a first thread, and the first thread does not collect other batches of transactions before collecting one batch of transactions.
  • the second transaction consensus module 720 executes consensus operations on all batches of transactions in the N-th round of consensus proposals through the second thread, and the second thread does not execute other batches of transactions before completing the consensus operation of a batch of transactions consensus operation.
  • the second transaction execution module 730 executes the execution operation of all batches of transactions in the Nth round of consensus proposals through the third thread; the second transaction confirmation module 740 executes all batches of transactions in the Nth round of consensus proposals through the fourth thread Transaction confirmation for batch transactions.
  • the second transaction block writing module 750 executes block writing operations on all batches of transactions in the N-th round of consensus proposals through the fifth thread. Wherein, the first thread, the second thread, the third thread, the fourth thread and the fifth thread are threads executed in parallel.
  • the second thread is notified to perform a consensus operation on the first batch of transactions.
  • block chain node node shown in FIG. 7 can be used as the execution body of the processing method shown in FIG. 4 above, so it can realize the functions realized by the processing method in FIG. 4 and FIG. 5 . Since the principle is the same, this article will not repeat them.
  • Fig. 8 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. 8 , 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 to form a processing device for blockchain transactions on a logical level, which can be used as the block shown in Figure 6 A chain node or 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 processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to form a processing device for blockchain transactions on a logical level, which can be used as the block shown in Figure 7 A chain node or 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 transaction execution results of all batches of transactions proposed by the Nth round of consensus are sent in the block chain to perform transaction confirmation on all batches of transactions proposed by the Nth round of consensus.
  • a processor may be an integrated circuit chip with signal processing capabilities.
  • 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 method disclosed in the embodiments of this specification may 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 can 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 execute the method of the embodiment shown in FIG. 1 , and is specifically used to perform the following methods:
  • the above instructions when executed by a portable electronic device including multiple application programs, can cause the portable electronic device to execute the method of the embodiment shown in FIG. 4 , and are specifically used to execute the following methods:
  • the transaction execution results of all batches of transactions proposed by the Nth round of consensus are sent in the block chain to perform transaction confirmation on all batches of transactions proposed by the Nth round of consensus.
  • the block chain node shown in FIG. 6 can realize the functions of the embodiments shown in FIG. 1 to FIG.
  • the block chain node shown realizes the functions of the embodiments shown in Fig. 4 and Fig. 5 . Since the principle is the same, this article will not repeat them.

Landscapes

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

Abstract

Sont prévus dans les modes de réalisation de la présente description un procédé de traitement de transactions de chaîne de blocs, un nœud de chaîne de blocs et un dispositif électronique. Le procédé consiste à : collecter un premier lot de transactions qui sont impliquées dans un nième cycle de proposition de consensus d'une chaîne de blocs ; exécuter une opération de consensus sur le premier lot de transactions, et s'il existe un deuxième lot de transactions, exécuter, en parallèle, une opération de collecte sur le deuxième lot de transactions selon une séquence de lot, le deuxième lot de transactions étant un lot de transactions qui n'ont pas été collectées dans le nième cycle de proposition de consensus ; effectuer une opération d'exécution de transaction sur le premier lot de transactions, et s'il existe un troisième lot de transactions, exécuter, en parallèle, une opération de consensus sur le troisième lot de transactions selon la séquence de lot, le troisième lot de transactions étant un lot de transactions qui ont été collectées dans le nième cycle de proposition de consensus et n'ont pas été soumises à un consensus ; envoyer dans la chaîne de blocs un résultat d'exécution de transaction du premier lot de transactions de façon à effectuer une confirmation de transaction sur le premier lot de transactions ; et après que les confirmations de transaction de tous les lots de transactions dans le nième cycle de proposition de consensus sont obtenues, exécuter une opération d'écriture de bloc sur tous les lots de transactions dans le nième cycle de proposition de consensus.
PCT/CN2022/135613 2022-02-24 2022-11-30 Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique WO2023160092A1 (fr)

Applications Claiming Priority (2)

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

Publications (1)

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

Family

ID=81624334

Family Applications (1)

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

Country Status (2)

Country Link
CN (1) CN114529413A (fr)
WO (1) WO2023160092A1 (fr)

Families Citing this family (2)

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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221639A (zh) * 2020-01-09 2020-06-02 杭州趣链科技有限公司 一种区块链平台的区块流水线执行方法
CN112887436A (zh) * 2021-04-28 2021-06-01 支付宝(杭州)信息技术有限公司 一种共识方法、共识节点和流水线方式的区块链系统
US20210318859A1 (en) * 2020-04-13 2021-10-14 International Business Machines Corporation Optimization of execution of smart contracts
CN114529413A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备
CN114547201A (zh) * 2022-02-24 2022-05-27 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221639A (zh) * 2020-01-09 2020-06-02 杭州趣链科技有限公司 一种区块链平台的区块流水线执行方法
US20210318859A1 (en) * 2020-04-13 2021-10-14 International Business Machines Corporation Optimization of execution of smart contracts
CN112887436A (zh) * 2021-04-28 2021-06-01 支付宝(杭州)信息技术有限公司 一种共识方法、共识节点和流水线方式的区块链系统
CN114529413A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备
CN114547201A (zh) * 2022-02-24 2022-05-27 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2023160092A1 (fr) Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
WO2023160088A1 (fr) Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
TWI714847B (zh) 區塊鏈共識網路中處理共識請求的方法、裝置和電子設備
WO2016011811A1 (fr) Procédé et appareil de gestion de mémoire, et support de stockage
CN113918101B (zh) 一种写数据高速缓存的方法、系统、设备和存储介质
CN111324427B (zh) 一种基于dsp的任务调度方法及装置
JP2008198202A (ja) メモリシステム及びそのシステムの命令の取扱方法
WO2022166673A1 (fr) Procédé et appareil de traitement de transaction dans une chaîne de blocs, et dispositif électronique
WO2020168933A1 (fr) Procédé, dispositif et terminal de traitement de demande de réseau et support de stockage
US11537453B2 (en) Multithreaded lossy queue protocol
WO2023045203A1 (fr) Procédé de planification de tâche, puce et dispositif électronique
CN111142938A (zh) 一种异构芯片的任务处理方法、任务处理装置及电子设备
US10277246B2 (en) Program counter compression method and hardware circuit thereof
CN109213828B (zh) 区块生成方法、装置、设备及存储介质
CN111399911A (zh) 一种基于多核异构计算的人工智能开发方法及装置
CN103995827A (zh) MapReduce计算框架中的高性能排序方法
US20240095172A1 (en) Data packet processing method and appratus
AU2019241002B2 (en) Transaction processing method and system, and server
CN114218135A (zh) 一种基于Redis缓存的源端流控方法及系统
US8589584B2 (en) Pipelining protocols in misaligned buffer cases
WO2023160086A1 (fr) Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
CN113867796B (zh) 利用多状态机提高读性能的协议转换桥及实现方法
WO2020253575A1 (fr) Procédé et dispositif de détermination de nombre d'itérations de décodeur, support de stockage et dispositif électronique
CN112433672B (zh) 一种固态硬盘读方法和装置
CN109241362B (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: 22928352

Country of ref document: EP

Kind code of ref document: A1