WO2020042588A1 - Method for asynchronous execution of smart contract, apparatus, computer device and storage medium - Google Patents

Method for asynchronous execution of smart contract, apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2020042588A1
WO2020042588A1 PCT/CN2019/077935 CN2019077935W WO2020042588A1 WO 2020042588 A1 WO2020042588 A1 WO 2020042588A1 CN 2019077935 W CN2019077935 W CN 2019077935W WO 2020042588 A1 WO2020042588 A1 WO 2020042588A1
Authority
WO
WIPO (PCT)
Prior art keywords
contract
transaction
block
node
call
Prior art date
Application number
PCT/CN2019/077935
Other languages
French (fr)
Chinese (zh)
Inventor
陈飞杨
程文彬
许敏勋
Original Assignee
深圳前海益链网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海益链网络科技有限公司 filed Critical 深圳前海益链网络科技有限公司
Publication of WO2020042588A1 publication Critical patent/WO2020042588A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • a packaging node when a packaging node (node1) receives the contract invocation transaction data (tx1), it stores the contract invocation transaction data (tx1) into the first to-be-packaged transaction queue and the first contract queue at the same time; After the node (node1) stores the contract invocation transaction data (tx1) in the first to-be-packaged transaction queue, the packaging node (node1) starts to select transactions for packaging in the first to-be-packaged transaction queue. When the contract invocation transaction data (tx1) is selected ), Package the contract call transaction data (tx1) into the first block (state1), and broadcast the first block (state1).

Abstract

The present invention relates to the field of smart contracts, and relates in particular to a method for the asynchronous execution of a smart contract, an apparatus, a computer device and a storage medium, which are applied to a blockchain network; the method comprises: by means of a contract initiator, initiating a contract calling transaction and broadcasting the transaction in a blockchain network; packing and saving the contract calling transaction in a first block by means of a whole network packing node; executing the contract calling transaction by means of a first mining node to obtain a contract return result transaction, and packing and saving the contract return result transaction in a second block; and calling and executing the contract calling transaction in the first block and the contract return result transaction in the second block respectively by means of a verification node, and completing the transactions if the results are consistent. Thus, the problem of packing congestion for a blockchain transaction of an original smart contract is effectively solved by means of dividing a contract transaction into a contract calling transaction and a contract return result transaction as well as performing asynchronous execution, and whether the contract transaction is completed does not influence the transfer function of an account.

Description

