CN113379550B - Block execution method, computer device and storage medium - Google Patents

Block execution method, computer device and storage medium Download PDF

Info

Publication number
CN113379550B
CN113379550B CN202110729026.XA CN202110729026A CN113379550B CN 113379550 B CN113379550 B CN 113379550B CN 202110729026 A CN202110729026 A CN 202110729026A CN 113379550 B CN113379550 B CN 113379550B
Authority
CN
China
Prior art keywords
transaction
chain
intelligent contract
block
executing
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110729026.XA
Other languages
Chinese (zh)
Other versions
CN113379550A (en
Inventor
何正军
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110729026.XA priority Critical patent/CN113379550B/en
Publication of CN113379550A publication Critical patent/CN113379550A/en
Application granted granted Critical
Publication of CN113379550B publication Critical patent/CN113379550B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention provides a block execution method, computer equipment and a storage medium, which relate to the technical field of block chains and the like, and the method comprises the following steps: the block chain module receives a first transaction, wherein the first transaction is a first type of transaction; caching a first index set required to be acquired for executing a first transaction by a first off-chain intelligent contract; the block chain module caches a second transaction of the first block to be executed; screening out each second transaction executable by the current off-chain intelligent contract by the second off-chain intelligent contract, searching out a second index set required to be obtained for executing each second transaction, obtaining a data set for executing each second transaction from the block chain according to the second index set and the block chain data read-write interface, and executing each second transaction according to the data set to obtain an execution result set; the block chain module executes the first block according to the first execution result set. The method and the device enable the block chain development to be more convenient.

Description

Block execution method, computer device and storage medium
Technical Field
The present application relates to the field of block chain technology, and in particular, to a block execution method, a computer device, and a storage medium.
Background
The intelligent contract language only supports partial languages, such as Solidity and WASM, and has the problems of learning threshold and high entrance difficulty; if a blockchain developer wants to add a new intelligent contract language to the chain, the developer needs to develop corresponding interpreted execution, such as JVM, which is difficult and costly.
Disclosure of Invention
In view of the above-identified deficiencies or inadequacies in the prior art, it would be desirable to provide a block execution method, apparatus, and storage medium that better facilitate developing a chain of blocks.
In a first aspect, the present invention provides a block execution method for devices running block chain nodes, where each block chain node is deployed with an intelligent contract adapter module, and each device running block chain nodes is configured with a plurality of identical off-chain intelligent contracts outside a block chain program, where the off-chain intelligent contracts are intelligent contracts written in an off-chain language, and the method includes:
the block chain module receives a first transaction, and when the first transaction is judged to be a first type of transaction which can be executed only by calling an intelligent contract outside a chain, the first transaction is sent to the intelligent contract adapter module;
the intelligent contract adapter module sends first notification information to a first off-chain intelligent contract executing a first transaction;
after the first out-of-chain intelligent contract receives the first notification information, caching a first index set required to be acquired for executing the first transaction;
the block chain module respectively executes each second transaction of the first block to be executed: caching the second transaction when the second transaction is judged to be the first type of transaction;
the block chain module sends each second transaction to the intelligent contract adapter module;
the intelligent contract adapter module is used for sending second notification information to a plurality of second off-link intelligent contracts corresponding to the execution of second transactions;
after receiving the second notification information, the second out-of-chain intelligent contracts screen out second transactions executable by the current out-of-chain intelligent contracts, find out second index sets required to be obtained for executing the second transactions executable by the current out-of-chain intelligent contracts, obtain first data sets for executing the second transactions executable by the current out-of-chain intelligent contracts from the block chains according to the second index sets and the block chain data read-write interfaces, and execute the second transactions executable by the current out-of-chain intelligent contracts according to the first data sets to obtain first execution result sets;
the intelligent contract adapter module acquires first execution result sets of the intelligent contracts outside each second chain and sends the first execution result sets to the block chain module;
the block chain module executes the first block according to each first execution result set.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a block execution method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the block execution method provided according to the embodiments of the present invention.
The block execution method, the computer device and the storage medium provided by the embodiments of the invention receive the first transaction through the block chain module, and when the first transaction is judged to be the first type of transaction which can be executed only by calling the intelligent contract outside the chain, the first transaction is sent to the intelligent contract adapter module; the intelligent contract adapter module sends first notification information to a first off-chain intelligent contract executing a first transaction; after the first out-of-chain intelligent contract receives the first notification information, caching a first index set required to be acquired for executing the first transaction; the block chain module respectively executes each second transaction of the first block to be executed: caching the second transaction when the second transaction is judged to be the first type of transaction; the block chain module sends each second transaction to the intelligent contract adapter module; the intelligent contract adapter module sends second notification information to a plurality of second off-link intelligent contracts corresponding to the execution of each second transaction; after receiving the second notification information, the second out-of-chain intelligent contract screens out second transactions executable by the current out-of-chain intelligent contract, searches out a second index set required to be obtained for executing the second transactions executable by the current out-of-chain intelligent contract, obtains a first data set for executing the second transactions executable by the current out-of-chain intelligent contract from the blockchain according to the second index set and the blockchain data read-write interface, and executes the second transactions executable by the current out-of-chain intelligent contract according to the first data set to obtain a first execution result set; the intelligent adapter template acquires first execution result sets of the intelligent contracts outside the second chains and sends the first execution result sets to the block chain module; the block chain module executes the method of the first block according to each first execution result set, so that the block chain development is more convenient.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a block execution method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a block execution method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a block execution method suitable for running a device of a block chain node, where each block chain node is deployed with an intelligent contract adapter module, and a plurality of identical off-chain intelligent contracts are configured outside a block chain program on the device of each running block chain node, where the off-chain intelligent contracts are intelligent contracts written in an off-chain language, and the method includes:
s11: the block chain module receives a first transaction, and when the first transaction is judged to be a first type of transaction which can be executed only by calling an intelligent contract outside a chain, the first transaction is sent to the intelligent contract adapter module;
s12: the intelligent contract adapter module sends first notification information to a first off-link intelligent contract executing a first transaction;
s13: after the first out-of-chain intelligent contract receives the first notification information, caching a first index set required to be acquired for executing the first transaction;
s14: the block chain module respectively executes each second transaction of the first block to be executed: caching the second transaction when the second transaction is judged to be the first type of transaction;
s15: the block chain module sends each second transaction to the intelligent contract adapter module;
s16: the intelligent contract adapter module sends second notification information to a plurality of second off-link intelligent contracts corresponding to the execution of each second transaction;
s17: after receiving the second notification information, the second out-of-chain intelligent contract screens out second transactions executable by the current out-of-chain intelligent contract, searches out a second index set required to be obtained for executing the second transactions executable by the current out-of-chain intelligent contract, obtains a first data set for executing the second transactions executable by the current out-of-chain intelligent contract from the blockchain according to the second index set and the blockchain data read-write interface, and executes the second transactions executable by the current out-of-chain intelligent contract according to the first data set to obtain a first execution result set;
s18: the intelligent contract adapter module acquires first execution result sets of the intelligent contracts outside each second chain and sends the first execution result sets to the block chain module;
s19: the block chain module executes the first block according to each first execution result set.
Specifically, when the first transaction is judged to be the first type transaction which can be executed only by calling the intelligent contract outside the chain, sending the first transaction to the intelligent contract adapter module comprises judging whether the first transaction is the first type transaction which can be executed only by calling the intelligent contract outside the chain according to whether the first contract called by the first transaction is deployed on the block chain or not; when the first transaction is judged to be a first type of transaction, sending the first transaction to an intelligent contract adapter module, wherein a first index set required by the cache to execute the first transaction comprises a first key set required by the cache to execute the first transaction; the method comprises the steps that each first key in a first key set comprises a first transaction hash of a first transaction, a second index set required to be obtained for executing each second transaction executable by a current off-link intelligent contract is found out, a first data set for executing each second transaction executable by the current off-link intelligent contract is obtained from a block chain according to the second index set and a block chain data read-write interface, and each second transaction executable by the current off-link intelligent contract is executed according to the first data set to obtain a first execution result set, wherein the first execution result set comprises the step that "the second key set required to be obtained for executing each second transaction executable by the current off-link intelligent contract is found according to the second transaction hash of each second transaction executable by the current off-link intelligent contract; obtaining a first value set for executing each second transaction executable by the current off-chain intelligent contract from the blockchain according to the second key set and the blockchain data read-write interface, and executing each second transaction executable by the current off-chain intelligent contract according to the first value set to obtain a first execution result set; the first notification information comprises first transactions, and the second notification information comprises second transactions as examples;
assuming that equipment for operating the block chain nodes is N1-N10, and block chain link points N1-N10 are respectively operated on the equipment; n 1-n 10 are deployed with intelligent contracts C1_ L1-C10 _ L1 written by using language L1; in addition to the blockchain program, the N1-N10 are respectively configured with C1_ L2-C10 _ L2 written by a language L2, C1_ L3-C10 _ L3 written by a language L3 and C1_ L4-C10 _ L4 written by a language L4; n 1-n 10 receive tx1 and tx2 in sequence, respectively, the intelligent contract required to be called for executing tx1 is C1_ L1, and the intelligent contract required to be called for executing tx2 is C10_ L4; the block to be executed is block (100), the block (100) comprises tx11 to tx20, the intelligent contract required to be called for executing the tx11 to tx15 is C1_ L1, the intelligent contract required to be called for executing the tx16 to tx18 is C10_ L4, and the intelligent contract required to be called for executing the tx19 to tx20 is C10_ L3;
for tx1:
the block chain module receives tx1, and since the intelligent contract required to be called for executing tx1 is C1_ L1, and C1_ L1 is the intelligent contract deployed by n 1-n 10, the operation is carried out according to the prior art;
for tx2:
the block chain module executes the step S11, the block chain module receives tx2, and since the intelligent contract required to be called for executing tx2 is C10_ L4, and C10_ L4 is an out-of-chain intelligent contract outside the block chain program, tx1 is sent to the intelligent contract adapter module;
the intelligent contract adapter module executes step S12, and sends tx2 to C10_ L4;
step S13 is executed by the C10_ L4, and after tx2 is received, an index set required to be obtained for executing tx2 is cached, assuming that { key1, key2};
the block chain module executes step S14, since the block (100) includes tx11 to tx20, the intelligent contract called for executing tx11 to tx15 is C1_ L1, the intelligent contract called for executing tx16 to tx18 is C10_ L4, the intelligent contract called for executing tx19 to tx20 is C10_ L3, and tx16 to tx20 are cached;
the block chain module executes the step S15, and the tx16 to tx20 are sent to the intelligent contract adapter module;
the intelligent contract adapter module executes the step S16 and sends tx16 to tx20 to C10_ L4 and C10_ L3;
for C10_ L4:
step S17 is executed by the C10_ L4, after tx16 to tx20 is received, tx16 to tx18 executable by the current off-chain intelligent contract is screened out, an index set required to be obtained for executing tx16 to tx18 is searched, a data set { value10 to value20} for executing tx16 to tx18 is obtained from the block chain according to { key10 to key20} and the block chain data read-write interface, and tx16 to tx18 is executed according to { value10 to value20} to obtain an execution result set for executing tx16 to tx 18;
for C10_ L3:
the C10_ L3 executes step S17, after receiving tx16 to tx20, screens tx19 to tx20 executable by the current extrachain smart contract, searches for an index set required to execute tx19 to tx20, and supposes { key21 to key25}, obtains a data set { value21 to value25} for executing tx19 to tx20 from the blockchain according to { key21 to key25}, and the blockchain data read-write interface, and executes tx19 to tx20 according to { value21 to value25} to obtain an execution result set for executing tx19 to tx20;
the intelligent contract adapter module executes the step S18 to obtain the execution result sets of C10_ L4 and C10_ L3 and sends the execution result sets of C10_ L4 and C10_ L3 to the block chain module;
the block chain module executes step S19, and executes block (100) according to the execution result sets of C10_ L4 and C10_ L3.
In more embodiments, the step of sending the first transaction to the intelligent contract adapter module may also be configured according to actual requirements, for example, configured to "determine whether the first transaction is a first type of transaction that can be executed only by calling an out-of-chain intelligent contract according to an out-of-chain intelligent contract identifier of the first transaction; and when the first transaction is judged to be the first type of transaction, the first transaction is sent to the intelligent contract adapter module, so that the same technical effect can be realized.
In the above embodiments, the selected database is a kv database, so the index set is a key set, and the data set is a value set (i.e., a value set).
In further embodiments, the first notification information comprises a first transaction hash for the first transaction and the second notification information comprises a second transaction hash for each second transaction; the first transaction can be pulled from the blockchain module or the intelligent contract adapter module according to the first transaction hash after the first extralink intelligent contract receives the first transaction hash, and each second transaction can be pulled from the blockchain module or the intelligent contract adapter module according to the second transaction hash after the second extralink intelligent contract receives the second notification information, so that the same technical effect can be realized.
In more embodiments, the second notification information may also be configured to be a second transaction corresponding to the second off-chain intelligent contract or a second hash value of the second transaction corresponding to the second off-chain intelligent contract according to the actual demand; at this time, "the intelligent contract adapter module sends second notification information to a plurality of second off-link intelligent contracts corresponding to execution of each second transaction," which should be configured to "the intelligent contract adapter module sends corresponding second notification information to each second off-link intelligent contract"; and after the second off-link intelligent contract receives the second notification information, screening out each second transaction executable by the current off-link intelligent contract, and finding out a second index set required to be obtained by executing each second transaction executable by the current off-link intelligent contract, the method should be configured to find out the received second index set required to be obtained by each second transaction after the second off-link intelligent contract receives the second notification information, and the same technical effect can be achieved.
It should be understood by those skilled in the art that if the intelligent contract adapter module cannot find a second off-link intelligent contract corresponding to a cached second transaction, the execution of the second transaction fails.
Those skilled in the art should understand that "the intelligent contract adapter module sends the second notification information to the second off-chain intelligent contracts corresponding to executing the second transactions" may also be configured according to actual needs, for example, configured to "the intelligent contract adapter module sends the second notification information to the off-chain intelligent contracts", and then only C10_ L4 and C10_ L3 will execute step S17; however, this method requires sending the second notification information to each out-of-chain intelligent contract, which occupies a large network overhead.
Those skilled in the art will appreciate that the current scheme is more suitable for both federation chains and private chains because the transactions cached in the memory pools of each blockchain node of the federation chains and private chains are substantially the same; in a public chain, due to reasons such as a network, transactions in memory pools of chain nodes of different blocks have a certain difference, assuming that a block to be executed is a block (101), the block (101) includes first-type transactions tx21 to tx25, and an index set required to be acquired for executing tx21 to tx24 is cached in an out-of-chain intelligent contract of a current device, the out-of-chain intelligent contract should cache the index set for executing tx25 first, and then acquire a data set for executing tx21 to tx25 from the public chain according to the index set of tx21 to tx25 and a block chain data read-write interface. When the current scheme is used for a alliance chain and a private chain, the situation that the index set of the tx25 execution should be cached in an intelligent contract outside the chain does not exist basically, and compared with the public chain, the network overhead is saved.
The above embodiments facilitate blockchain development.
Preferably, when it is determined that the first transaction is a first type of transaction that can be executed only by calling an out-of-chain intelligent contract, sending the first transaction to the intelligent contract adapter module includes:
judging whether the first transaction is a first type transaction which can be executed only by calling an intelligent contract outside the chain according to whether a first contract called by the first transaction is deployed on the block chain or not;
and when the first transaction is judged to be the first type of transaction, the first transaction is sent to the intelligent contract adapter module.
The block execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, caching the first index set acquired for executing the first transaction includes:
caching a first key set required to be acquired for executing a first transaction; wherein each first key in the first set of keys comprises a first transaction hash of the first transaction;
searching a second index set which needs to be acquired for executing each second transaction executable by the current off-chain intelligent contract, acquiring a first data set for executing each second transaction executable by the current off-chain intelligent contract from the block chain according to the second index set and the block chain data read-write interface, and executing each second transaction executable by the current off-chain intelligent contract according to the first data set to obtain a first execution result set, wherein the first execution result set comprises:
searching a second key set required to be obtained for executing each second transaction executable by the current off-chain intelligent contract according to the second transaction hash of each second transaction executable by the current off-chain intelligent contract;
and acquiring a first value set for executing each second transaction executable by the current off-chain intelligent contract from the blockchain according to the second key set and the blockchain data read-write interface, and executing each second transaction executable by the current off-chain intelligent contract according to the first value set to obtain a first execution result set.
The block execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the first notification information comprises a first transaction hash of the first transaction and the second notification information comprises a second transaction hash of each second transaction.
The block execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the first notification information includes the first transactions and the second notification information includes the respective second transactions.
The block execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
As shown in fig. 2, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 201 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for the operation of the computer apparatus are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that the computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The foregoing description is only exemplary of the preferred embodiments of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (7)

1. A block execution method, where each block link node is deployed with an intelligent contract adapter module, and each device running a block link node is configured with a plurality of identical out-of-link intelligent contracts outside a block link program, where the out-of-link intelligent contracts are intelligent contracts written in an out-of-link language, and the method is applied to the device running the block link node, and the method includes:
the method comprises the steps that a block chain module receives a first transaction, and when the first transaction is judged to be a first type of transaction which can be executed only by calling an intelligent contract outside a chain, the first transaction is sent to an intelligent contract adapter module;
the intelligent contract adapter module sending first notification information to a first off-link intelligent contract that executes the first transaction;
after the first out-of-chain intelligent contract receives the first notification information, caching a first index set required to be acquired for executing the first transaction;
the block chain module respectively executes each second transaction of the first block to be executed: caching the second transaction when the second transaction is judged to be the first type transaction;
the blockchain module sends each second transaction to the intelligent contract adapter module;
the intelligent contract adapter module sends second notification information to a plurality of second off-link intelligent contracts corresponding to the execution of the second transactions;
after receiving the second notification information, the second out-of-chain intelligent contracts screen out second transactions executable by current out-of-chain intelligent contracts, find out second index sets required to be obtained for executing the second transactions executable by current out-of-chain intelligent contracts, obtain first data sets for executing the second transactions executable by current out-of-chain intelligent contracts from block chains according to the second index sets and the block chain data read-write interfaces, and execute the second transactions executable by current out-of-chain intelligent contracts according to the first data sets to obtain first execution result sets;
the intelligent contract adapter module acquires a first execution result set of each second off-chain intelligent contract and sends each first execution result set to the block chain module;
the block chain module executes the first block according to each first execution result set.
2. The method of claim 1, wherein sending the first transaction to a smart contract adapter module upon determining that the first transaction is a first type of transaction that can be executed without invoking an off-chain smart contract comprises:
judging whether the first transaction is a first type transaction which can be executed only by calling an intelligent contract outside a chain according to whether a first contract called by the first transaction is deployed on a block chain or not;
and when the first transaction is judged to be the first type of transaction, sending the first transaction to an intelligent contract adapter module.
3. The method of claim 1, wherein caching the first set of indices needed to be obtained for execution of the first transaction comprises:
caching a first key set required to be acquired for executing the first transaction; wherein each first key in the first set of keys comprises a first transaction hash for the first transaction;
the searching for a second index set which needs to be obtained to execute each second transaction executable by the current off-chain intelligent contract, obtaining a first data set for executing each second transaction executable by the current off-chain intelligent contract from a block chain according to the second index set and a block chain data read-write interface, and executing each second transaction executable by the current off-chain intelligent contract according to the first data set to obtain a first execution result set comprises:
searching a second key set required to be obtained for executing each second transaction executable by the current off-chain intelligent contract according to a second transaction hash of each second transaction executable by the current off-chain intelligent contract;
and acquiring a first value set for executing each second transaction executable by the current off-chain intelligent contract from the blockchain according to the second key set and the blockchain data read-write interface, and executing each second transaction executable by the current off-chain intelligent contract according to the first value set to obtain a first execution result set.
4. The method of claim 1, wherein the first notification information comprises a first transaction hash for the first transaction and the second notification information comprises a second transaction hash for each of the second transactions.
5. The method of claim 1, wherein the first notification message comprises the first transaction and the second notification message comprises each of the second transactions.
6. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-5.
7. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-5.
CN202110729026.XA 2021-06-29 2021-06-29 Block execution method, computer device and storage medium Active CN113379550B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110729026.XA CN113379550B (en) 2021-06-29 2021-06-29 Block execution method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110729026.XA CN113379550B (en) 2021-06-29 2021-06-29 Block execution method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN113379550A CN113379550A (en) 2021-09-10
CN113379550B true CN113379550B (en) 2023-04-14

Family

ID=77579925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110729026.XA Active CN113379550B (en) 2021-06-29 2021-06-29 Block execution method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN113379550B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110264204A (en) * 2019-06-06 2019-09-20 杭州趣链科技有限公司 A kind of across chain method of commerce of block chain based on intelligent contract sequencing
CN111383031A (en) * 2020-05-29 2020-07-07 支付宝(杭州)信息技术有限公司 Intelligent contract execution method and system in block chain and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11068470B2 (en) * 2018-11-09 2021-07-20 Innoplexus Ag System and method for interoperability of blockchains
US11170376B2 (en) * 2019-05-29 2021-11-09 Vivigle, Inc. Informational and analytical system and method for ensuring the level of trust, control and secure interaction of counterparties when using electronic currencies and contracts
CN111401903B (en) * 2020-06-03 2020-09-11 腾讯科技(深圳)有限公司 Block chain message processing method, device, computer and readable storage medium
CN111708825B (en) * 2020-06-11 2021-08-24 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium
CN112583585B (en) * 2020-12-09 2022-06-28 杭州复杂美科技有限公司 Transaction execution method, apparatus and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110264204A (en) * 2019-06-06 2019-09-20 杭州趣链科技有限公司 A kind of across chain method of commerce of block chain based on intelligent contract sequencing
CN111383031A (en) * 2020-05-29 2020-07-07 支付宝(杭州)信息技术有限公司 Intelligent contract execution method and system in block chain and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链的税收智能合约设计;陈宇翔等;《通信技术》(第06期);全文 *

Also Published As

Publication number Publication date
CN113379550A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
US10320879B2 (en) Software service discovery and service evolution management
CN108846753B (en) Method and apparatus for processing data
US11243921B2 (en) Database expansion system, equipment, and method of expanding database
CN112583585B (en) Transaction execution method, apparatus and storage medium
CN108011949B (en) Method and apparatus for acquiring data
CN112416425B (en) APP construction method and device, computer equipment and storage medium
US10963298B2 (en) Method, device and computer-readable for managing virtual machines
CN110580305A (en) Method, apparatus, system, and medium for generating identifier
US8600960B2 (en) Processing proposed changes to data
CN114816393B (en) Information generation method, device, equipment and storage medium
CN109614312A (en) Method for generating test case, device, electronic equipment and storage medium
CN109992279A (en) Method for updating configuration data, calculates equipment and storage medium at device
CN113379550B (en) Block execution method, computer device and storage medium
CN112055077B (en) Block link access method, device and storage medium
CN112948498A (en) Method and device for generating global identification of distributed system
CN113779452A (en) Data processing method, device, equipment and storage medium
US20230208659A1 (en) Blockchain apparatus and method for mobile edge computing
CN113590611B (en) Block execution method, computer device, and storage medium
CN112866365A (en) Node communication method, computer device, and storage medium
CN111796845B (en) Database upgrading method, state data query method, device and storage medium
CN111443920B (en) Frame migration method and device
CN110535922B (en) State data storage method and parallel chain block generation method
CN113254819A (en) Page rendering method, system, equipment and storage medium
CN113821750B (en) Page data processing method and system, electronic equipment and readable storage medium
CN111858770B (en) Consensus method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant