Method and system for parallel processing of smart contracts on a permissioned blockchain

The parallel execution of smart contract dispatches in blockchain systems addresses the inefficiencies of serial execution, enhancing processing speed and security by grouping dispatches and selecting a single dispatch per group, ensuring fast and secure transactions.

JP7752238B2Active Publication Date: 2025-10-09MASTERCARD INT INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2024516836
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-09-16
Filing Date
2022-08-24
Publication Date
2025-10-09
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

Traditional blockchain systems require smart contracts to be executed serially, which can be slow, especially when frequent block additions are needed, and may lead to unauthorized transactions due to the risk of double-spending.

Method used

A system and method for parallel execution of smart contract dispatches by grouping dispatches with common reference values and selecting a single dispatch per group based on predetermined criteria, allowing simultaneous execution without risking double-spending.

Benefits of technology

This approach significantly speeds up smart contract processing times while maintaining blockchain security and immutability, preventing unauthorized transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007752238000001
    Figure 0007752238000001
  • Figure 0007752238000002
    Figure 0007752238000002
  • Figure 0007752238000003
    Figure 0007752238000003
Patent Text Reader

Abstract

A method for parallel execution of dispatches in a smart contract on a blockchain includes: receiving the smart contract by a blockchain node in a blockchain network; identifying the dispatches as inputs for the smart contract; separating the dispatches into sets, each set including at least one dispatch, each dispatch including a common reference value associated with an item in a prior block in the blockchain; determining a valid dispatch of each set based on predetermined criteria; executing the smart contract with one valid dispatch for each set; including the blockchain data items generated by the execution of the smart contract in a new block for the blockchain; and transmitting the generated new block to a plurality of additional nodes in the blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to the parallel execution of dispatches within smart contracts on a blockchain, and in particular to the identification of all dispatches related to smart contracts and the use of predetermined rules among nodes so that all dispatches can be executed in parallel with consistency among all nodes, thereby maintaining correctness and immutability.

[0002] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of and priority to U.S. Patent Application No. 17 / 476,858, filed September 16, 2021, the entire disclosure of which is incorporated herein by reference. [Background technology]

[0003] Blockchain was originally created as a storage mechanism used to conduct payment transactions using cryptocurrencies. Its use offers several benefits, such as decentralization, distributed computing, and transaction transparency, while providing anonymity for the individuals or entities involved in the transactions. A relatively favorable property of blockchain is the immutability of its records: all transactions made part of the chain are stored and are immutable due to the computational power and bandwidth limitations required, especially as the chain grows and the blockchain network adds more nodes.

[0004] Another desirable feature of blockchains is smart contracts, which are self-executing contracts stored on the blockchain that automatically execute upon the satisfaction of criteria, with predetermined outcomes based on inputs (also called dispatches) to the contract. Smart contracts are versatile and can be used for several purposes, such as escrow, where an amount of currency or other assets is automatically transferred upon the satisfaction of criteria, such as the transfer of ownership of property or other assets. In some cases, smart contracts can be configured to be executed dozens or even hundreds of times for convenience or efficiency. In such cases, the contract is executed serially, with the contract being executed for each dispatch, one at a time, until all applicable dispatches have been executed.

[0005] Traditional blockchain systems require smart contracts to be executed serially to prevent situations in which smart contract execution may violate the blockchain's rules. For example, a smart contract may have multiple dispatches attempting to transfer the same asset during smart contract execution. In such a case, only one execution should complete successfully; subsequent executions cannot be verified because they attempt to transfer assets that have already been transferred. As a result, blockchains execute smart contract dispatches serially to prevent situations in which assets may be double-consumed or transferred. However, requiring serial execution of smart contracts can take a significant amount of time, especially when smart contracts involve a significant amount of input. In cases in which a blockchain requires the addition of blocks frequently (e.g., on the order of milliseconds), serial execution may be too slow for the blockchain.

[0006] Therefore, there is a need for a technical system that can utilize powerful computing resources to perform the desired functions, and that should be done without restrictions and delays in adding new blocks to the blockchain, while preventing unauthorized transactions and asset transfers. Summary of the Invention

[0007] This disclosure describes a system and method for parallel execution of dispatches within a smart contract on a blockchain. When a blockchain node executes a smart contract, it first identifies all dispatches for execution using the smart contract. Prior to the start of execution, the blockchain node identifies reference data for each dispatch, which may be a previous transaction on the blockchain where assets will be transferred again as part of the execution of the smart contract for that dispatch. All dispatches with the same reference value are grouped together, and a single dispatch from each group is selected by the blockchain node using predetermined criteria, such as the ranking of hash values ​​contained within each dispatch. The blockchain node executes the smart contract in parallel using the selected dispatches from all groups and any individual dispatches, allowing the smart contract to be executed for all valid dispatches significantly faster than using sequential execution. Because only a single dispatch is selected for all dispatches with a common reference value, there is no risk of that reference being used more than once, which is prohibited on a blockchain (e.g., such a transaction would fail validation). As a result, smart contracts can be executed in parallel, improving processing times, without sacrificing the benefits of blockchain or putting any blockchain data at risk.

[0008] A method for parallel execution of dispatches in a smart contract on a blockchain includes the steps of: receiving, by a receiver of a blockchain node in a blockchain network, a smart contract associated with a blockchain; identifying, by a processor of the blockchain node, a plurality of dispatches as inputs for the smart contract; and separating, by the processor of the blockchain node, the plurality of dispatches into one or more sets of dispatches, each set of dispatches including at least one dispatch, and each dispatch in a set of dispatches including a common reference value associated with an entry in a preceding block in the blockchain. determining, by a processor of the blockchain node, one valid dispatch among each of the one or more sets of dispatches based on predetermined criteria; executing, by the processor of the blockchain node, the smart contract using the one valid dispatch for each of the one or more sets of dispatches; generating, by the processor of the blockchain node, a new block for the blockchain, the new block including one or more blockchain data items, the one or more blockchain data items including data generated by the execution of the smart contract; and transmitting, by a transmitter of the blockchain node, the generated new block to a plurality of additional nodes in the blockchain network.