异步执行智能合约的方法、装置、计算机设备及存储介质Method, device, computer equipment and storage medium for asynchronous execution of smart contract 技术领域Technical field
本发明涉及智能合约领域,尤其涉及一种异步执行智能合约的方法、装置、计算机设备及存储介质。The present invention relates to the field of smart contracts, and in particular, to a method, a device, a computer device, and a storage medium for asynchronously executing a smart contract.
背景技术Background technique
随着区块链技术的不断发展与流行,智能合约也被更多的人熟知,智能合约是一种基于比特币的脚本验证系统并进行拓展成为图灵完备的脚本系统,其最大优势在于脚本逻辑可以由用户根据自己的业务系统进行编码定制,所以,支持智能合约已成为区块链发展的必然。With the continuous development and popularity of blockchain technology, smart contracts are also well known by more people. Smart contracts are a Bitcoin-based script verification system and have been expanded to a Turing-complete scripting system. The biggest advantage is that scripting Logic can be customized by users according to their own business systems. Therefore, supporting smart contracts has become the inevitable development of the blockchain.
现有技术对于智能合约的执行,均采用同步、顺序执行方式进行,即挖矿线程在交易打包中执行合约并更新合约状态,在该种执行方式下,挖矿线程必须阻塞等待合约调用完成之后,才能更新数据状态,而如果合约执行时间太长,会导致区块链交易打包拥塞,影响区块链网络中新区块的产生速度,同时,由于合约未执行,合约发起账户的后续转账也被阻塞无法进行。In the prior art, the execution of smart contracts is performed in a synchronous and sequential manner, that is, the mining thread executes the contract in the transaction package and updates the contract status. In this execution mode, the mining thread must block until the contract call is completed. In order to update the data status, if the contract execution time is too long, it will lead to blockage and congestion of blockchain transactions, which will affect the generation speed of new blocks in the blockchain network. At the same time, because the contract is not executed, subsequent transfers of the contract initiating account are also Blocking cannot proceed.
发明内容Summary of the Invention
本本发明的目的在于克服现有技术的缺陷,提供一种异步执行智能合约的方法,解决上述技术问题。The purpose of the present invention is to overcome the defects of the prior art, provide a method for asynchronously executing smart contracts, and solve the above technical problems.
本发明实现上述目的的技术方案为:The technical solution of the present invention to achieve the above objective is:
一种异步执行智能合约的方法,应用于区块链网络,包括:A method for asynchronously executing smart contracts, applied to a blockchain network, including:
通过合约发起者发起合约调用交易并在区块链网络中进行广播;Initiate contract call transactions through the contract initiator and broadcast on the blockchain network;
通过全网打包节点将所述合约调用交易打包存入第一区块;Package the contract call transaction into the first block through a network-wide packaging node;
通过第一挖矿节点执行所述合约调用交易得到合约返回结果交易,并将所 述合约返回结果交易打包存入第二区块;Execute the contract call transaction through the first mining node to obtain a contract return result transaction, and package the contract return result transaction into a second block;
通过验证节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。The verification node calls and executes the contract invocation transaction in the first block and the contract return result transaction in the second block respectively. If the results are consistent, the transaction is completed.
本发明还提供一种异步执行智能合约的装置,包括:The present invention also provides a device for asynchronously executing a smart contract, including:
发起单元:用于发起合约调用交易并在区块链网络中进行广播;Initiation unit: used to initiate contract call transactions and broadcast on the blockchain network;
打包单元:用于将所述合约调用交易打包存入第一区块;A packing unit: used to pack and store the contract call transaction into a first block;
挖矿单元:用于执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块;Mining unit: used to execute the contract call transaction to obtain a contract return result transaction, and package the contract return result transaction into a second block;
验证单元:用于分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。Verification unit: used to invoke and execute the contract invocation transaction in the first block and the contract return result transaction in the second block respectively, and if the results are consistent, the transaction is completed.
本发明还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行上述一种异步执行智能合约的方法的步骤。The present invention also provides a computer device including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor causes the processor to execute the foregoing asynchronous execution of a smart contract. Method steps.
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行上述一种异步执行智能合约的方法的步骤。The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the processor causes the processor to execute the foregoing method for asynchronously executing a smart contract. A step of.
本发明取得的有益技术效果:通过将合约交易拆分为合约调用交易和合约返回结果交易,并对两者异步执行,区块链网络内的节点只需要完成合约调用交易即可开始执行下一个合约调用交易或普通转账交易,相较于现有的顺序执行,不需要等待合约执行完成,不会造成网络堵塞;并且,将合约调用与合约返回结果异步执行,合约发起账户只需要保证合约调用交易执行完成,不管合约交易是否执行完成,都可以进行普通转账交易,提高用户的交易体验。The beneficial technical effect obtained by the present invention: By splitting a contract transaction into a contract invocation transaction and a contract return result transaction, and executing the two asynchronously, the nodes in the blockchain network only need to complete the contract invocation transaction to start executing the next one. Contract call transactions or ordinary transfer transactions, compared to the existing sequential execution, do not need to wait for the contract execution to complete, and will not cause network congestion; and, the contract call and the contract return result are executed asynchronously, and the contract initiation account only needs to guarantee the contract call The transaction execution is completed, regardless of whether the contract transaction is executed or not, ordinary transfer transactions can be performed to improve the user's transaction experience.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1示出了适于本发明实施例提供的一种异步执行智能合约的方法的实施环境示意图;FIG. 1 shows a schematic diagram of an implementation environment of a method for asynchronously executing a smart contract provided by an embodiment of the present invention; FIG.
图2示出了适于本发明实施例提供的一种异步执行智能合约的方法流程图;FIG. 2 shows a flowchart of a method for asynchronously executing a smart contract provided by an embodiment of the present invention;
图3示出了适于本发明实施例提供的一种异步执行智能合约的方法的合约交易流程图;3 shows a contract transaction flowchart suitable for a method for asynchronously executing a smart contract provided by an embodiment of the present invention;
图4示出了适于本实施例提供的一种异步执行智能合约方法的验证过程流程图;FIG. 4 is a flowchart illustrating a verification process of a method for asynchronously executing a smart contract provided by this embodiment; FIG.
图5示出了适于本实施例提供的一种异步执行智能合约装置的结构示意图。FIG. 5 is a schematic structural diagram of an asynchronous execution smart contract device suitable for the embodiment.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
本发明实施例,通过将合约交易拆分为合约调用交易和合约返回结果交易,并对两者异步执行,确保智能合约执行时区块链网络交易打包的顺畅进行的同时,在合约未执行的情况下,也不会阻塞合约发起账户的普通转账调用。In the embodiment of the present invention, the contract transaction is divided into a contract call transaction and a contract return result transaction, and the two are executed asynchronously to ensure that the blockchain network transaction packaging is performed smoothly during the execution of the smart contract, while the contract is not executed It will not block the general transfer call of the account initiated by the contract.
实施例一Example one
图1示出了适于本发明实施例提供的一种异步执行智能合约的方法的实施环境示意图。FIG. 1 shows a schematic diagram of an implementation environment of a method for asynchronously executing a smart contract provided by an embodiment of the present invention.
用户发起合约交易,各个节点对合约进行打包、执行、挖矿验证,确保合约顺利进行。Users initiate contract transactions, and each node packages, executes, and verifies the contract to ensure that the contract proceeds smoothly.
图2示出了适于本发明实施例提供的一种异步执行智能合约的方法的步骤流程图。FIG. 2 shows a flowchart of steps of a method for asynchronously executing a smart contract provided by an embodiment of the present invention.
图3示出了适于本发明实施例提供的一种异步执行智能合约的方法的合约交易流程图。FIG. 3 shows a contract transaction flowchart suitable for a method for asynchronously executing a smart contract provided by an embodiment of the present invention.
在图3中,state1、state2……staten代表区块,交易签名验证是指用户在客 户端交易密码进行验证,包括但不限于输入密码、录入指纹、私钥签名、CA证书签名等,当密码验证不通过时,交易被抛弃,无法继续进行;虚拟机执行合约是指在虚拟机当中执行,创世块是指整个区块链网络中最早创建的区块。In Figure 3, state1, state2, ... staten represent blocks. Transaction signature verification refers to the verification of a user's transaction password on the client, including but not limited to entering a password, entering a fingerprint, a private key signature, and a CA certificate signature. When the verification fails, the transaction is abandoned and cannot be continued; the virtual machine execution contract refers to the execution in the virtual machine, and the genesis block refers to the earliest created block in the entire blockchain network.
在步骤S101中,通过合约发起者发起合约调用交易并在区块链网络中进行广播。In step S101, a contract invocation transaction is initiated by a contract initiator and broadcasted in a blockchain network.
在本发明实施例中,合约发起者是指需要执行智能合约的属于区块链网络节点的用户终端,当该用户终端需要签订智能合约(contract)时,会将智能合约的调用作为一个合约调用交易(tx1)发起,并将该合约调用交易(tx1)在整个区块链网络中进行广播。其中,该用户终端包括但不限于手机、电脑、平板。In the embodiment of the present invention, the contract initiator refers to a user terminal belonging to a blockchain network node that needs to execute a smart contract. When the user terminal needs to sign a smart contract (contract), the call of the smart contract will be called as a contract. The transaction (tx1) is initiated, and the contract call transaction (tx1) is broadcast across the entire blockchain network. The user terminal includes, but is not limited to, a mobile phone, a computer, and a tablet.
在步骤S102中,通过全网打包节点将所述合约调用交易打包存入第一区块。In step S102, the contract invocation transaction is packaged and stored in the first block through a network-wide packaging node.
在本发明实施例中,第一区块(state1)是指存有合约调用交易数据(tx1)的区块。In the embodiment of the present invention, the first block (state1) refers to a block that stores contract call transaction data (tx1).
全网打包节点是指整个区块链网络内的能够对数据进行打包的网络节点,网络节点是指一个具有独立地址和具有传送和接收数据功能的网络相连的一台电脑或者其他设备,包括但不限于工作站、客户、网络用户或个人计算机等。打包是指对一个或多个文件数据进行压缩,压制成一个压缩文件包,这样既可以节省存储空间,又方便数据在网络间的传送。当某个打包节点(node1)接收到合约调用交易数据(tx1)后,会将该合约调用交易数据(tx1)打包存入第一块(state1)。A network-wide packaging node refers to a network node that can package data in the entire blockchain network. A network node refers to a computer or other device connected to the network with an independent address and a function of transmitting and receiving data. Not limited to workstations, clients, network users, or personal computers. Packing refers to compressing one or more file data into a compressed file package, which can save storage space and facilitate data transmission between networks. When a packaging node (node1) receives the contract call transaction data (tx1), it will pack the contract call transaction data (tx1) into the first block (state1).
进一步的,当某个打包节点(node1)接收到合约调用交易数据(tx1)后,将所述合约调用交易数据(tx1)同时存入第一待打包交易队列和第一合约队列;当该打包节点(node1)将合约调用交易数据(tx1)存入第一待打包交易队列后,打包节点(node1)开始在第一待打包交易队列中选取交易进行打包,当选取到合约调用交易数据(tx1)时,将该合约调用交易数据(tx1)打包存入第一区块(state1),并广播所述第一区块(state1)。Further, when a packaging node (node1) receives the contract invocation transaction data (tx1), it stores the contract invocation transaction data (tx1) into the first to-be-packaged transaction queue and the first contract queue at the same time; After the node (node1) stores the contract invocation transaction data (tx1) in the first to-be-packaged transaction queue, the packaging node (node1) starts to select transactions for packaging in the first to-be-packaged transaction queue. When the contract invocation transaction data (tx1) is selected ), Package the contract call transaction data (tx1) into the first block (state1), and broadcast the first block (state1).
其中,第一待打包交易和第一合约队列是指接收到合约调用交易数据(tx1)的打包节点(node1)自身所创建的队列。The first to-be-packaged transaction and the first contract queue refer to a queue created by the packaging node (node1) that receives the contract call transaction data (tx1).
在步骤S103中,通过第一挖矿节点执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块。In step S103, the contract invoking transaction is executed by the first mining node to obtain a contract return result transaction, and the contract return result transaction is packaged and stored in the second block.
在本发明实施例中,第一挖矿节点(node2)是指某一个调用合约调用交易(tx1)的挖矿节点,第一挖矿节点(node2)会执行合约调用交易(tx1),其执行过程由虚拟机完成,根据执行结果,第一挖矿节点(node2)会创建合约返回结果交易(tx2),并将合约返回结果交易数据(tx2)打包存入第二区块(state2)。In the embodiment of the present invention, the first mining node (node2) refers to a mining node that invokes a contract invoking transaction (tx1), and the first mining node (node2) executes a contract invoking transaction (tx1), which executes The process is completed by the virtual machine. According to the execution result, the first mining node (node2) will create a contract return result transaction (tx2), and package the contract return result transaction data (tx2) into the second block (state2).
其中,第二区块(state2)是指存有合约返回结果交易数据(tx2)的区块。Among them, the second block (state2) refers to the block storing the transaction data (tx2) returned by the contract.
具体的,当挖矿节点在执行挖矿任务时,接收到到合约调用交易数据(tx1)的第一挖矿节点(node2)会通过虚拟机执行合约调用交易(tx1),并根据执行结果创建合约返回结果交易(tx2),然后将合约返回结果交易数据(tx2)存入第二待打包交易队列和第二合约队列;然后第一挖矿节点(node2)对第二打包交易队列中的交易进行打包时,会将合约返回结果交易数据(tx2)打包进第二区块(state2),并广播第二区块(state2)。Specifically, when a mining node is performing a mining task, the first mining node (node2) that receives the contract invocation transaction data (tx1) will execute the contract invocation transaction (tx1) through a virtual machine, and create it according to the execution result. The contract returns the result transaction (tx2), and then stores the contract return result transaction data (tx2) into the second to-be-packaged transaction queue and the second contract queue; then the first mining node (node2) pairs the transactions in the second packaged transaction queue. When packaging, the contract returns the result transaction data (tx2) into the second block (state2) and broadcasts the second block (state2).
其中第二待打包交易队列和第二合约队列是第一挖矿节点(node2)自身创建的队列。The second transaction queue to be packaged and the second contract queue are queues created by the first mining node (node2) itself.
在步骤S104中,通过验证节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。In step S104, the verification node calls and executes the contract invocation transaction in the first block and the contract return result transaction in the second block respectively. If the results are consistent, the transaction is completed.
在本发明实施例中,步骤S104是对第一挖矿节点(node2)执行结果的验证,图4示出了实用本实施例提供的一种异步执行智能合约方法的验证过程流程图。In the embodiment of the present invention, step S104 is verification of the execution result of the first mining node (node2). FIG. 4 shows a flowchart of a verification process of an asynchronous smart contract execution method provided by this embodiment.
验证节点是指区块链网络中除去第一挖矿节点(node2)的其它挖矿节点,验证节点会对第一挖矿节点(node2)的执行结果进行验证,只有所有的验证节点对第一挖矿节点(node2)的执行结果都验证通过后,交易才能完成。The verification node refers to other mining nodes except the first mining node (node2) in the blockchain network. The verification node verifies the execution result of the first mining node (node2). Only all the verification nodes verify the first mining node. After the execution results of the mining node (node2) are verified and passed, the transaction can be completed.
验证节点在接收到区块(state2)之后,获取区块(state2)内的交易数据,当该交易是合约返回结果交易(tx2)时,在虚拟机内执行区块(state1)内合约调用交易(tx1)并返回返回合约执行结果(tx2'),对两个执行结果的哈希值(哈希算法是本领域常用的一种算法,具有文件校验功能,本文不再做介绍)进行对比(hash(tx2')==hash(tx2)?),当两者的哈希值相等时,该验证节点的验证才算通过,当所有的验证节点都验证通过时,该交易验证通过,交易完成。After receiving the block (state2), the verification node obtains the transaction data in the block (state2), and when the transaction is a contract return result transaction (tx2), the contract in the block (state1) is executed in the virtual machine. (tx1) and return the contract execution result (tx2 '), and compare the hash values of the two execution results (the hash algorithm is a commonly used algorithm in the field and has a file verification function, which is not described in this article) (hash (tx2 ') == hash (tx2)?), when the hash values of the two are equal, the verification of the verification node is passed. When all the verification nodes are verified, the transaction is verified and the transaction is passed. carry out.
进一步的,若结果不一致,则判定所述第二区块内的所述合约返回结果交易为非法交易,判定所述第二区块为非法区块且将不被节点接受。Further, if the results are not consistent, it is determined that the contract return result transaction in the second block is an illegal transaction, and the second block is determined to be an illegal block and will not be accepted by the node.
当第二区块(state2)被判定为非法区块时,第二区块(state2)内的合约返回结果交易数据(tx2)将会作废,需要重新进入步骤S103,直到交易完成。When the second block (state2) is determined as an illegal block, the contract return result transaction data (tx2) in the second block (state2) will be invalidated, and it will be necessary to re-enter step S103 until the transaction is completed.
本发明实施例通过将合约交易拆分为合约调用交易和合约返回结果交易,并对两者异步执行,区块链网络内的节点只需要完成合约调用交易即可开始执行下一个合约交易,相较于现有的顺序执行,不需要等待合约执行完成,不会造成网络堵塞;并且,将合约调用与合约返回结果异步执行,合约发起账户只需要保证合约调用交易执行完成,不管合约交易是否执行完成,都可以进行普通转账交易,提升用户交易体验。In the embodiment of the present invention, the contract transaction is divided into a contract call transaction and a contract return result transaction, and the two are executed asynchronously. The nodes in the blockchain network only need to complete the contract call transaction to start executing the next contract transaction. Compared with the existing sequential execution, there is no need to wait for the contract execution to complete, which will not cause network congestion. Moreover, the contract call and the contract return result are executed asynchronously. The contract initiation account only needs to ensure that the contract call transaction execution is completed, regardless of whether the contract transaction is executed. Once completed, you can perform ordinary transfer transactions to improve user transaction experience.
实施例二Example two
图5示出了本发明实施例提供的一种异步执行智能合约装置的结构示意图,应用于区块链网络,为了说明方便,仅示出与本发明相关的部分。FIG. 5 shows a schematic structural diagram of an asynchronous execution smart contract device provided by an embodiment of the present invention, which is applied to a blockchain network. For convenience of description, only parts related to the present invention are shown.
在本发明实施例中,异步执行智能合约装置包括发起单元510、打包单元520、挖矿单元530以及验证单元540。In the embodiment of the present invention, the asynchronous contract execution smart device includes an initiating unit 510, a packaging unit 520, a mining unit 530, and a verification unit 540.
发起单元510,用于发起合约调用交易并在区块链网络中进行广播;An initiation unit 510, configured to initiate a contract call transaction and broadcast it in a blockchain network;
在本发明实施例中,合约发起者是指需要执行智能合约的属于区块链网络节点的用户终端,当该用户终端需要签订智能合约(contract)时,会将智能合约的调用作为一个合约调用交易(tx1)发起,并将该合约调用交易(tx1)在整个区块链网络中进行广播。其中,该用户终端包括但不限于手机、电脑、平板。In the embodiment of the present invention, the contract initiator refers to a user terminal belonging to a blockchain network node that needs to execute a smart contract. When the user terminal needs to sign a smart contract (contract), the call of the smart contract will be called as a contract. The transaction (tx1) is initiated, and the contract call transaction (tx1) is broadcast across the entire blockchain network. The user terminal includes, but is not limited to, a mobile phone, a computer, and a tablet.
打包单元520,用于将所述合约调用交易打包存入第一区块;A packaging unit 520, configured to package and store the contract call transaction into a first block;
在本发明实施例中,第一区块(state1)是指存有合约调用交易数据(tx1)的区块。In the embodiment of the present invention, the first block (state1) refers to a block that stores contract call transaction data (tx1).
全网打包节点是指整个区块链网络内的能够对数据进行打包的网络节点,网络节点是指一个具有独立地址和具有传送和接收数据功能的网络相连的一台电脑或者其他设备,包括但不限于工作站、客户、网络用户或个人计算机等。打包是指对一个或多个文件数据进行压缩,压制成一个压缩文件包,这样既可以节省存储空间,又方便数据在网络间的传送。当某个打包节点(node1)接收到合约调用交易数据(tx1)后,会将该合约调用交易数据(tx1)打包存入第一块(state1)。A network-wide packaging node refers to a network node that can package data in the entire blockchain network. A network node refers to a computer or other device connected to the network with an independent address and a function of transmitting and receiving data. Not limited to workstations, clients, network users, or personal computers. Packing refers to compressing one or more file data into a compressed file package, which can save storage space and facilitate data transmission between networks. When a packaging node (node1) receives the contract call transaction data (tx1), it will pack the contract call transaction data (tx1) into the first block (state1).
进一步的,当某个打包节点(node1)接收到合约调用交易数据(tx1)后,将所述合约调用交易数据(tx1)同时存入第一待打包交易队列和第一合约队列;当该打包节点(node1)将合约调用交易数据(tx1)存入第一待打包交易队列后,打包节点(node1)开始在第一待打包交易队列中选取交易进行打包,当选取到合约调用交易数据(tx1)时,将该合约调用交易数据(tx1)打包存入第一区块(state1),并广播所述第一区块(state1)。Further, when a packaging node (node1) receives the contract invocation transaction data (tx1), it stores the contract invocation transaction data (tx1) into the first to-be-packaged transaction queue and the first contract queue at the same time; After the node (node1) stores the contract invocation transaction data (tx1) in the first to-be-packaged transaction queue, the packaging node (node1) starts to select transactions for packaging in the first to-be-packaged transaction queue. When the contract invocation transaction data (tx1) is selected ), Package the contract call transaction data (tx1) into the first block (state1), and broadcast the first block (state1).
其中,第一待打包交易和第一合约队列是指接收到合约调用交易数据(tx1)的打包节点(node1)自身所创建的队列。The first to-be-packaged transaction and the first contract queue refer to a queue created by the packaging node (node1) that receives the contract call transaction data (tx1).
挖矿单元530,用于执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块;A mining unit 530, configured to execute the contract call transaction to obtain a contract return result transaction, and package the contract return result transaction into a second block;
在本发明实施例中,第一挖矿节点(node2)是指某一个调用合约调用交易(tx1)的挖矿节点,第一挖矿节点(node2)会执行合约调用交易(tx1),其执行过程由虚拟机完成,根据执行结果,第一挖矿节点(node2)会创建合约返回结果交易(tx2),并将合约返回结果交易数据(tx2)打包存入第二区块(state2)。In the embodiment of the present invention, the first mining node (node2) refers to a mining node that invokes a contract invoking transaction (tx1), and the first mining node (node2) executes a contract invoking transaction (tx1), which executes The process is completed by the virtual machine. According to the execution result, the first mining node (node2) will create a contract return result transaction (tx2), and package the contract return result transaction data (tx2) into the second block (state2).
其中,第二区块(state2)是指存有合约返回结果交易数据(tx2)的区块。Among them, the second block (state2) refers to the block storing the transaction data (tx2) returned by the contract.
具体的,当挖矿节点在执行挖矿任务时,接收到合约调用交易数据(tx1) 的第一挖矿节点(node2)会通过虚拟机执行合约调用交易(tx1),并根据执行结果创建合约返回结果交易(tx2),然后将合约返回结果交易数据(tx2)存入第二待打包交易队列和第二合约队列;然后第一挖矿节点(node2)对第二打包交易队列中的交易进行打包时,会将合约返回结果交易数据(tx2)打包进第二区块(state2),并广播第二区块(state2)。Specifically, when the mining node is performing a mining task, the first mining node (node2) that receives the contract call transaction data (tx1) will execute the contract call transaction (tx1) through the virtual machine, and create a contract according to the execution result Return the result transaction (tx2), and then store the contract return result transaction data (tx2) in the second to-be-packaged transaction queue and the second contract queue; then the first mining node (node2) performs the transactions in the second packaged transaction queue When packaging, the contract returns the result transaction data (tx2) into the second block (state2) and broadcasts the second block (state2).
其中第二待打包交易队列和第二合约队列是第一挖矿节点(node2)自身创建的队列。The second transaction queue to be packaged and the second contract queue are queues created by the first mining node (node2) itself.
验证单元540,用于分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。The verification unit 540 is configured to invoke and execute the contract invocation transaction in the first block and the contract return result transaction in the second block respectively. If the results are consistent, the transaction is completed.
在本发明实施例中,步骤S104是对第一挖矿节点(node2)执行结果的验证,图4示出了实用本实施例提供的一种异步执行智能合约方法的验证过程流程图。In the embodiment of the present invention, step S104 is verification of the execution result of the first mining node (node2). FIG. 4 shows a flowchart of a verification process of an asynchronous smart contract execution method provided by this embodiment.
验证节点是指区块链网络中除去第一挖矿节点(node2)的其它挖矿节点,验证节点会对第一挖矿节点(node2)的执行结果进行验证,只有所有的验证节点对第一挖矿节点(node2)的执行结果都验证通过后,交易才能完成。The verification node refers to other mining nodes except the first mining node (node2) in the blockchain network. The verification node verifies the execution result of the first mining node (node2). Only all the verification nodes verify the first mining node. After the execution results of the mining node (node2) are verified and passed, the transaction can be completed.
验证节点在接收到区块(state2)之后,获取区块(state2)内的交易数据,当该交易是合约返回结果交易(tx2)时,在虚拟机内执行区块(state1)内合约调用交易(tx1)并返回返回合约执行结果(tx2'),对两个执行结果的哈希值(哈希算法是本领域常用的一种算法,具有文件校验功能,本文不再做介绍)进行对比(hash(tx2')==hash(tx2)?),当两者的哈希值相等时,该验证节点的验证才算通过,当所有的验证节点都验证通过时,该交易验证通过,交易完成。After receiving the block (state2), the verification node obtains the transaction data in the block (state2), and when the transaction is a contract return result transaction (tx2), the contract in the block (state1) is executed in the virtual machine. (tx1) and return the contract execution result (tx2 '), and compare the hash values of the two execution results (the hash algorithm is a commonly used algorithm in the field and has a file verification function, which is not described in this article) (hash (tx2 ') == hash (tx2)?), when the hash values of the two are equal, the verification of the verification node is passed. When all the verification nodes are verified, the transaction is verified and the transaction is passed. carry out.
进一步的,若结果不一致,则判定所述第二区块内的所述合约返回结果交易为非法交易,判定所述第二区块为非法区块且将不被节点接受。Further, if the results are not consistent, it is determined that the contract return result transaction in the second block is an illegal transaction, and the second block is determined to be an illegal block and will not be accepted by the node.
当第二区块(state2)被判定为非法区块时,第二区块(state2)内的合约返回结果交易数据(tx2)将会作废,需要重新进入步骤S103,直到交易完成。When the second block (state2) is determined as an illegal block, the contract return result transaction data (tx2) in the second block (state2) will be invalidated, and it will be necessary to re-enter step S103 until the transaction is completed.
本发明实施例通过将合约交易拆分为合约调用交易和合约返回结果交易, 并对两者异步执行,区块链网络内的节点只需要完成合约调用交易即可开始执行下一个合约交易,相较于现有的顺序执行,不需要等待合约执行完成,不会造成网络堵塞;并且,将合约调用与合约返回结果异步执行,合约发起账户只需要保证合约调用交易执行完成,不管合约交易是否执行完成,都可以进行普通转账交易,提升用户交易体验。In the embodiment of the present invention, the contract transaction is divided into a contract call transaction and a contract return result transaction, and the two are executed asynchronously. The nodes in the blockchain network only need to complete the contract call transaction to start executing the next contract transaction. Compared with the existing sequential execution, there is no need to wait for the contract execution to complete, which will not cause network congestion. Moreover, the contract call and the contract return result are executed asynchronously. The contract initiation account only needs to ensure that the contract call transaction execution is completed, regardless of whether the contract transaction is executed Once completed, you can perform ordinary transfer transactions to improve user transaction experience.
本发明还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行实施例中一种异步执行智能合约的方法的步骤:The present invention also provides a computer device including a memory and a processor, where the computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes an asynchronous execution intelligence in the embodiment. The steps of the contract method:
通过合约发起者发起合约调用交易并在区块链网络中进行广播;Initiate contract call transactions through the contract initiator and broadcast on the blockchain network;
通过全网打包节点将所述合约调用交易打包存入第一区块;Package the contract call transaction into the first block through a network-wide packaging node;
通过第一挖矿节点执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块;Executing the contract invocation transaction through the first mining node to obtain a contract return result transaction, and packaging the contract return result transaction into a second block;
通过验证节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。The verification node calls and executes the contract invocation transaction in the first block and the contract return result transaction in the second block respectively. If the results are consistent, the transaction is completed.
在一个实施例中,提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时,使得处理器执行以下步骤:In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor causes the processor to perform the following steps:
通过合约发起者发起合约调用交易并在区块链网络中进行广播;Initiate contract call transactions through the contract initiator and broadcast on the blockchain network;
通过全网打包节点将所述合约调用交易打包存入第一区块;Package the contract call transaction into the first block through a network-wide packaging node;
通过第一挖矿节点执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块;Executing the contract invocation transaction through the first mining node to obtain a contract return result transaction, and packaging the contract return result transaction into a second block;
通过验证节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。The verification node calls and executes the contract invocation transaction in the first block and the contract return result transaction in the second block respectively. If the results are consistent, the transaction is completed.
应该理解的是,虽然本发明各实施例的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,各实施例中的至少一部分步骤可以包括多个子步骤或 者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowchart of the embodiments of the present invention are sequentially displayed in accordance with the instructions of the arrows, these steps are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly stated in this document, the execution of these steps is not strictly limited, and these steps can be performed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order is not necessarily sequential, but may be performed in turn or alternately with at least a part of another step or a sub-step or stage of another step.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by using a computer program to instruct related hardware. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the methods described above. Wherein, any reference to the memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the embodiments described above can be arbitrarily combined. In order to simplify the description, all possible combinations of the technical features in the above embodiments have not been described. However, as long as there is no contradiction in the combination of these technical features, It should be considered as the scope described in this specification.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present invention, and their descriptions are more specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, which all belong to the protection scope of the present invention. Therefore, the protection scope of the invention patent shall be subject to the appended claims.

