+

HK40017316A - Parallel execution of transactions in blockchain network - Google Patents

Parallel execution of transactions in blockchain network Download PDF

Info

Publication number
HK40017316A
HK40017316A HK62020007769.6A HK62020007769A HK40017316A HK 40017316 A HK40017316 A HK 40017316A HK 62020007769 A HK62020007769 A HK 62020007769A HK 40017316 A HK40017316 A HK 40017316A
Authority
HK
Hong Kong
Prior art keywords
transactions
transaction
blockchain network
blockchain
execute
Prior art date
Application number
HK62020007769.6A
Other languages
Chinese (zh)
Other versions
HK40017316B (en
Inventor
夏凝
谢桂鲁
邓福喜
Original Assignee
创新先进技术有限公司
Filing date
Publication date
Application filed by 创新先进技术有限公司 filed Critical 创新先进技术有限公司
Publication of HK40017316A publication Critical patent/HK40017316A/en
Publication of HK40017316B publication Critical patent/HK40017316B/en

Links

Description

Parallel execution of transactions in a blockchain network
Background
Distributed Ledger System (DLS), which may also be referred to as a consensus network and/or a blockchain network, enables participating entities to securely and tamperproof store data. Without reference to any particular use case, DLS is often referred to as a blockchain network. Example types of blockchain networks may include public blockchain networks, private blockchain networks, and federation blockchain networks. A federated blockchain network is provided for a selected group of entities that controls the consensus process and includes an access control layer.
One problem encountered in blockchain networks is the speed with which transactions are processed. Typically, nodes in a blockchain network process transactions in the order in which they were submitted. This may result in a decrease in transaction throughput and cause a delay between submitting the transaction and clearing the transaction.
A technique that addresses these transaction execution issues in blockchain networks would be advantageous.
Disclosure of Invention
Embodiments herein include a computer-implemented method for performing transactions in parallel in a blockchain network. More particularly, embodiments herein relate to executing a transaction group having a shared dependency in parallel with other groups.
In some implementations, the actions include: identifying a plurality of transactions to be executed in a blockchain, wherein the transactions are arranged in an execution order, and the execution order includes contract invocations arranged after the plurality of transactions; identifying transaction groups within the plurality of transactions, wherein each transaction in each group and other transactions in the group are associated with the same account within the blockchain network; instructing nodes in the blockchain network to execute each of the transaction groups in parallel, wherein executing each of the transaction groups comprises executing transactions within that group serially according to the execution order; determining that the node in the blockchain network has completed execution of all of the transaction groups; and in response to determining that the node in the blockchain network has completed execution of all of the transaction groups, instructing the node in the blockchain network to execute the contract invocation. Other embodiments include corresponding systems, apparatus, and computer programs, encoded on computer storage devices, configured to perform the actions of the methods.
These and other embodiments may each optionally include one or more of the following features:
in some cases, instructing nodes in the blockchain network to execute each of the transaction groups in parallel includes: the method further includes instructing the first set of nodes to execute a first transaction group and instructing the first set of nodes to execute a second transaction group.
In some embodiments, determining that the node in the blockchain network has completed execution of all of the transaction groups comprises: determining that all transactions of the plurality of transactions have been included in one or more tiles stored in a tile chain maintained by the tile chain network.
In some embodiments, the method comprises: determining that the node in the blockchain network has completed execution of the contract invocation; identifying a plurality of second transactions to be executed in a blockchain, wherein the plurality of second transactions are ordered in the execution order after the contract invocation; identifying a second transaction group within the plurality of second transactions; and instructing nodes in the blockchain network to execute each of the second transaction groups in parallel, wherein executing each second transaction group comprises executing transactions within the second group serially according to the execution order.
In some cases, instructing nodes in the blockchain network to execute each of the transaction groups in parallel includes: sending a message to the node over the network.
In some cases, identifying the plurality of transactions to be performed in the blockchain includes: receiving a transaction broadcast to the blockchain network.
In some implementations, the contract invocation is a request to execute an intelligent contract stored on a blockchain maintained by the blockchain network.
Also provided herein are one or more non-transitory computer-readable storage media coupled to one or more processors and having instructions stored thereon, which, when executed by the one or more processors, cause the one or more processors to perform operations in accordance with embodiments of the methods provided herein.
Also provided herein are systems for implementing the methods provided herein. The system includes one or more processors and a computer-readable storage medium coupled to the one or more processors and having instructions stored thereon, which, when executed by the one or more processors, cause the one or more processors to perform operations in accordance with embodiments of the methods provided herein.
It should be appreciated that methods in accordance with the present disclosure may include any combination of the aspects and features described herein. That is, methods according to the present disclosure are not limited to the combinations of aspects and features specifically described herein, but also include any combination of the aspects and features provided.
The details of one or more embodiments of the disclosure are set forth in the accompanying drawings and the description below. Other features and advantages will be apparent from the text and drawings, and from the claims.
Drawings
FIG. 1 depicts an example of an environment that may be used to implement embodiments herein.
Fig. 2 depicts an example of a conceptual architecture according to embodiments herein.
Fig. 3A depicts an example of an execution sequence of transactions within a blockchain network according to embodiments herein.
Fig. 3B depicts an example of a parallel execution sequence of transactions within a blockchain network according to embodiments herein.
Fig. 4 depicts an example of a process that may be performed according to embodiments herein.
Fig. 5 depicts an example of modules of an apparatus according to embodiments herein.
Like reference symbols in the various drawings indicate like elements.
Detailed Description
Embodiments herein include a computer-implemented method for performing transactions in parallel in a blockchain network. More particularly, embodiments herein relate to executing a transaction group having a shared dependency in parallel with other groups. In some implementations, the actions include: identifying a plurality of transactions to be executed in a blockchain, wherein the transactions are arranged in an execution order, and the execution order includes contract invocations arranged after the plurality of transactions; identifying transaction groups within the plurality of transactions, wherein each transaction in each group and other transactions in the group are associated with the same account within the blockchain network; instructing nodes in the blockchain network to execute each transaction group in parallel, wherein executing each transaction group comprises executing transactions within the group in series according to the execution order; determining that the nodes in the blockchain network have completed execution of all transaction groups; and in response to determining that the node in the blockchain network has completed execution of all transaction groups, instructing the node in the blockchain network to execute the contract invocation.
Further background is provided for embodiments herein, and as noted above, Distributed Ledger Systems (DLSs), which may also be referred to as consensus networks (e.g., consisting of point-to-point nodes) and blockchain networks, enable participating entities to securely and non-tamperproof conduct transactions and store data. The term blockchain as used herein generally refers to DLS without reference to any particular use case.
Blockchains are data structures that store transactions in a manner that they are not tamperproof and can subsequently be verified. A block chain includes one or more blocks. Each block in the chain is linked to the immediately preceding block in the chain by a cryptographic hash value (cryptographic hash) that contains the preceding block. Each tile also includes a timestamp, its own cryptographic hash value, and one or more transactions. Transactions that have been verified by nodes in the blockchain network are hashed and compiled into merkel (Merkle) trees. A Merkle tree is a data structure in which data at leaf nodes of the tree is hashed and all hash values in each branch of the tree are concatenated at the root of the branch. This process continues down the tree until the root of the entire tree, where hash values representing all of the data in the tree are stored. Whether the hash value is a hash value of a transaction stored in the tree can be quickly verified by determining whether the hash value is consistent with the structure of the tree.
A blockchain is a data structure used to store transactions, while a blockchain network is a network of computing nodes used to manage, update, and maintain one or more blockchains. As described above, the blockchain network may be provided as a public blockchain network, a private blockchain network, or a federated blockchain network. In a public blockchain network, the consensus process is controlled by nodes of the consensus network. For example, hundreds, thousands, or even millions of entities may cooperate to operate a public blockchain network, each entity operating at least one node in the public blockchain network. Thus, a public blockchain network may be considered a public network with respect to participating entities. In some examples, most entities (nodes) must sign each block to make the block valid and be added to the blockchain (distributed ledger) of the blockchain network. Exemplary public blockchain networks include point-to-point payment networks that utilize a distributed ledger (i.e., blockchain). As noted above, the term blockchain is generally used to refer to a distributed ledger without specifying any particular blockchain network.
Typically, a federated blockchain network is private between the participating entities. In a federated blockchain network, consensus processes are controlled by a set of authorized nodes, one or more of which are operated by respective entities (e.g., financial institutions, insurance companies). For example, a federation of ten (10) entities (e.g., financial institutions, insurance companies) may operate a federated blockchain network, and each entity may operate at least one node in the federated blockchain network. Thus, a federated blockchain network can be considered a private network associated with the participating entities. In some examples, each entity (node) must sign each chunk in order for the chunk to be valid and added to the chain of chunks. In some examples, at least a subset of the entities (nodes) (e.g., at least 7 entities) must sign each tile in order for the tile to be valid and added to the tile chain.
The embodiments herein may be implemented in any suitable type of blockchain network.
In view of the above background, embodiments herein are described in further detail herein. More specifically, and as described above, embodiments herein relate to executing a transaction group having a shared dependency in parallel with other groups. Because the transactions in different groups are not related to each other (e.g., do not affect the same account in the blockchain network), the order in which the transactions in different groups are performed relative to each other does not affect the overall state of the blockchain network. Thus, these transactions may be performed in parallel, which may result in an increase in throughput for transactions in the blockchain network.
FIG. 1 depicts an example of an environment 100 that may be used to implement embodiments herein. In some examples, environment 100 enables entities to participate in a public blockchain network 102. The environment 100 includes computing devices 106, 108 and a network 110. In some examples, the network 110 includes a Local Area Network (LAN), a Wide Area Network (WAN), the internet, or a combination thereof, and connects network sites, user devices (e.g., computing devices), and backend systems. In some examples, network 110 may be accessed through wired and/or wireless communication links. In some examples, the network 110 enables communication with the public blockchain network 102 and communication within the public blockchain network 102. In general, the network 110 represents one or more communication networks. In some cases, the computing devices 106, 108 may be nodes of a cloud computing system (not shown), or each computing device 106, 108 may be a separate cloud computing system that includes multiple computers interconnected by a network and functions as a distributed processing system.
In the depicted example, computing systems 106, 108 may each comprise any suitable computing system capable of participating as a node in public blockchain network 102. Examples of computing devices include, but are not limited to, servers, desktop computers, laptop computers, tablet computing devices, and smart phones. In some examples, the computing systems 106, 108 carry one or more computer-implemented services for interacting with the public blockchain network 102. For example, the computing system 106 may host a computer-implemented service, such as a transaction management system, of a first entity (e.g., participant a) that the first entity uses to manage its transactions with one or more other entities (e.g., other participants). The computing system 108 may host a computer-implemented service, such as a transaction management system, of a second entity (e.g., participant B), e.g., which the second entity uses to manage its transactions with one or more other entities (e.g., other participants). In the example of fig. 1, the public blockchain network 102 is represented as a Peer-to-Peer network of nodes (Peer-to-Peer network), and the computing systems 106, 108 provide nodes of first and second entities, respectively, participating in the public blockchain network 102.
Fig. 2 depicts an example of a conceptual architecture 200 according to embodiments herein. An example of the concept architecture 200 includes participant systems 202, 204, 206 corresponding to participant a, participant B, and participant C, respectively. Each participant (e.g., user, enterprise) participates in a blockchain network 212 provided as a peer-to-peer network that includes a plurality of nodes 214, at least some of which record information in a blockchain 216 without tampering. As further detailed in the figure, although a single blockchain 216 is schematically depicted in blockchain network 212, multiple copies of blockchain 216 are provided and maintained on blockchain network 212.
In the depicted example, each participant system 202, 204, 206 is provided by or represents participant a, participant B, and participant C, respectively, and functions as a respective node 214 in the blockchain network. As used herein, a node generally refers to an individual system (e.g., computer, server) that is connected to the blockchain network 212 and enables the respective participants to participate in the blockchain network. In the example of fig. 2, a participant corresponds to each node 214. However, it is contemplated that one participant may operate multiple nodes 214 within blockchain network 212, and/or that multiple participants may share a node 214. In some examples, the participant systems 202, 204, 206 communicate with or through the blockchain network 212 using a protocol (e.g., hypertext transfer protocol secure (HTTPS)) and/or using Remote Procedure Calls (RPCs).
The nodes 214 may have different degrees of participation within the blockchain network 212. For example, some nodes 214 may participate in the consensus process (e.g., as a monitoring node that adds tiles to the blockchain 216), while other nodes 214 do not participate in this consensus process. As another example, some nodes 214 store a complete copy of blockchain 216, while other nodes 214 store only a copy of a portion of blockchain 216. For example, the data access privileges may restrict blockchain data stored by the respective participants within their respective systems. In the example of fig. 2, the participant systems 202, 204, 206 store respective full copies 216', 216 "' of the blockchain 216.
A blockchain (e.g., blockchain 216 of fig. 2) consists of a series of blocks, each block storing data. Examples of data include transactional data representing transactions between two or more participants. Although "transaction" is used herein by way of non-limiting example, it is contemplated that any suitable data may be stored in the blockchain (e.g., documents, images, video, audio). Examples of transactions may include, but are not limited to, exchanges of value (e.g., assets, products, services). Transaction data is stored in the blockchain in a tamperproof manner. That is, the transaction data cannot be changed.
The transaction data is hashed prior to being stored in the chunk. The hash process is a process of converting transaction data (provided as character string data) into a fixed-length hash value (also provided as character string data). It is not possible to perform a de-hash process (un-hash) on the hash value to obtain the transaction data. The hashing process may ensure that even slight changes in the transaction data result in an entirely different hash value. Further, as described above, the hash value has a fixed length. That is, the length of the hash value is fixed regardless of the size of the transaction data. The hash process includes processing the transaction data through a hash function to generate a hash value. Examples of hash functions include, but are not limited to, Secure Hash Algorithm (SHA) -256, which outputs a 256-bit hash value.
Transaction data for a plurality of transactions is hashed and stored in a block. For example, hash values for two transactions are provided, and themselves are hashed to provide another hash value. This process is repeated until a single hash value is provided for all transactions to be stored in the block. This hash value is called the Merkle root hash value and is stored in the header of the chunk. Any change in a transaction causes its hash value to change and ultimately the Merkle root hash value to change.
The blocks are added to the block chain by a consensus protocol. Multiple nodes in a blockchain network participate in a consensus protocol and compete for adding a block to the blockchain. Such nodes are called miners (or monitoring nodes). The POWs introduced above are used as non-limiting examples.
The miner node performs a consensus process to add the transaction to the blockchain. Although multiple miner nodes participate in the consensus process, only one miner node may write a block into the blockchain. That is, the miners nodes compete in the consensus process to add their blocks to the blockchain. In more detail, the miner node periodically collects pending transactions from the transaction pool (e.g., up to a predetermined limit, if any, on the number of transactions that may be included in the block). The transaction pool includes transaction messages from participants in the blockchain network. The miner node creates a block and adds the transaction to the block. Before adding the plurality of transactions to the tiles, the miner node checks whether any of the plurality of transactions are already contained in the tiles of the blockchain. If a transaction is already contained in another block, the transaction will be discarded.
The mineworker node generates a chunk header, hashes all transactions in the chunk, and combines the resulting hash values in pairs to generate further hash values until a single hash value (Merkle root hash value) is provided for all transactions in the chunk. This hash value is added to the block header. The miners also determine the hash value of the nearest chunk in the blockchain (i.e., the last chunk added to the blockchain). The miner node also adds a random number (nonce) and a timestamp to the block header. In the mining process, the mineworker node attempts to find a hash value that satisfies the required parameters. The miners' nodes continually change the random numbers until hash values are found that meet the required parameters.
Each miner in the blockchain network attempts to find a hash value that satisfies the required parameters and competes with each other in this manner. Eventually, one of the miners finds a hash value that satisfies the required parameter and advertises it to all other miners in the blockchain network. Other miners nodes verify the hash value, and if determined to be correct, verify each transaction in the block, accept the block, and append the block to their blockchain copy. In this way, the global state of the blockchain is consistent across all miner nodes within the blockchain network. The above process is a POW consensus protocol.
A non-limiting example is provided with reference to fig. 2. In this example, participant a wants to send an amount to participant B. Participant a generates a transaction message (e.g., including the sender, receiver, and value fields) and sends the transaction message to the blockchain network, thereby adding the transaction message to the transaction pool. Each mineworker node in the blockchain network creates a block, takes all transactions from the transaction pool (e.g., up to a predetermined limit, if any, on the number of transactions that can be added to the block), and adds transactions to the block. In this manner, the transaction issued by participant a is added to the block of the miner node.
In some blockchain networks, cryptography is used to maintain privacy of transactions. For example, two nodes may encrypt transaction data if they want to maintain transaction privacy so that other nodes in the blockchain network cannot see the details of the transaction. Examples of encryption methods include, but are not limited to, symmetric encryption and asymmetric encryption. Symmetric encryption refers to an encryption process that uses a single key to both encrypt (generate ciphertext from plaintext) and decrypt (generate plaintext from ciphertext). In symmetric encryption, the same key may be used for multiple nodes, so each node may encrypt/decrypt transaction data.
Asymmetric encryption uses key pairs, each key pair comprising a private key and a public key, the private key being known only to the respective node, and the public key being known to any or all other nodes in the blockchain network. A node may encrypt data using a public key of another node, and the encrypted data may be decrypted using a private key of the other node. For example, referring again to fig. 2, participant a may encrypt data using participant B's public key and send the encrypted data to participant B. Participant B can use its private key to decrypt the encrypted data (ciphertext) and extract the original data (plaintext). Messages encrypted using a node's public key can only be decrypted using the node's private key.
Asymmetric encryption is used to provide a digital signature that enables a participant in a transaction to confirm the other participants in the transaction and the validity of the transaction. For example, a node may digitally sign a message, and another node may confirm that the message was sent by the node based on the digital signature of participant a. Digital signatures may also be used to ensure that messages are not tampered with during transmission. For example, referring again to fig. 2, participant a will send a message to participant B. Participant a generates a hash value of the message and then encrypts the hash value using its private key to provide a digital signature that is an encrypted hash value. Participant a appends the digital signature to the message and sends the message with the digital signature to participant B. Participant B decrypts the digital signature using participant a's public key and extracts the hash value. Participant B hashes the message and compares the hash values. If the hash values are the same, participant B can confirm that the message did indeed come from participant A and has not been tampered with.
Providing further context for embodiments herein, fig. 3A depicts an example of an execution sequence 300 of transactions within a blockchain network according to embodiments herein. As shown, the execution sequence 300 includes a plurality of transactions (305, 310, 315, 320) ordered according to a sequence to be executed by nodes in the blockchain network. Transactions 305a, 305b, and 305c are calls to smart contracts. In addition to smart contract invocations, the execution sequence 300 includes multiple transaction groups, with transactions within a transaction group sharing a common dependency (represented by cross-hatching), e.g., affecting the same account. Transactions 310a, 310b represent a first group, transactions 315a-e represent a second group, and transactions 320a-c represent a third group. As described below, according to embodiments herein, each transaction group may be executed in parallel by a node in the blockchain network.
Fig. 3B depicts an example of a parallel execution sequence 350 of transactions within a blockchain network according to embodiments herein. As shown, transaction groups 355, 360, 365, 370, and 375 have been identified in the parallel execution sequence 350. As shown and discussed in fig. 3B, nodes in the blockchain network may execute transaction groups in parallel. In some cases, all transactions within a group share a common dependency relationship and are therefore executed serially according to the original execution order. This ensures that the state (e.g., account balance) of the blockchain network after performing transactions according to the parallel execution sequence 350 is the same as the state of the blockchain network after performing transactions according to the execution sequence 300 in fig. 3A.
Consider the example where account a has a balance of $0 before performing any of the transactions in fig. 3B, where transaction 310a represents paying an amount of $300 from account B to account a, and transaction 310B represents paying $50 from account a to account C. If transactions 310a and 310b are executed serially (as originally described in execution sequence 300), then account A will first deposit $300 of funds and then pay out (debit) $50, leaving a balance of $ 250. However, if transactions 310a and 310b were not executed serially, and transaction 310b was executed before 310a, then account a would have a balance of $0 when executing the payment for transaction 310 b. Account a will not have a sufficient balance to fund the payment in this scenario, which may result in transaction 310b being rejected by the blockchain network.
Based on this example, consider the case where transaction 320a represents a payment of $100 from account D to account E. Because the accounts affected by transaction 320a (accounts D and E) do not include any accounts affected by transactions 310a and 310b (accounts A, B and C), transaction 320a has no common dependency with transactions 310a and 310 b. Thus, transaction 320a may be performed in parallel with transactions 310a and 310 b.
In some implementations, transactions to be performed serially may be grouped together. For example, as shown in FIG. 3B, transactions 310a-B are grouped in 355, transactions 315a, 315B, and 315c are grouped in 360, and transaction 320a is grouped in 365. Groups 355, 360, and 365 may all be performed in parallel by nodes in the blockchain network. Executing the transaction groups 355, 360, and 365 in parallel may result in increased transaction throughput over the blockchain network because the network then executes three transactions in parallel at any one time, rather than just one transaction as if all transactions were executed serially.
FIG. 3B also includes contract calls (contract calls) 305 a-c. Contract calls represent synchronization points at which parallel execution converges. Because the contract invocation results in the execution of the instructions that make up the intelligent contract, it may not be possible to determine the account scope that a particular contract invocation will affect. For example, consider a simple intelligent contract that takes a specific account and a payment amount as parameters and applies the payment amount to the specific account if certain conditions are true. Because a particular account is specified by the caller of this intelligent contract when the intelligent contract is invoked, it is not possible to determine which accounts will be affected by a particular invocation of the intelligent contract in accordance with the definition of the intelligent contract itself (i.e., its source code). To this end, in some embodiments, contract invocations may be considered transactions that may affect all accounts in the blockchain network and therefore cannot be performed in parallel with other transactions. Thus, the parallel execution order 350 converges upon reaching the contract invocation. For example, as shown, groups 355, 360, and 365 execute in parallel until contract call 305b is reached. At this point, the blockchain network begins to wait until all transactions in groups 355, 360, and 365 have completed execution, and then continues to execute smart contract call 305 b.
After contract call 305b completes, the blockchain network may again execute the transactional group in parallel (e.g., 370 and 375) until another intelligent contract call is encountered (e.g., 305c), at which point the parallel execution again converges before executing the intelligent contract call.
Fig. 4 depicts an example of a process 400 that may be performed in accordance with embodiments herein. In some implementations, process 400 may be performed using one or more computer-executable programs executed using one or more computing devices.
At 402, a plurality of transactions to be performed in a blockchain are identified. The transactions are arranged in an execution order that includes contract invocations arranged after the plurality of transactions. In some cases, identifying a plurality of transactions to be performed in a blockchain includes receiving transactions broadcast to a blockchain network. In some implementations, the contract invocation is a request to execute an intelligent contract stored in a blockchain maintained by a blockchain network.
At 404, transaction groups within a plurality of transactions are identified, wherein, for each group, each transaction in the group and other transactions in the group are associated with the same account within the blockchain network.
At 406, nodes in the blockchain network are instructed to execute each transaction group in parallel, wherein executing each transaction group includes executing transactions within the group serially according to the execution order. In some cases, instructing nodes in the blockchain network to execute each transaction group in parallel includes: the first set of nodes is instructed to execute a first transaction group and the first set of nodes is instructed to execute a second transaction group. In some implementations, instructing nodes in the blockchain network to perform each transaction group in parallel includes sending a message to the nodes over the network.
At 408, it is determined that the nodes in the blockchain network have completed execution of all transaction groups. In some embodiments, determining that a node in the blockchain network has completed execution of all transaction groups includes: determining that all transactions of the plurality of transactions have been included in one or more tiles stored in a blockchain maintained by a blockchain network.
At 410, in response to determining that the nodes in the blockchain network have completed execution of all transaction groups, the nodes in the blockchain network are instructed to execute contract invocations.
In some implementations, the process 400 includes: determining that a node in a blockchain network has completed execution of the contract invocation; identifying a plurality of second transactions to be executed in a blockchain, wherein the plurality of second transactions are ordered in the execution order after the contract invocation; identifying a second transaction group within the plurality of second transactions; and instructing nodes in the blockchain network to execute each second transaction group in parallel, wherein executing each second transaction group comprises executing transactions within the second group serially according to the execution order.
Fig. 5 depicts an example of modules of an apparatus 500 according to embodiments herein. Apparatus 500 may be an exemplary embodiment configured to enable parallel execution of transactions in a blockchain network, such as a federation blockchain network. The apparatus 500 may correspond to the above described embodiments, and the apparatus 500 comprises the following: a first identifier or first identification unit 502 for identifying a plurality of transactions to be executed in a blockchain, wherein the transactions are arranged in an execution order and the execution order comprises contract invocations arranged after the plurality of transactions; a second identifier or second identifying unit 504 for identifying transaction groups within the plurality of transactions, wherein each transaction in each group and other transactions in the group are associated with the same account within the blockchain network; a first indicator or first indication unit 506 for instructing nodes in the blockchain network to execute each transaction group in parallel, wherein executing each transaction group comprises executing transactions within the group serially according to the execution order; a determiner or determining unit 508 for determining that the nodes in the blockchain network have completed execution of all transaction groups; and a second indicator or second indication unit 510 for indicating a node in the blockchain network to execute a contract invocation in response to determining that the node in the blockchain network has completed execution of all transaction groups.
The systems, apparatuses, modules or units shown in the previous implementations may be implemented by using a computer chip or an entity, or may be implemented by using an article of manufacture having a specific function. A typical implementation device is a computer, which may be a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet, wearable device, or any combination of these devices.
For the implementation of the functions and roles of the individual units in the device, reference can be made to the implementation of the corresponding steps in the previous method. Details are omitted here for simplicity.
Since the device implementation substantially corresponds to the method implementation, reference can be made to the relevant description in the method implementation for the relevant parts. The previously described device implementations are merely examples. Elements described as separate parts may or may not be physically separate and parts shown as elements may or may not be physical elements, may be located in one position, or may be distributed over a plurality of network elements. Some or all of the modules may be selected based on actual needs to achieve the objectives of the solution of the present description. Those of ordinary skill in the art will understand and appreciate the embodiments of the present application without undue experimentation.
Referring again to fig. 5, it may be interpreted to show the internal functional modules and structures of an apparatus for implementing parallel execution of transactions in a blockchain network. The parallel execution apparatus may be an example of an apparatus configured to implement parallel execution of transactions in a blockchain network.
Implementations of the subject matter, acts, and operations described in this specification can be implemented in digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware, including the structures disclosed in this specification and their structural equivalents, or combinations of one or more of them. Implementations of the subject matter described in this specification can be implemented as one or more computer programs, e.g., one or more modules of computer program instructions, encoded on a computer program carrier for execution by, or to control the operation of, data processing apparatus. The carrier may be a tangible, non-transitory computer storage medium. Alternatively or additionally, the carrier may be an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by the data processing apparatus. The computer storage medium may be or be partially a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Computer storage media is not a propagated signal.
The term "data processing apparatus" includes all types of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The data processing apparatus may comprise special purpose logic circuitry, e.g., an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit), or a GPU (graphics processing unit). In addition to hardware, the apparatus can include code that creates an execution environment for the computer program, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
A computer program can also be referred to or described as a program, software application, app, module, software module, engine, script, or code and can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages; it can be deployed in any form, including as a stand-alone program or as a module, component, engine, subroutine, or other unit suitable for execution in a computing environment, which may include one or more computers interconnected by a communications data network at one or more locations.
A computer program may, but need not, correspond to a file in a file system. The computer program may be stored in: a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document; a single file dedicated to the program in question; or multiple coordinated files, such as files that store one or more modules, sub programs, or portions of code.
The processes and logic flows described in this specification can be performed by one or more computers executing one or more computer programs to perform operations by operating on input data and generating output. The processes and logic flows can also be performed by, and in combination with, special purpose logic circuitry, e.g., an FPGA, an ASIC, a GPU, etc., and one or more programmed computers.
A computer suitable for executing a computer program may be based on a general and/or special purpose microprocessor, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and/or a random access memory. Elements of a computer may include a central processing unit for executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory can be supplemented by, or integrated in, special purpose logic circuitry.
Typically, the computer will also be coupled to at least one non-transitory computer-readable storage medium (also referred to as computer-readable memory). The storage medium coupled to the computer may be an internal element of the computer (e.g., an integrated hard drive) or an external element (e.g., a Universal Serial Bus (USB) hard drive or a network accessible storage system). Examples of storage media may include, for example, magnetic, magneto-optical disks, or optical disks, solid-state drives, network storage resources such as cloud storage systems, or other types of storage media. However, a computer need not have such devices. Moreover, a computer may be embedded in another device, e.g., a mobile telephone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, e.g., a Universal Serial Bus (USB) flash drive, to name a few.
To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on or configured to communicate with a computer having: a display device, e.g., an LCD (liquid crystal display) monitor, for displaying information to a user; and input devices through which a user may provide input to the computer, such as a keyboard and a pointing device, such as a mouse, trackball or touch pad. Other types of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and may receive any form of input from the user, including acoustic, speech, or tactile input. Further, the computer may interact with the user by sending and receiving documents to and from the device used by the user; for example, by sending a web page to a web browser on the user device in response to a request received from the web browser, or by interacting with an application (app) running on the user device, such as a smartphone or electronic tablet. In addition, the computer may interact with the user by sending text messages or other forms of messages in turn to a personal device (e.g., a smartphone running a messaging application) and receiving response messages from the user.
This description uses the term "configured to" in connection with systems, apparatuses, and computer program components. For a system of one or more computers configured to perform particular operations or actions, it is meant that the system has installed thereon software, firmware, hardware, or a combination thereof that, when executed, causes the system to perform the operations or actions. For one or more computer programs configured to perform specific operations or actions, it is meant that the one or more programs include instructions, which when executed by a data processing apparatus, cause the apparatus to perform the operations or actions. By dedicated logic circuitry configured to perform a particular operation or action is meant that the circuitry has electronic logic to perform the operation or action.
While this specification contains many specific implementation details, these should not be construed as limitations on the scope of the claims, which are defined by the claims themselves, but rather as descriptions of specific features of particular embodiments. Particular features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, while operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as: it may be desirable to perform the operations in the particular order shown, or in sequence, or to perform all of the operations shown, in order to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Moreover, the division of the various system modules and components in the embodiments described above should not be understood as requiring such division in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not require the particular order shown, or sequence, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.