[0009] 1. A system for parallel execution of dispatches in a smart contract on a blockchain, the system comprising: a blockchain network; a blockchain node included in the blockchain network; and a plurality of additional nodes in the blockchain network, the blockchain node including: a receiver that receives a smart contract associated with a blockchain; a processor that performs the following steps: identifying a plurality of dispatches as inputs for the smart contract; separating the plurality of dispatches into one or more sets of dispatches, each set of dispatches including at least one dispatch, and each dispatch in the set of dispatches including a common reference value that is associated with an item in a previous block in the blockchain; determining a valid dispatch of each of the one or more sets of dispatches based on predetermined criteria; executing the smart contract with the one valid dispatch for each of the one or more sets of dispatches; and generating a new block for the blockchain, the new block including one or more blockchain data items, the one or more blockchain data items including data generated by execution of the smart contract; and a transmitter that transmits the generated new block to the plurality of additional nodes. [Brief explanation of the drawings]

[0010] The scope of the present disclosure is best understood from the following detailed description of exemplary embodiments when taken in conjunction with the accompanying drawings, in which:

[0011] [Figure 1] FIG. 1 is a block diagram illustrating a high-level system architecture for parallel execution of dispatches within smart contracts, according to an example embodiment. [Figure 2]FIG. 2 is a block diagram illustrating a blockchain node of a system for parallel execution of dispatches within the smart contracts of FIG. 1 in accordance with an example embodiment. [Figure 3] 3 is a flow diagram illustrating a process for parallel execution of dispatches within smart contracts using the blockchain nodes of FIG. 2 and the system of FIG. 1 according to an example embodiment. [Figure 4] 1 is a flow diagram illustrating an example method for parallel execution of dispatches within a smart contract, according to an example embodiment. [Figure 5] FIG. 1 is a block diagram illustrating a computer system architecture, according to an exemplary embodiment.

[0012] Further areas of applicability of the present disclosure will become apparent from the following detailed description. The detailed description of exemplary embodiments is intended for purposes of illustration only and is not intended to necessarily limit the scope of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0013] Glossary Blockchain: A public ledger of all transactions of a blockchain-based currency. One or more computing devices may include a blockchain network, which may be configured to process and record transactions as part of blocks in the blockchain. Once a block is complete, it is added to the blockchain, thereby updating the transaction record. In many embodiments, the blockchain may be a chronological ledger of transactions or may be presented in any other order suitable for use by the blockchain network. In some embodiments, a transaction recorded in the blockchain may include a destination address and a currency amount. The blockchain thereby records how much currency belongs to a particular address. In some embodiments, transactions may or may not be financial-related and may include additional or different information (e.g., source address, timestamp, etc.). In some embodiments, a blockchain may additionally or alternatively include almost any type of data in the form of transactions that would or needs to be placed in a distributed database that maintains a continuously growing list of data records hardened against tampering or revision. Alternatively, a blockchain may be verified and validated by the blockchain network by proof-of-work (PoW) and / or any other suitable verification technique associated therewith. In some cases, the data about a given transaction may further include additional data that is not directly part of the transaction that is appended to the transaction data. In some examples, the inclusion of such data in the blockchain may constitute a transaction. In some such examples, the blockchain may not be directly associated with a particular digital, virtual, fiat, or other type of currency.

[0014] A system for parallel execution of smart contracts FIG. 1 illustrates a system 100 for grouping and parallel execution of dispatches as inputs to smart contracts in a blockchain through the use of predetermined criteria.

[0015] The system 100 can include one or more blockchain nodes 102. Each blockchain node 102 can be part of a blockchain network 104. Each blockchain node 102 can be a computing system, as shown in FIGS. 2 and 5 and described in more detail below, configured to perform functions related to blockchain processing and management, which can include, for example, generating blockchain data values, validating proposed blockchain transactions, verifying digital signatures, generating new blocks, validating new blocks, and maintaining copies of the blockchain.

[0016] A blockchain may be a distributed ledger comprising at least a plurality of blocks. Each block may include at least a block header and one or more data values. Each block header may include at least a timestamp, a block reference value, and a data reference value. The timestamp may be the time when the block header was created and may be represented using any suitable method (e.g., a UNIX timestamp, DateTime, etc.). The block reference value may be a value that references a previous block in the blockchain (e.g., based on the timestamp). In some embodiments, the block reference value in the block header may be a reference to the block header of the most recently added block preceding the respective block. In an exemplary embodiment, the block reference value may be a hash value generated by hashing the block header of the most recently added block. Similarly, the data reference value may be a reference to one or more data values ​​stored in the block including the block header. In an exemplary embodiment, the data reference value may be a hash value generated by hashing one or more data values. For example, the block reference value may be the root of a Merkle tree created using one or more data values.

[0017] The use of a block reference value and a data reference value in each block header can result in immutability for the blockchain. Any attempted change to the data value requires the generation of a new data reference value for that block, which in turn requires the generation of a new block reference value for the subsequent block, which in turn requires the generation of a new block reference value for each subsequent block. This must be performed and updated for every single blockchain node 102 in the blockchain network 104 before a new block is created and added to the blockchain in order for the change to be permanent. Computational and communication limitations can make such changes extremely difficult or even impossible, hence the blockchain's immutability.

[0018] In some embodiments, a blockchain can be used to store information about blockchain transactions between two different blockchain wallets. A blockchain wallet can contain a private key of a cryptographic key pair, which can be used to generate a digital signature that can serve as a payer's authorization for the blockchain transaction, and the digital signature can be verified by the blockchain network 104 using the public key of the cryptographic key pair. In some cases, the term "blockchain wallet" can specifically refer to a private key. In some cases, the term "blockchain wallet" can refer to a computing device (e.g., sender device 106 or receiver device 108a, 108b) that stores a private key for use in blockchain transactions. For example, each computing device can have its own private key for each cryptographic key pair and can be a blockchain wallet for use in transactions with a blockchain associated with the blockchain network. The computing device can be any type of device suitable for storing and utilizing a blockchain wallet, such as a desktop computer, laptop computer, notebook computer, tablet computer, mobile phone, smartphone, smartwatch, smart TV, wearable computing device, embedded computing device, etc.