Claims (10)

  1. 一种异步执行智能合约的方法,应用于区块链网络,其特征在于,包括:A method for asynchronously executing smart contracts, which is applied to a blockchain network, is characterized by:
    通过合约发起者发起合约调用交易并在区块链网络中进行广播;Initiate contract call transactions through the contract initiator and broadcast on the blockchain network;
    通过全网打包节点将所述合约调用交易打包存入第一区块;Package the contract call transaction into the first block through a network-wide packaging node;
    通过第一挖矿节点执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块;Executing the contract invocation transaction through the first mining node to obtain a contract return result transaction, and packaging the contract return result transaction into a second block;
    通过验证节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。The verification node calls and executes the contract invocation transaction in the first block and the contract return result transaction in the second block respectively. If the results are consistent, the transaction is completed.
  2. 根据权利要求1所述的一种异步执行智能合约的方法,其特征在于,所述通过全网打包节点将所述合约调用交易打包存入第一区块的步骤包括:The method for asynchronously executing a smart contract according to claim 1, wherein the step of packaging the contract call transaction into the first block through a network-wide packaging node comprises:
    通过全网打包节点接收所述合约调用交易,将所述合约调用交易存入第一待打包交易队列和第一合约队列;Receiving the contract invocation transaction through a network-wide packaging node, and storing the contract invocation transaction in a first to-be-packaged transaction queue and a first contract queue;
    将所述第一待打包交易队列中的合约调用交易打包存入第一区块,并广播所述第一区块。The contract call transaction in the first to-be-packaged transaction queue is packaged and stored in a first block, and the first block is broadcast.
  3. 根据权利要求2所述的一种异步执行智能合约的方法,其特征在于,所述通过第一挖矿节点执行所述合约调用交易得到合约返回结果交易的步骤包括:The method for asynchronously executing a smart contract according to claim 2, wherein the step of performing the contract call transaction by the first mining node to obtain a contract return result transaction comprises:
    当第一挖矿节点执行挖矿任务时,若执行到所述合约调用交易,则根据所述合约调用交易产生的执行结果发起合约返回结果交易;When the first mining node executes a mining task, if the contract call transaction is executed, a contract return result transaction is initiated according to the execution result generated by the contract call transaction;
    将所述合约返回结果交易存入第二打包交易队列和第二合约队列;Storing the transaction returned by the contract into the second packaged transaction queue and the second contract queue;
    将所述第二打包交易队列中的合约返回结果交易打包进第二区块,并广播所述第二区块。The transaction returned by the contract in the second packaged transaction queue is packaged into a second block, and the second block is broadcast.
  4. 根据权利要求3所述的一种异步执行智能合约的方法,其特征在于,所述通过验证节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成的步骤包括:The method for asynchronously executing a smart contract according to claim 3, wherein the verification node calls and executes the contract call transaction in the first block and the second block The contract returns a result transaction. If the results are consistent, the steps of completing the transaction include:
    除去所述第一挖矿节点以外的其他挖矿节点分别调用、执行所述第一区块 内的所述合约调用交易和所述第二区块的所述合约返回结果交易,并判断两者的结果是否一致;Mining nodes other than the first mining node respectively call and execute the contract invocation transaction in the first block and the contract return result transaction in the second block, and judge both Whether the results are consistent;
    若结果一致,则验证通过,交易完成;If the results are consistent, the verification is passed and the transaction is completed;
    若结果不一致,则判定所述第二区块内的所述合约返回结果交易为非法交易,判定所述第二区块为非法区块且将不被节点接受。If the results are inconsistent, it is determined that the contract return result transaction in the second block is an illegal transaction, and the second block is determined to be an illegal block and will not be accepted by the node.
  5. 一种异步执行智能合约的装置,其特征在于,包括:A device for asynchronously executing a smart contract is characterized in that it includes:
    发起单元:用于发起合约调用交易并在区块链网络中进行广播;Initiation unit: used to initiate contract call transactions and broadcast on the blockchain network;
    打包单元:用于将所述合约调用交易打包存入第一区块;A packing unit: used to pack and store the contract call transaction into a first block;
    挖矿单元:用于执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块;Mining unit: used to execute the contract call transaction to obtain a contract return result transaction, and package the contract return result transaction into a second block;
    验证单元:用于分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成。Verification unit: used to invoke and execute the contract invocation transaction in the first block and the contract return result transaction in the second block respectively, and if the results are consistent, the transaction is completed.
  6. 根据权利要求5所述的一种异步执行智能合约的装置,其特征在于,所述用于将所述合约调用交易打包存入第一区块具体包括:The device for asynchronously executing a smart contract according to claim 5, wherein the step of packaging and storing the contract call transaction into the first block specifically comprises:
    通过全网打包节点接收所述合约调用交易,将所述合约调用交易存入第一待打包交易队列和第一合约队列;Receiving the contract invocation transaction through a network-wide packaging node, and storing the contract invocation transaction in a first to-be-packaged transaction queue and a first contract queue;
    将所述第一待打包交易队列中的合约调用交易打包存入第一区块,并广播所述第一区块。The contract call transaction in the first to-be-packaged transaction queue is packaged and stored in a first block, and the first block is broadcast.
  7. 根据权利要求5所述的一种异步执行智能合约的装置,其特征在于,所述用于执行所述合约调用交易得到合约返回结果交易,并将所述合约返回结果交易打包存入第二区块具体包括:The device for asynchronously executing a smart contract according to claim 5, characterized in that the method for executing the contract call transaction obtains a contract return result transaction, and packs the contract return result transaction into the second area The blocks specifically include:
    当第一挖矿节点执行挖矿任务时,若执行到所述合约调用交易,则根据执行结果发起合约返回结果交易;When the first mining node performs a mining task, if the contract invocation transaction is executed, a contract is returned according to the execution result to return a result transaction;
    将所述合约返回结果交易存入第二打包交易队列和第二合约队列;Storing the transaction returned by the contract into the second packaged transaction queue and the second contract queue;
    将所述第二打包交易队列中的合约返回结果交易打包进第二区块,并广播所述第二区块。The transaction returned by the contract in the second packaged transaction queue is packaged into a second block, and the second block is broadcast.
  8. 根据权利要求5所述的一种异步执行智能合约的装置,其特征在于,所述用于分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,若结果一致,则交易完成具体包括:The device for asynchronously executing a smart contract according to claim 5, characterized in that the means for invoking and executing the contract invocation transaction in the first block and all the transactions in the second block are separately performed. The contract returns the result transaction. If the results are consistent, the transaction completion includes:
    除去所述第一挖矿节点以外的其他挖矿节点分别调用、执行所述第一区块内的所述合约调用交易和所述第二区块的所述合约返回结果交易,并判断两者的结果是否一致;Mining nodes other than the first mining node respectively call and execute the contract invocation transaction in the first block and the contract return result transaction in the second block, and judge both Whether the results are consistent;
    若结果一致,则验证通过,交易完成;If the results are consistent, the verification is passed and the transaction is completed;
    若结果不一致,则判定所述第二区块内的所述合约返回结果交易为非法交易,判定所述第二区块为非法区块且将不被节点接受。If the results are inconsistent, it is determined that the contract return result transaction in the second block is an illegal transaction, and the second block is determined to be an illegal block and will not be accepted by the node.
  9. 一种计算机设备,其特征在于,包括存储器和处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行权利要求1至4中任一项权利要求所述一种异步执行智能合约的方法的步骤。A computer device, comprising a memory and a processor, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the processor causes the processor to execute any one of claims 1 to 4 The steps of a method for asynchronously executing a smart contract according to the claim.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行权利要求1至4中任一项权利要求所述一种异步执行智能合约的方法的步骤。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the processor causes the processor to execute any one of claims 1 to 4 The steps of a method for executing a smart contract asynchronously.