Claims (20)

1. A computer-implemented method for performing transactions in parallel in a blockchain network, the method comprising:
identifying a plurality of transactions to be executed in the blockchain, wherein the transactions are arranged in an execution order, and the execution order includes contract invocations arranged after the plurality of transactions;
identifying transaction groups within the plurality of transactions, wherein each transaction in each group and other transactions in the group are associated with the same account within the blockchain network;
instructing nodes in the blockchain network to execute each of the transaction groups in parallel, wherein executing each of the transaction groups comprises executing transactions within that group serially according to the execution order;
determining that the node in the blockchain network has completed execution of all of the transaction groups; and
instructing the node in the blockchain network to execute the contract invocation in response to determining that the node in the blockchain network has completed execution of all of the transaction groups.
2. The method of claim 1, wherein instructing nodes in the blockchain network to execute each of the transaction groups in parallel comprises:
instructing the first set of nodes to execute the first transaction group; and
the first set of nodes is instructed to execute a second transaction group.
3. The method of claim 1, wherein determining that the node in the blockchain network has completed execution of all of the transaction groups comprises:
determining that all transactions of the plurality of transactions have been included in one or more tiles stored in a tile chain maintained by the tile chain network.
4. The method of claim 1, further comprising:
determining that the node in the blockchain network has completed execution of the contract invocation;
identifying a plurality of second transactions to be executed in the blockchain, wherein the plurality of second transactions are ordered in the execution order after the contract invocation;
identifying a second transaction group within the plurality of second transactions; and
instructing nodes in the blockchain network to execute each of the second transaction groups in parallel, wherein executing each second transaction group includes executing transactions within the second group serially according to the execution order.
5. The method of claim 1, wherein instructing nodes in the blockchain network to execute each of the transaction groups in parallel comprises:
sending a message to the node over the network.
6. The method of claim 1, wherein identifying the plurality of transactions to be performed in the blockchain comprises:
receiving a transaction broadcast to the blockchain network.
7. A method as defined in claim 1, wherein the contract invocation is a request to execute an intelligent contract stored on a blockchain maintained by the blockchain network.
8. A non-transitory computer-readable storage medium coupled to one or more computers and having stored thereon instructions executable by the one or more computers for:
identifying a plurality of transactions to be executed in the blockchain, wherein the transactions are arranged in an execution order, and the execution order includes contract invocations arranged after the plurality of transactions;
identifying transaction groups within the plurality of transactions, wherein each transaction in each group and other transactions in the group are associated with the same account within the blockchain network;
instructing nodes in the blockchain network to execute each of the transaction groups in parallel, wherein executing each transaction group comprises executing transactions within that group serially according to the execution order;
determining that the node in the blockchain network has completed execution of all of the transaction groups; and
instructing the node in the blockchain network to execute the contract invocation in response to determining that the node in the blockchain network has completed execution of all of the transaction groups.
9. The non-transitory computer readable storage medium of claim 8, wherein instructing nodes in the blockchain network to execute each of the transaction groups in parallel comprises:
instructing the first set of nodes to execute the first transaction group; and
the first set of nodes is instructed to execute a second transaction group.
10. The non-transitory computer-readable storage medium of claim 8, wherein determining that the node in the blockchain network has completed execution of all of the transaction groups comprises:
determining that all transactions of the plurality of transactions have been included in one or more tiles stored in a tile chain maintained by the tile chain network.
11. The non-transitory computer-readable storage medium of claim 8, further comprising:
determining that the node in the blockchain network has completed execution of the contract invocation;
identifying a plurality of second transactions to be executed in the blockchain, wherein the plurality of second transactions are ordered in the execution order after the contract invocation;
identifying a second transaction group within the plurality of second transactions; and
instructing nodes in the blockchain network to execute each of the second transaction groups in parallel, wherein executing each second transaction group includes executing transactions within the second group serially according to the execution order.
12. The non-transitory computer readable storage medium of claim 8, wherein instructing nodes in the blockchain network to execute each of the transaction groups in parallel comprises:
sending a message to the node over the network.
13. The non-transitory computer readable storage medium of claim 8, wherein identifying the plurality of transactions to be performed in the blockchain comprises:
receiving a transaction broadcast to the blockchain network.
14. The non-transitory computer-readable storage medium of claim 8, wherein the contract invocation is a request to execute an intelligent contract stored on a blockchain maintained by the blockchain network.
15. A system, comprising:
one or more computers; and
one or more computer-readable memories coupled to the one or more computers and having stored thereon instructions executable by the one or more computers for:
identifying a plurality of transactions to be executed in the blockchain, wherein the transactions are arranged in an execution order, and the execution order includes contract invocations arranged after the plurality of transactions;
identifying transaction groups within the plurality of transactions, wherein each transaction in each group and other transactions in the group are associated with the same account within the blockchain network;
instructing nodes in the blockchain network to execute each of the transaction groups in parallel, wherein executing each transaction group comprises executing transactions within that group serially according to the execution order;
determining that the node in the blockchain network has completed execution of all of the transaction groups; and
instructing the node in the blockchain network to execute the contract invocation in response to determining that the node in the blockchain network has completed execution of all of the transaction groups.
16. The system of claim 15, wherein instructing nodes in the blockchain network to execute each of the transaction groups in parallel comprises:
instructing the first set of nodes to execute the first transaction group; and
the first set of nodes is instructed to execute a second transaction group.
17. The system of claim 15, wherein determining that the node in the blockchain network has completed execution of all of the transaction groups comprises:
determining that all transactions of the plurality of transactions have been included in one or more tiles stored in a tile chain maintained by the tile chain network.
18. The system of claim 15, further comprising:
determining that the node in the blockchain network has completed execution of the contract invocation;
identifying a plurality of second transactions to be executed in the blockchain, wherein the plurality of second transactions are ordered in the execution order after the contract invocation;
identifying a second transaction group within the plurality of second transactions; and
instructing nodes in the blockchain network to execute each of the second transaction groups in parallel, wherein executing each second transaction group includes executing transactions within the second group serially according to the execution order.
19. The system of claim 15, wherein instructing nodes in the blockchain network to execute each of the transaction groups in parallel comprises:
sending a message to the node over the network.
20. The system of claim 15, wherein identifying the plurality of transactions to be performed in the blockchain comprises:
receiving a transaction broadcast to the blockchain network.
HK62020007769.6A 2018-12-28 Parallel execution of transactions in blockchain network HK40017316B (en)

Publications (2)

Publication Number Publication Date
HK40017316A true HK40017316A (en) 2020-09-18
HK40017316B HK40017316B (en) 2023-09-22

Family

ID=

Similar Documents

Publication Publication Date Title
KR102234128B1 (en) Parallel execution of transactions on the blockchain network
US11381573B2 (en) Parallel execution of transactions in a blockchain network based on smart contract whitelists
US11354656B2 (en) Smart contract whitelists
CN111095325B (en) Parallel execution of transactions in a distributed ledger system
CN110998633A (en) Method and apparatus for avoiding double-flower problem in block chain technology based on read-write set model
HK40017316A (en) Parallel execution of transactions in blockchain network
HK40017316B (en) Parallel execution of transactions in blockchain network
HK40015346A (en) Parallel execution of transactions in a blockchain network based on smart contract whitelists
HK40016077A (en) Smart contract whitelists
HK40028647A (en) A method and apparatus to avoid the double-spending problem in blockchain technology
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载