[0019] Each blockchain data value stored in the blockchain may correspond to a blockchain transaction or other data storage, as appropriate. A blockchain transaction may include at least the following: a digital signature of the sender (e.g., sender device 106) of the currency generated using the sender's private key; a blockchain address of the recipient (e.g., receiver devices 108a, 108b) of the currency generated using the recipient's public key; and the amount of blockchain currency to be transferred or other data to be stored. If the blockchain is used for data storage purposes other than currency, such other data can be substituted for the currency amount. In some blockchain transactions, the transaction may also include: one or more sender's blockchain addresses where the blockchain currency is currently stored (e.g., if a digital signature establishes access to such currency); and an address for any changes maintained by the sender, generated using the sender's public key. Addresses to which cryptocurrency that can be used in future transactions is sent are called "output" addresses because they were previously used to capture the output of a previous blockchain transaction, and are also called "unspent transactions" because there is currency sent to the address in a previous transaction that has not yet been spent. In some cases, blockchain transactions may also include the sender's public key for entities to use in validating the transaction. For traditional processing of blockchain transactions, such data may be provided by either the sender or the recipient to a blockchain node 102 in the blockchain network 104.The node can verify the digital signature using the public key in the sender's wallet's cryptographic key pair and verify the sender's access to the funds (e.g., if an unspent transaction has not yet been spent and has been sent to an address associated with the sender's wallet), a process known as "confirming" the transaction, and the blockchain transaction is then included in a new block. In traditional blockchain implementations, the new block may be verified by other nodes in the blockchain network 104 before being added to the blockchain and distributed to all blockchain nodes 102 in the blockchain network 104. If the blockchain data value is not related to a blockchain transaction but instead relates to the storage of other types of data, the blockchain data value may still include or involve verification of the digital signature.

[0020] In some embodiments, the blockchain may be a permissioned blockchain. A permissioned blockchain may be a blockchain in which only authorized participants may transact (e.g., send or receive assets or provide data) using the blockchain. In such cases, authorization may be provided to participants by the blockchain node 102, for example, by receiving a cryptographic key pair or by providing their public key to the blockchain node 102 for registration, and the blockchain node 102 may ensure that any transaction submitted to the blockchain network 104 originates from an authorized device (e.g., by verifying the transaction using the registered public key). In such embodiments, the functions that may be performed by any participant in the blockchain may be limited and / or subject to authorization.

[0021] In the system 100, smart contracts can be stored within a blockchain associated with the blockchain network 104. Smart contracts can be self-executing contracts, and the result of a smart contract after execution can be a new blockchain data value, such as a new blockchain transaction, to be stored within the blockchain. A smart contract can be executed using one or more inputs, also referred to as dispatches, and a new blockchain data value is generated. A smart contract can be self-executing, automatically triggering execution when a valid dispatch is identified or when certain criteria are met, resulting in a specific dispatch being provided to the smart contract as an input for execution. In an exemplary embodiment, each dispatch for a smart contract will point to the previous blockchain data value on the blockchain, for example, by using a hash value or unique identifier of the blockchain data value, which is stored within the blockchain along with the blockchain data value. When a dispatch is input to a smart contract, execution of the smart contract can result in a new blockchain data value, such as a blockchain transaction, which in some cases may depend on the dispatch itself, e.g., the value in the dispatch may result in a different output than the execution of the smart contract.

[0022] For example, a smart contract can be used for escrow. In such an example, a buyer associated with sender device 106 may be interested in purchasing assets from a seller associated with receiver device 108a for an agreed-upon currency amount. The buyer can transfer the currency amount to an escrow blockchain wallet via a blockchain transaction. The smart contract, which can be stored as part of the transaction or separately from the transaction, monitors the blockchain for evidence of transfer of ownership of the assets from the seller to the buyer, which can include, for example, by storing the transfer agreement or its hash in the blockchain. If evidence is detected, the smart contract can execute, thereby transferring currency from the escrow blockchain wallet to a specified seller account. In such a case, the evidence of transfer of ownership can be dispatch, and the result upon execution is a transaction to transfer currency from the escrow wallet to the seller's wallet.

[0023] In the system 100, smart contracts can be stored in a blockchain or provided to blockchain nodes 102, which can have multiple different dispatches associated with them. In traditional systems, blockchain nodes 102 would execute smart contracts for each dispatch sequentially. In the system 100, blockchain nodes 102 can be configured to execute all dispatches for a smart contract in parallel.

[0024] The blockchain node 102 can first identify all dispatches applicable to the smart contract, which can be identified using information contained in the smart contract itself. For example, the smart contract can explicitly list all dispatches or can include data that the blockchain node 102 can use to identify a dispatch, such as by specifying one or more blockchain wallets, blockchain data values, transaction identifiers, etc. The blockchain node 102 can then group all dispatches into a set of dispatches. Each dispatch in the set of dispatches can have a common reference value, which can be a blockchain data value or other value stored in the blockchain to which the dispatch points. For example, a first dispatch can refer to a blockchain transaction that transfers 100 units of currency to the sender device 106, and execution of the smart contract will transfer those 100 units of currency from the sender device 106 to the receiver device 108a. For example, a second dispatch may refer to the same blockchain transaction that transfers 100 units of currency to sender device 106, and execution of the smart contract for that dispatch will transfer those 100 units of currency from sender device 106 to receiver device 108b. In such an example, both dispatches utilize the same reference value (e.g., the blockchain transaction that transfers 100 units of currency to sender device 106). In this manner, both dispatches will be placed in the same set by blockchain node 102.

[0025] Once the blockchain node 102 organizes all dispatches into sets of dispatches (some dispatches may be the only dispatch in a set), the blockchain node 102 can then select a single dispatch for each set. The blockchain node 102 can select a single dispatch for a set of dispatches using any suitable predetermined criteria. As an example, the blockchain node 102 can rank all dispatches in the set and select a first-ranked dispatch or a predetermined dispatch in the rank (e.g., middle-ranked, last-ranked, etc.). The blockchain node 102 can use any suitable data for ranking, such as a hash of the transaction resulting from the execution of the smart contract, the time the dispatch was received or entered into the smart contract, the rank of the dispatch in the smart contract itself, a hash of the dispatch itself generated by the blockchain node 102, etc. As another example, the blockchain nodes 102 may use an algorithm for random or pseudo-random selection, with each blockchain node 102 in the blockchain network 104 utilizing the same algorithm with the same applicable inputs (e.g., seeds, weights, etc.), such that every blockchain node 102 makes the same selection. Any suitable criteria may be used that ensures that a single dispatch selected by a blockchain node 102 for a set of dispatches is the same for every blockchain node 102 processing it.

[0026] Once a single dispatch is selected for each set, the blockchain node 102 may execute smart contracts for each set of dispatches using the selected single dispatch for that set. In an example embodiment, the blockchain node 102 may perform smart contract executions in parallel, where the number of parallel executions may be based on the number of processor cores of the blockchain node 102, available computing resources, or other suitable criteria. For example, the blockchain node 102 may have a processor with eight cores and may run eight smart contract executions at a time, resulting in smart contract executions that are significantly faster (e.g., approximately eight times faster) than using sequential execution.

[0027] Execution of the smart contract for each set of dispatches may result in the generation of a new blockchain data value, or data to be included in a blockchain data value, for each set of dispatches. The blockchain node 102 can then use the blockchain data value in a new block generated by the blockchain node 102, using conventional methods and systems. The generated block can be transmitted to other blockchain nodes 102 in the blockchain network 104 for verification and validation, using conventional methods. Once the new block is validated, it can be added to the blockchain by all blockchain nodes 102 in the blockchain network 104.

[0028] By organizing dispatches into sets of dispatches and executing only a single dispatch from each set, invalid blockchain transactions are not added to the blockchain because no reference value is used more than once. For example, in the example above, only one of the instances of the 100 units of currency transfer by sender device 106 is selected because both transfers are within a single set of dispatches. As a result, only receiver device 108a or receiver device 108b (e.g., depending on the criteria used to select a single dispatch within the set) receives the 100 units of currency on the blockchain, eliminating the possibility of double-spending in the blockchain network 104. Thus, the methods and systems described in this disclosure significantly improve the processing speed of smart contract execution without compromising the security or performance of the blockchain.

[0029] Blockchain Node 2 illustrates an embodiment of a blockchain node 102, such as the blockchain node 102 in the system 100. Those skilled in the art will appreciate that the embodiment of the blockchain node 102 illustrated in FIG. 2 is provided for illustrative purposes only and is not intended to be an exhaustive list of all possible configurations of a blockchain node 102 suitable for performing the functions of the present disclosure. For example, computer system 500, illustrated in FIG. 5 and described in more detail below, may be a suitable configuration of a blockchain node 102.

[0030] The blockchain node 102 may include a receiver device 202. The receiver device 202 may be configured to receive data over one or more networks via one or more network protocols. In some examples, the receiver device 202 may be configured to receive data from other blockchain nodes 102, sender device 106, receiver devices 108a, 108b, and other systems and entities via one or more communication methods, such as radio frequency, a local area network, a wireless area network, a cellular communication network, Bluetooth, the Internet, etc. In some embodiments, the receiver device 202 may include multiple devices (e.g., different receiver devices receiving data over different networks (e.g., a first receiver device receiving data over a local area network and a second receiver device receiving data over the Internet)). The receiver device 202 may receive a transmitted electronic data signal. Upon receipt of the data signal by the receiver device 202, data may be superimposed on the data signal and may be decoded, parsed, read, or otherwise obtained. In some embodiments, the receiver device 202 may include an analysis module for analyzing the received data signal to obtain the data superimposed thereon. For example, the receiving device 202 may include an analysis program configured to receive and convert received data signals into usable input for functions performed by the processing device to implement the methods and systems of the present disclosure.

[0031] The receiving device 202 can be configured to receive data signals transmitted electronically by other blockchain nodes 102, which may be overlaid or otherwise encoded with blockchain data values, data value identifiers, blocks, blockchain data, confirmation messages, smart contracts, predetermined criteria, dispatches, etc. The receiving device 202 can be configured to receive data signals transmitted electronically by the sender device 106 and / or receiver devices 108a, 108b, which may be overlaid or encoded with blockchain data values, public keys, digital signatures, blockchain transaction data, smart contracts, dispatches for smart contracts, approval requests for the blockchain network 104, etc.

[0032] The blockchain node 102 may also include a communications module 204. The communications module 204 may be configured to transfer data between modules, engines, databases, memory, and other components of the blockchain node 102 for use in performing the functions of the present disclosure. The communications module 204 may include one or more communication types and may use various communication methods for communication within a computing device. For example, the communications module 204 may include a bus, a connection pin connector, a wire, etc. In some embodiments, the communications module 204 may also be configured to communicate between internal components of the blockchain node 102 and external components of the blockchain node 102 (e.g., an externally connected database, a display device, an input device, etc.). The blockchain node 102 may also include a processing unit. The processing unit may be configured to perform the functions of the blockchain node 102 of the present disclosure, as will be apparent to those skilled in the art. In some embodiments, the processing unit may include multiple engines and / or modules (e.g., a query module 214, a generation module 216, a validation module 218, etc.) specifically configured to perform one or more functions of the processing unit. As used herein, the term "module" may refer to software or hardware running on specifically programmed hardware that receives input, performs one or more operations using the input, and provides an output. The inputs, outputs, and operations performed by the various modules will be apparent to one of ordinary skill in the art based on this disclosure.

[0033] A blockchain node 102 may also include blockchain data 206, which may be stored in memory 212 of the blockchain node 102 or stored in or accessible by a separate area within the blockchain node 102. The blockchain data 206 may include a blockchain, which may comprise multiple blocks, and which may be associated with the blockchain network 104. The blockchain data 206 may additionally or alternatively include any data associated with one or more blockchain wallets and usable by the blockchain node 102, which may include: cryptographic key pairs, unspent transaction outputs, digital asset amounts, network identifiers for the blockchain network 104, smart contracts, signature generation algorithms, encryption algorithms, transaction account data, account balances, third-party communication information, predetermined criteria, registered participating devices, device registration data, etc.

[0034] The blockchain node 102 may also include memory 212. The memory 212 may be configured to store data (e.g., public keys, private keys, symmetric keys, etc.) for use by the blockchain node 102 when performing the functions of the present disclosure. The memory 212 may be configured to store data using any appropriate data formatting and schema and may be any appropriate type of memory (e.g., read-only memory, random-access memory, etc.). The memory 212 may include, for example, cryptographic keys and algorithms, communication protocols and standards, data formatting standards and protocols, program code for modules and processing unit application programs, and other appropriate data used by the blockchain node 102 when performing the functions of the present disclosure. This will be apparent to those skilled in the art upon reading this disclosure. In some embodiments, the memory 212 may include a relational database using Structured Query Language (SQL) to store, identify, modify, update, access, etc., stored structured data sets. The memory 212 may be configured to store, for example, cryptographic keys, salts, nonces, communication information for other computing systems, generation algorithms, predetermined criteria, ranking rules, and the like.

[0035] The blockchain node 102 may include a query module 214. The query module 214 may be configured to run a query on a database to identify information. The query module 214 may receive one or more data values ​​or query strings, and based thereon, may run a query string on an indicated database (e.g., memory 212 of the blockchain node 102) to identify information stored therein. The query module 214 may then output the identified information to an appropriate engine or module of the blockchain node 102 as needed. The query module 214 may, for example, run a query on the blockchain data 206 to identify all possible dispatches for smart contracts that have been launched for execution.

[0036] The blockchain node 102 may also include a generation module 216. The generation module 216 may be configured to generate data for use by the blockchain node 102 when performing the functions of the present disclosure. The generation module 216 may receive instructions as input values, generate data based on the instructions, and output the generated data to one or more modules of the blockchain node 102. For example, the generation module 216 may be configured to generate a cryptographic key pair, generate a digital signature, generate a blockchain data value, create a new block, execute a smart contract using a selected dispatch, etc. The generation module 216 may also be configured to select (e.g., generate) a single dispatch from the set of dispatches using predetermined criteria, which may include ordering each dispatch in the set of dispatches based on applicable rules and selecting a single dispatch from the ordered set as indicated by the predetermined criteria.

[0037] The blockchain node 102 may also include a validation module 218. The validation module 218 may be configured to perform validations on the blockchain node 102 as part of the functionality of the present disclosure. The validation module may receive instructions as input, which may include data to be used in performing the validation, perform the validation on demand, and output the results of the validation to another module or engine of the blockchain node 102. The validation module 218 may be configured to perform, for example, the following: verify digital signatures using appropriate signature generation algorithms and keys, verify blockchain transactions, verify smart contracts, verify the eligibility of participating devices, etc.

[0038] The blockchain node 102 may also include a transmitting device 220. The transmitting device 220 may be configured to transmit data over one or more networks via one or more network protocols. In some examples, the transmitting device 220 may be configured to transmit data to other blockchain nodes 102, sender devices 106, receiver devices 108a, 108b, and other entities via one or more communication methods, such as a local area network, a wireless area network, cellular communication, Bluetooth, radio frequency, the Internet, etc. In some embodiments, the transmitting device 220 may include multiple devices (e.g., different transmitting devices for transmitting data over different networks (e.g., a first transmitting device transmitting data over a local area network and a second transmitting device transmitting data over the Internet)). The transmitting device 220 may electronically transmit a data signal with the superimposed data, the data being analyzed by a receiving computing device. In some embodiments, the transmitting device 220 may include one or more modules for superimposing, encoding, or formatting data into a data signal suitable for transmission.

[0039] The sending device 220 can be configured to electronically transmit data signals to other blockchain nodes 102, where the data signals can be overlaid or encoded with blockchain data values, data value identifiers, blocks, blockchain data, confirmation messages, smart contracts, predetermined criteria, dispatches, etc. The sending device 220 can also be configured to electronically transmit data signals to the sender device 106 and / or receiver devices 108a, 108b, where the data signals can be overlaid or encoded with requests for smart contracts or dispatches, approval data for joining the blockchain network 104, blockchain data 206, etc.

[0040] Processing for parallel execution of smart contracts FIG. 3 illustrates a process 300 for parallel execution of dispatches within smart contracts performed by a blockchain node 102 in the system 100 of FIG. 1.

[0041] At S302, a receiving device 202 of a blockchain node 102 may receive a smart contract for execution. In some cases, the smart contract may be submitted by a participant device, such as the sender device 106 or the receiver devices 108a, 108b. In other cases, the smart contract may be stored in an existing block in a blockchain associated with the blockchain network 104 to which the blockchain node 102 belongs. The smart contract may be activated for execution (e.g., as a result of detecting a dispatch or expiration date), based on criteria specified in the contract itself, etc. At S304, a query module 214 of the blockchain node 102 may perform a query on the blockchain data 206 to identify all dispatches applicable to the smart contract. This may be done, for example, by identifying the dispatch within the smart contract itself stored in the blockchain or by identifying the dispatch based on criteria in the smart contract.

[0042] At S306, the generation module 216 of the blockchain node 102 can generate a set of multiple different dispatches for all dispatches identified by the blockchain node at S304. Each dispatch in the set of dispatches can include a common reference value, which can be a hash value of a previous blockchain data value stored in the blockchain, such as the one used to transfer assets to the sender device 106 in the example above. In cases where a dispatch only has a reference value that is not shared with any other dispatch, the dispatch can be the only dispatch in the set of dispatches.

[0043] At S308, the blockchain node 102 may determine whether any sets of dispatches exist that have multiple dispatches within the set. If there is at least one set of dispatches that includes multiple dispatches, at S310, the creation module 216 of the blockchain node 102 may select a single dispatch for each such set using predetermined criteria. In one example, selecting a single dispatch may include ordering all of the dispatches in the set and selecting a single dispatch from the ordered set according to the predetermined criteria. Once a single dispatch is identified for each set of dispatches, or if there are no sets of dispatches with more than one dispatch, at S312, the creation module 216 of the blockchain node 102 may execute a smart contract for each set of dispatches using the single identified dispatch or the only dispatch for each set. Execution of the smart contract for each set of dispatches may generate a new blockchain data value for each set. In an exemplary embodiment, the execution of smart contracts executed by the blockchain node 102 at S312 may be performed in parallel.

[0044] At S314, the generation module 216 of the blockchain node 102 can generate a new block using the blockchain data values ​​generated as a result of the execution of the smart contract. The new block can include a block header, which can include a timestamp and a reference to the previous block in the blockchain, as well as references to all blockchain data values ​​included in the new block and the generated blockchain data values. In some cases, additional blockchain data values ​​can also be included in the new block. This can include, for example, other transactions, additional data, smart contracts, etc., which can be received by the blockchain node 102 (e.g., using the receiving device 202) in standard processing. At S316, the sending device 220 of the blockchain node 102 can electronically transmit the new block to multiple other blockchain nodes 102 in the blockchain network 104 for confirmation. The other blockchain nodes 102 can verify and confirm the new block using traditional methods and systems, and if confirmation is obtained, the new block can be added to the blockchain in all blockchain nodes 102 in the blockchain network 104.

[0045] An exemplary method for parallel execution of smart contracts FIG. 4 illustrates a method 400 for parallel execution of multiple dispatches on smart contracts in a blockchain using predetermined criteria.

[0046] At S402, a smart contract associated with a blockchain may receive a block by a receiver (e.g., receiving device 202) of a blockchain node (e.g., blockchain node 102) in a blockchain network (e.g., blockchain network 104). At S404, a plurality of dispatches may be identified as inputs for the smart contract by a processor of the blockchain node (e.g., via query module 214). At S406, the plurality of dispatches may be separated into one or more sets of dispatches by a processor of the blockchain node (e.g., via generation module 216). Each set of dispatches includes at least one dispatch, and each dispatch in the set of dispatches includes a common reference value associated with an item in a preceding block in the blockchain.

[0047] At S408, a valid dispatch may be determined by a processor of the blockchain node (e.g., via the generation module 216) for each of the one or more sets of dispatches based on predetermined criteria. At S410, a smart contract is executed by a processor of the blockchain node (e.g., via the generation module 216) using one valid dispatch for each of the one or more sets of dispatches. At S412, a new block may be generated for the blockchain by the processor (e.g., via the generation module 216). The new block includes one or more blockchain data items, where the one or more blockchain data items include data generated by the execution of the smart contract. At S414, the generated new block may be transmitted by a transmitter of the blockchain node (e.g., the sending device 220) to multiple additional nodes in the blockchain network.

[0048] In one embodiment, the predetermined criteria may include ordering each dispatch within the set of dispatches, and a valid dispatch for a set of dispatches may be the first dispatch after ordering the set of dispatches. In a further embodiment, each dispatch within the set of dispatches may be ordered based on a hash value included in each dispatch. In some embodiments, the smart contract may be executed in parallel, with one valid dispatch for each of one or more sets of dispatches. In one embodiment, the blockchain may be a permissioned blockchain.

[0049] In some embodiments, the common reference value can be an identifier of a blockchain transaction within the blockchain. In one embodiment, executing a smart contract with a valid dispatch can generate a new blockchain transaction that transfers assets, and data generated by the execution of the smart contract can include a new blockchain transaction for each of one or more sets of dispatches. In a further embodiment, the assets transferred in the new blockchain transaction for a valid dispatch can be identified in a common reference value included in the set of dispatches that includes the valid dispatch.

[0050] Computer System Architecture 5 illustrates a computer system 500 in which embodiments of the present disclosure, or portions thereof, may be implemented as computer-readable code. For example, the blockchain node 102 of FIGS. 1 and 2 may be implemented in the computer system 500 using hardware, a non-transitory computer-readable medium having stored instructions, or a combination thereof, and may be implemented in one or more computer systems or other processing systems. The hardware may embody modules and components used to implement the methods of FIGS. 3 and 4.

[0051] Where programmable logic is used, such logic may be executed on commercially available processing platforms configured with executable software code, and may be special-purpose or dedicated devices (e.g., programmable logic arrays (PGAs), application-specific integrated circuits (ASICs), etc.). Those skilled in the art will appreciate that embodiments of the disclosed subject matter may be implemented in a variety of computer system configurations, including multi-core multiprocessor systems, minicomputers, mainframe computers, distributed functionality linked or clustered computers, and pervasive or miniature computers that may be implemented in virtually any device. For example, at least one processor unit and memory may be used to implement the embodiments.

[0052] A processor unit or device of the present disclosure may be a single processor, multiple processors, or a combination thereof. A processor device may have one or more processor “cores.” The terms “computer program medium,” “non-transitory computer-readable medium,” and “computer-usable medium” of the present disclosure are used generally to refer to tangible media (e.g., removable storage unit 518, removable storage unit 522, and a hard disk installed in hard disk drive 512, etc.).

[0053] Various embodiments of the present disclosure are described with respect to this exemplary computer system 500. After reading this disclosure, it will be apparent to one skilled in the art how to implement the present disclosure using other computer systems and / or computer architectures. While operations are disclosed as sequential processes, some operations may in fact be performed in parallel, concurrently, and / or in distributed environments, where program code is stored locally or remotely for access by uniprocessor or multiprocessor machines. Furthermore, in some embodiments, the order of operations may be rearranged without departing from the spirit of the disclosed subject matter.

[0054] The processor unit 504 may be a special-purpose or general-purpose processor unit specially configured to perform the functions of the present disclosure. The processor unit 504 may be connected to a communications infrastructure 506 (e.g., a bus, a message queue, a network, a multi-core message passing scheme, etc.). The network may be any network suitable for performing the functions of the present disclosure and may include a local area network (LAN), a wide area network (WAN), a wireless network (e.g., Wi-Fi), a mobile communications network, a satellite network, the Internet, fiber optics, coaxial cable, infrared, radio frequency (RF), or any combination thereof. Other suitable network types and configurations will be apparent to those skilled in the art. The computer system 500 may also include a main memory 508 (e.g., random access memory, read-only memory, etc.) and may also include a secondary memory 510. The secondary memory 510 may include a hard disk drive 512 and a removable storage drive 514 (e.g., a floppy disk drive, a magnetic tape drive, an optical disk drive, a flash memory, etc.).

[0055] The removable storage drive 514 may read from and / or write to the removable storage unit 518 in a well-known manner. The removable storage unit 518 may include a removable storage medium that can be read from and written to by the removable storage drive 514. For example, if the removable storage drive is a floppy disk drive or a USB port, the removable storage unit 518 may be a floppy disk or a portable flash drive, respectively. In one embodiment, the removable storage unit 518 may be a non-transitory readable recording medium.

[0056] In some embodiments, secondary memory 510 may include alternative means for allowing computer programs or other instructions to be loaded into computer system 500 (e.g., removable storage unit 522 and interface 520). Examples of such means may include program cartridges and cartridge interfaces (e.g., found in video game systems), removable memory chips (e.g., EEPROM, PROM, etc.) and associated sockets, other removable storage units 522 and interfaces 520, as will be apparent to those skilled in the art.

[0057] Data stored in computer system 500 (e.g., in main memory 508 and / or secondary memory 510) may be stored on any type of suitable computer-readable medium, such as optical storage (compact disc, digital versatile disc, Blu-ray disc, etc.) or magnetic tape storage (e.g., hard disk drive). The data may be organized in any type of suitable database structure (e.g., a relational database, a Structured Query Language (SQL) database, a distributed database, an object database, etc.). Suitable structures and storage types will be apparent to those skilled in the art.

[0058] Computer system 500 may also include a communications interface 524. Communications interface 524 may allow software and data to be sent and received between computer system 500 and external devices. Exemplary communications interface 524 may include a modem, a network interface (e.g., an Ethernet card), a communications port, a PCMCIA slot and card, etc. The software and data transferred via communications interface 524 may be in the form of signals. The signals may be electronic, electromagnetic, optical, or other signals apparent to those skilled in the art. The signals propagate over communications path 526. The paths are configured to carry the signals and may be implemented using wire, cable, fiber optics, a telephone line, a cellular phone link, a radio frequency link, etc.

[0059] The computer system 500 may further include a display interface 502. The display interface 502 may be configured to allow data to be transferred between the computer system 500 and an external display 530. Exemplary display interfaces 502 may include a high-definition multimedia interface (HDMI), a digital visual interface (DVI), a video graphics array (VGA), etc. The display 530 may be any suitable type of display that displays data transferred via the display interface 502 of the computer system 500. The display 530 may include a cathode ray tube (CRT) display, a liquid crystal display (LCD), a light emitting diode (LED) display, a capacitive touch display, a thin film transistor (TFT) display, etc.

[0060] Computer program medium and computer usable medium may refer to memory (e.g., main memory 508 and secondary memory 510), which may be semiconductor memory (such as DRAM). These computer program products may be means for providing software to computer system 500. Computer programs (e.g., computer control logic) may be stored in main memory 508 and / or secondary memory 510. Computer programs may also be received via communications interface 524. Such computer programs, when executed, may enable computer system 500 to perform methods of the present disclosure. In particular, computer programs, when executed, may enable processor unit 504 to perform the methods shown in FIGS. 3 and 4 as described herein. Such computer programs therefore represent the controller of computer system 500. The present disclosure is implemented using software executed on hardware, which may be stored in a computer program product and loaded into computer system 500 using removable storage drive 514, interface 520, and hard disk drive 512 or communications interface 524.

[0061] Processor unit 504 may include one or more modules or engines configured to perform the functions of computer system 500. Each module or engine may be implemented using hardware, and in some embodiments, software executing on hardware (e.g., corresponding to program code and / or programs stored in main memory 508 or secondary memory 510). In such embodiments, program code may be compiled by processor unit 504 (e.g., by a compilation module or engine) before execution by the hardware of computer system 500. For example, the program code may be source code written in a programming language (e.g., assembly language or machine code) that is translated into a lower-level language for execution by processor unit 504 and / or any additional hardware components of computer system 500. The compilation process may include the use of lexical analysis, preprocessing, syntactic analysis, semantic analysis, syntax-driven translation, code generation, code optimization, or any other techniques suitable for translating program code into a lower-level language for control of computer system 500 to perform the functions of the present disclosure. Those skilled in the art will appreciate that such processing results in computer system 500 being a specially configured computer system 500 that is uniquely programmed to perform the functions described above.

[0062] Among other features, technology consistent with the present disclosure provides systems and methods for parallel execution of dispatches within smart contracts on a blockchain. While various exemplary embodiments of the disclosed systems and methods are described above, it should be understood that they are presented by way of example only, and not by way of limitation. They are not exhaustive and do not limit the disclosure to the precise form disclosed. Modifications and variations are possible in light of the above teachings. Modifications and variations may be obtained from implementations of the present disclosure without departing from the scope or spirit of the disclosure.

Claims

1. 1. A method for parallel execution of dispatches within smart contracts on a blockchain, comprising: receiving, by a receiver of a blockchain node in the blockchain network, a smart contract associated with the blockchain; Identifying, by a processor of the blockchain node, a plurality of dispatches as inputs for the smart contract; Separating, by the processor of the blockchain node, the plurality of dispatches into one or more sets of dispatches, each set of dispatches including at least one dispatch, and each dispatch in a set of dispatches including a common reference value associated with an item in a previous block in the blockchain; determining, by the processor of the blockchain node, a valid dispatch of each of the one or more sets of dispatches based on predetermined criteria; executing, by the processor of the blockchain node, the smart contract with the one valid dispatch for each of the one or more sets of dispatches; generating, by the processor of the blockchain node, a new block for the blockchain, the new block including one or more blockchain data items, the one or more blockchain data items including data generated by execution of the smart contract; transmitting, by a transmitter of the blockchain node, the generated new block to a plurality of additional nodes in the blockchain network; wherein the smart contract is executed in parallel with the one valid dispatch for each of the one or more sets of dispatches.

2. 10. The method of claim 1, the predetermined criteria includes ranking each dispatch within the set of dispatches; The method, wherein the one valid dispatch for a set of dispatches is the first dispatch after ordering of the set of dispatches.

3. 3. The method of claim 2, wherein each dispatch in the set of dispatches is ranked based on a hash value included in each of the dispatches.

4. 10. The method of claim 1, wherein the blockchain is a permissioned blockchain.

5. 2. The method of claim 1, wherein the common reference value is an identifier of a blockchain transaction within the blockchain.

6. 10. The method of claim 1, Executing the smart contract with the one valid dispatch generates a new blockchain transaction that transfers assets; wherein the data generated by execution of the smart contract includes the new blockchain transaction for each of the one or more sets of dispatches.

7. 7. The method of claim 6, wherein the assets transferred in a new blockchain transaction for a valid dispatch are identified in the common reference value included in the set of dispatches that includes the valid dispatch.

8. 1. A system for parallel execution of dispatches within smart contracts on a blockchain, the system comprising: Blockchain network and a blockchain node included in the blockchain network; a plurality of additional nodes in the blockchain network; The blockchain node: a receiver that receives a smart contract associated with the blockchain; 1. A processor, comprising: Identifying a plurality of dispatches as inputs for the smart contract; Separating the plurality of dispatches into one or more sets of dispatches, each set of dispatches including at least one dispatch, and each dispatch in a set of dispatches including a common reference value associated with an item in a previous block in the blockchain; determining a valid dispatch from each of the one or more sets of dispatches based on predetermined criteria; executing the smart contract with the one valid dispatch for each of the one or more sets of dispatches; generating a new block for the blockchain, the new block including one or more blockchain data items, the one or more blockchain data items including data generated by execution of the smart contract; and a transmitter that transmits the generated new block to the plurality of additional nodes; wherein the smart contracts are executed in parallel with one valid dispatch for each of the one or more sets of dispatches.

9. 9. The system of claim 8, the predetermined criteria includes ranking each dispatch within a set of dispatches; The system, wherein the one valid dispatch for a set of dispatches is the first dispatch after ordering of the set of dispatches.

10. 10. The system of claim 9, wherein each dispatch in the set of dispatches is ranked based on a hash value included in each of the dispatches.

11. 9. The system of claim 8, wherein the blockchain is a permissioned blockchain.

12. 9. The system of claim 8, wherein the common reference value is an identifier of a blockchain transaction within the blockchain.

13. 9. The system of claim 8, Executing the smart contract with the one valid dispatch generates a new blockchain transaction that transfers assets; wherein the data generated by execution of the smart contract includes the new blockchain transaction for each of the one or more sets of dispatches.

14. 14. The system of claim 13, wherein the assets transferred in a new blockchain transaction for a valid dispatch are identified in the common reference value included in the set of dispatches that includes the valid dispatch.

15. A method for parallel execution of dispatches within smart contracts on a blockchain, comprising: receiving, by a receiver of a blockchain node in the blockchain network, a smart contract associated with the blockchain; Identifying, by a processor of the blockchain node, a plurality of dispatches as inputs for the smart contract; Separating, by the processor of the blockchain node, the plurality of dispatches into one or more sets of dispatches, each set of dispatches including at least one dispatch, and each dispatch in a set of dispatches including a common reference value associated with an item in a previous block in the blockchain; determining, by the processor of the blockchain node, a valid dispatch of each of the one or more sets of dispatches based on predetermined criteria; executing, by the processor of the blockchain node, the smart contract with the one valid dispatch for each of the one or more sets of dispatches; generating, by the processor of the blockchain node, a new block for the blockchain, the new block including one or more blockchain data items, the one or more blockchain data items including data generated by execution of the smart contract; transmitting, by a transmitter of the blockchain node, the generated new block to a plurality of additional nodes in the blockchain network; the predetermined criteria includes ranking each dispatch within the set of dispatches; The method, wherein the one valid dispatch for a set of dispatches is the first dispatch after ordering of the set of dispatches.

16. The method of claim 15, wherein each dispatch in the set of dispatches is ranked based on a hash value contained in each dispatch.

17. A system for parallel execution of dispatches within smart contracts on a blockchain, the system comprising: Blockchain network and a blockchain node included in the blockchain network; a plurality of additional nodes in the blockchain network; The blockchain node: a receiver that receives a smart contract associated with the blockchain; 1. A processor, comprising: Identifying a plurality of dispatches as inputs for the smart contract; Separating the plurality of dispatches into one or more sets of dispatches, each set of dispatches including at least one dispatch, and each dispatch in a set of dispatches including a common reference value associated with an item in a previous block in the blockchain; determining a valid dispatch from each of the one or more sets of dispatches based on predetermined criteria; executing the smart contract with the one valid dispatch for each of the one or more sets of dispatches; generating a new block for the blockchain, the new block including one or more blockchain data items, the one or more blockchain data items including data generated by execution of the smart contract; and a transmitter that transmits the generated new block to the plurality of additional nodes; the predetermined criteria includes ranking each dispatch within a set of dispatches; The system, wherein the one valid dispatch for a set of dispatches is the first dispatch after ordering of the set of dispatches.

18. The system of claim 17, wherein each dispatch in the set of dispatches is ranked based on a hash value contained in each dispatch.

Citation Information

Patent Citations

  • Intelligent contract parallel execution method and device

    CN111563820A

  • Registration and execution method, device and system of timed smart contract in block chain

    CN112837157A

  • Parallel Transaction Execution in Blockchain Networks Based on Smart Contract Whitelists

    JP2020518880A

  • Adding concurrency to smart contracts

    US20190087793A1

  • Partially-ordered blockchain

    US20210194672A1