PCT/CN2019/077935 2018-08-27 2019-03-13 Method for asynchronous execution of smart contract, apparatus, computer device and storage medium WO2020042588A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810978791.3 2018-08-27
CN201810978791.3A CN109118364A (en) 2018-08-27 2018-08-27 Method, apparatus, computer equipment and the storage medium of asynchronous execution intelligence contract

Publications (1)

Publication Number Publication Date
WO2020042588A1 true WO2020042588A1 (en) 2020-03-05

Family

ID=64860933

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077935 WO2020042588A1 (en) 2018-08-27 2019-03-13 Method for asynchronous execution of smart contract, apparatus, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN109118364A (en)
WO (1) WO2020042588A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118364A (en) * 2018-08-27 2019-01-01 深圳前海益链网络科技有限公司 Method, apparatus, computer equipment and the storage medium of asynchronous execution intelligence contract
KR102354776B1 (en) 2019-03-04 2022-01-25 어드밴스드 뉴 테크놀로지스 씨오., 엘티디. Method and device for providing transaction data to a blockchain system for processing
CN110245956B (en) * 2019-05-15 2022-07-05 众安信息技术服务有限公司 Asynchronous multi-chain based block chain transaction confirmation method and system
CN110442652B (en) * 2019-08-15 2021-09-21 腾讯科技(深圳)有限公司 Cross-chain data processing method and device based on block chain
CN111865907A (en) * 2020-06-08 2020-10-30 深圳前海益链网络科技有限公司 Single-point execution single-point verification block chain intelligent contract system, realization method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103054A (en) * 2017-04-12 2017-08-29 北京航空航天大学 The intelligent contract asynchronous execution storage system and implementation method of a kind of privately owned block chain
CN108376106A (en) * 2018-02-01 2018-08-07 中国工商银行股份有限公司 A kind of block chain message feedback method and system
CN109118364A (en) * 2018-08-27 2019-01-01 深圳前海益链网络科技有限公司 Method, apparatus, computer equipment and the storage medium of asynchronous execution intelligence contract

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
CN107193672B (en) * 2017-05-31 2020-01-14 无锡井通网络科技有限公司 Cross-block asynchronous contract calling system
CN107833060B (en) * 2017-11-13 2020-12-25 中国银行股份有限公司 Verification method and system for intelligent contract transaction in block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103054A (en) * 2017-04-12 2017-08-29 北京航空航天大学 The intelligent contract asynchronous execution storage system and implementation method of a kind of privately owned block chain
CN108376106A (en) * 2018-02-01 2018-08-07 中国工商银行股份有限公司 A kind of block chain message feedback method and system
CN109118364A (en) * 2018-08-27 2019-01-01 深圳前海益链网络科技有限公司 Method, apparatus, computer equipment and the storage medium of asynchronous execution intelligence contract

Also Published As

Publication number Publication date
CN109118364A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
WO2020042588A1 (en) Method for asynchronous execution of smart contract, apparatus, computer device and storage medium
US11196755B2 (en) Cross-blockchain interaction systems
US20180240114A1 (en) Transaction verification in a consensus network
WO2021036702A1 (en) Consensus method and device employing blockchain system
US8732709B2 (en) Transaction management in a web service messaging environment
WO2019075978A1 (en) Data transmission method and apparatus, computer device, and storage medium
CN110413304B (en) Intelligent contract hot upgrading method and device based on block chain network
CN109359994B (en) Service processing method, device and system based on block chain
CN109461079B (en) Transaction processing method and device based on block chain
CN111144883B (en) Processing performance analysis method and device for blockchain network
WO2018082451A1 (en) Application link expansion method, apparatus and system
WO2022007243A1 (en) Data processing method and apparatus for blockchain privacy protection, and computer device
CN111211911B (en) Collaborative signature method, device, equipment and system
WO2021121407A1 (en) Capacity changing method and apparatus for virtual machine
CN111708586A (en) Application starting configuration item loading method and device, computer equipment and storage medium
CN107104923A (en) A kind of account binding and the method and device of business processing
CN112308561A (en) Block chain-based evidence storing method and system, computer equipment and storage medium
CN112862490A (en) Output consensus method under asynchronous network
CN110908778A (en) Task deployment method, system and storage medium
WO2020173126A1 (en) Method and device for blockchain-based session data processing, equipment, and medium
CN110288477A (en) A kind of block chain transaction data processing method and relevant device
CN108399533B (en) Transaction processing method and device, computer equipment and storage medium
CN113312630B (en) Method and device for realizing trusted scheduling
WO2021184873A1 (en) Method and apparatus for data synchronization in blockchain network, and computing device
CN112995051B (en) Network traffic recovery method and device

Legal Events

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

Ref document number: 19855779

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 09.06.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19855779

Country of ref document: EP

Kind code of ref document: A1