Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
The intelligent contract checkschema that this specification provides can be applied in non-area in addition to that can apply in block chain
In block chain.
For applying in block chain, intelligent contract (Smart contract) is that one kind is intended to apply and can be deployed in
The computer protocol that contract is propagated, verified or executed in a manner of information-based on block chain.By stating industry in intelligent contract
Business logic may be implemented to execute corresponding operating.Intelligent contract permission carries out credible transaction in no third-party situation.These
It trades traceable and irreversible.Intelligent contract is capable of providing the safety better than traditional contracts method, and reduces related to contract
Other transaction costs.
Firstly, introducing the deployment way of intelligent contract in traditional block chain.Traditional intelligence contract is directly to be deployed in block
In chain interior joint equipment, and when node device executes transaction request, the corresponding intelligent contract of local disposition is directly run;And
Node device is also stored with the transaction data of full dose.In order to avoid individual node equipment is done evil such as altered data;Such as Fig. 1 a institute
Show, the intelligent contract checking procedure of traditional block chain are as follows:
1. block catenary system can send transaction to multiple node devices.
2. the pre-execution that each node device is traded, and the result set of pre-execution is returned (usually also with corresponding section
The signature of point device).
3. pair each result set verifies, if each pre-execution result is consistent, it is determined that verification passes through.
4. pre-execution result is broadcast to the whole network and is known together (verification for carrying out data mode) after verification passes through.
As it can be seen that needing multiple node devices to repeat pre-execution intelligence contract in existing intelligence contract verification, and pre- every time
Execution all may need the world state for accessing block chain to obtain corresponding data mode, and frequently accessing data mode can consume
Many resources, and efficiency is lower.
This description presents a kind of intelligent contract checkschema based on block chain, is divided into contract administration system for block chain
System and data-storage system, the intelligent contract of the contract administration system only memory block chain, the data-storage system are only deposited
The data mode of storage area block chain.
By reading and writing collection caused by an intelligent contract node pre-execution Intelligent target contract, so that other intelligence contracts
Node, according to memory node, can simulate performance objective intelligence contract using read-write collection without access number again;If it is described its
The simulation implementing result that its intelligent contract node returns is consistent with pre-execution result before, then can determine that verification passes through.Such as
This, on the one hand, the safety that intelligent contract executes can be promoted by logic verify, single intelligent contract node is avoided to do evil.
On the other hand, the intelligent contract node of logic verify is carried out without obtaining data mode again, reduces access data storage section
The number of point.In another aspect, contract verification and data check decoupling in process of exchange are divided into independent two parts;It closes
Node device about in management system is only responsible for contract logic verify, and the node device in data-storage system is only responsible for data school
It tests;It simplifies verification and executes logic, the reduction verification cycle of operation.
The block chain described in this specification can specifically include privately owned chain, shared chain and alliance's chain etc., in this theory
Without being particularly limited in bright book.Node device in the block chain unconfined can add, and each node device can be with
A synchronous system time, to ensure the timeliness of intelligent contract execution.
It should be noted that transaction (Transact ion) described in this specification, refers to through block chain
Client creation, and a data for needing finally to be distributed in the data-storage system of block chain.
Usually there is point of the transaction of narrow sense and the transaction of broad sense in the transaction in block chain.The transaction of narrow sense refers to use
The value Transfer that family is issued to block chain;For example, transaction can be user and exist in traditional bit coin block chain network
One initiated in block chain transfers accounts.And the transaction of broad sense refers to the industry being intended to business that user issues to block chain
Business data;For example, operator can build alliance's chain based on actual business demand, rely on the deployment of alliance's chain it is some with
Unrelated other types of in line service (for example, wide in range can be divided into inquiry business, calling business etc.) of value Transfer, and
In this kind of alliance's chain, transaction can be the service message or business with business intention that user issues in alliance's chain
Request.
Above-mentioned client may include any type of underlying services data stored using in block chain as data branch
Support, to realize the upper layer application of specific business function.
The pre-execution described in this specification can refer to and run intelligent contract without the mistake that is recorded to operation result
A kind of journey, it can be understood as logic execution.One complete volume implementation procedure, including intelligent contract executes and implementing result
Record;But pre-execution is only that intelligent contract executes.
Fig. 1 b is please referred to, Fig. 1 b is the configuration diagram for the block catenary system that this specification provides:
The block chain is divided into contract administration system 11 and data-storage system 12, and the contract administration system 12 stores intelligence
Energy contract, the 12 storage service data of data-storage system.
Include the equipment of several intelligent contract nodes in the contract administration system 11, is wrapped in the data-storage system 12
Equipment containing several data memory nodes.
By linking SDK13 connection between the contract administration system 11 and data-storage system 12, to complete data friendship
Mutually.
Specifically, the contract administration system 11 can be a set of independent block catenary system, be mainly responsible for intelligent contract
Deployment (creation), upgrading (updates) and operation.Also, the contract administration system 11 also needs the execution to intelligent contract
Carry out logic verify.
The data-storage system 12 can be the another set of independent block catenary system for being different from contract administration system 11,
It is mainly responsible for the corresponding data mode of the intelligent contract of storage and change.Also, the data-storage system 12 also needs logarithm
Data check is carried out according to Status Change.
Referring to FIG. 2, Fig. 2 is the stream for the intelligent contract method of calibration based on block chain that one embodiment of this specification provides
Cheng Tu.As shown in Figure 1 b, which can be divided into contract administration system and data-storage system.
1. user initiates a transaction to any one data memory node in data-storage system;It is set as data storage
Node 1.
2. the transaction is broadcast to the intelligent contract node of any one in contract administration system by data memory node 1;It is set as
Intelligent contract node 1.
Specifically, transaction can be broadcast to any one in contract administration system by data memory node 1 by linking SDK
A intelligence contract node.
3. returning to the result set of signature after intelligent 1 pre-execution intelligence contract of contract node.
Intelligent contract node 1 responds the transaction after the transaction for receiving the broadcast of data memory node 1, can be with prerun
The corresponding Intelligent target contract of the transaction;And by the read-write collection generated during pre-execution Intelligent target contract and other letters
Breath is packaged as result set;Then it signs to the result set, to endorse to result set.Similarly, the intelligence contract section
Point 1 is also the result set for returning to signature to data memory node 1 by linking SDK.
4. the result set that intelligent contract node 1 returns is sent to other intelligent contract nodes by data memory node 1.
Data memory node 1 can also pass through the result set after receiving intelligent contract node 1 and returning the result collection
Linking SDK is sent to other intelligent contract nodes in addition to intelligent contract node 1.
5. other intelligence contract nodes carry out logic verify to result set;If verification is by adding itself in result set
It signs and returns to data memory node 1.
The logic verify includes: that simulation executes intelligent contract, to obtain simulation read-write collection;Whether judge simulation read-write collection
It is consistent with the read-write collection in result set.If consistent, verification passes through;If inconsistent, verification does not pass through.
6. the result set that data memory node 1 returns to other intelligent contract nodes carries out validity check.
Here validity check, which can refer to, verifies the signature of result set, if containing all other intelligence
The signature of contract node, it may be considered that validity check passes through.
7. data memory node 1 occurs to be total to other data memory nodes after validity check passes through, by transaction
Know.
Demonstrate result set it is effective after, can be concentrated from read-write and extract data mode result of variations, and by the number
Other data memory nodes are sent to according to state change result to know together.
8. data storage section carries out data check to data state change;If verification passes through, corresponding data mode is modified,
And transaction is set for effectively transaction.
Here common recognition mechanism mainly carries out data check to data state change;If the data mode changes and this
The data mode of ground storage unanimously then illustrates that verification passes through.To modify corresponding data mode, and transaction is set effectively to hand over
Easily.
9. data memory node 1 returns to prompt information after common recognition passes through.
After common recognition passes through, data memory node 1 can return to prompt information, such as implementing result or generation to user
Block event.Such one complete transaction flow terminates.
Below in conjunction with example shown in Fig. 3, the stream that intelligent contract node 1 obtains data mode to data memory node 1 is introduced
Cheng Tu.
1. data memory node 1 is sent to intelligent contract node 1 by linking SDK and is traded.
Wherein, execution parameter is carried in the transaction.The execution parameter can specifically include contract parameter and business
Parameter.
The contract parameter can be used for positioning Intelligent target contract.The contract parameter may include Contract ID, adjust
With information such as function name, contract version number, input parameter, transaction id, timestamps.
2. intelligent 1 response transaction of contract node executes the corresponding intelligent contract of the transaction;Executing intelligent contract process
In, data mode is obtained to data memory node 1.
Intelligent contract node 1 based in the contract parameter Contract ID, call the information such as function name, can determine tune
With function interface method.
Data mode needed for the service parameter can be used for positioning execution contract logic.
The difference of service parameter illustrated below and data mode:
Assuming that the transaction that client is sent is to enable a+1.Then field a and plus 1 be service parameter, and a current value is
Data mode.In actual operation a+1, it is necessary first to obtain the original value (business datum) of a, then add on the basis of original value
1 can just obtain implementing result.
As shown in figure 3, intelligent contract node 1 can produce read-write collection (r/w set) in executing contract logical process.
The read-write collection may include Contract ID, state is read and state write-in.
Here which intelligent contract Contract ID is for indicating that read-write collects corresponding.Here state reading refers to intelligence
Energy contract node 1 accesses data memory node 1 by linking SDK to the data mode of reading.Here state write-in refers to
According to the calculated changed data state of the data mode read.
Typically for complicated intelligent contract, is read there are multiple groups state and state is written;That is read-write collection can be closed intelligently
The data acquisition system that all states are read about in implementation procedure and state write-in is constituted.It can really reflect intelligence by reading and writing collection
The entire execution calculating process of contract.
3. implementing result can be returned to data memory node 1 after intelligent contract node 1 has executed intelligent contract.
Here implementing result can be to collect result set made of packing for contract parameter, read-write, and is the result
Collection carries out signature endorsement.
This specification embodiment can be applied in traditional block other than applying the block catenary system shown in above-mentioned Fig. 1 b
In catenary system, as shown in Figure 4:
1. Client-initiated transaction is sent to any one node device by block catenary system.
2. the corresponding intelligent contract of node device pre-execution transaction, and return the result collection (comprising read and write collection, return value,
The information such as signature).Detailed process is as shown in Figure 5 a:
2.1. transaction carries execution parameter.
2.2.SDK parameter is passed to node device.
2.3. node device executes contract logic, data or modification data is obtained from data storage, and generate read-write collection.
2.4. contract runs succeeded, signature record;Return the result collection.
3. the result set is sent to other node devices, so that other node devices carry out logic verify.
It is executed according to the simulation that the data that read-write is concentrated carry out intelligent contract, obtains the simulation generated in simulation implementation procedure
Read-write collection;If simulation read-write collection is consistent with the read-write collection in result set, verification passes through;Conversely, inconsistent, verification does not pass through.
Detailed process is as shown in Figure 5 b:
3.1.SDK result set is passed to other node devices.
3.2. other node devices execute contract logic, concentrate from read-write and obtain data or modify data and carry out logic school
It tests.
3.3. logic verify passes through, signature record.
4. if returning to correct signing messages verification passes through.
5. collecting result set and signing messages.
The embodiment, when other each node devices carry out simulation execution by result set, these node devices
It does not need to access corresponding world state again, but directly acquires the data mode of needs from result set.Because of each section
Point device is consistent for the implementing result of same transaction, and the data mode accessed in the process is also consistent, because
As long as this is logically true, correct result can be obtained by reading and writing collection.
This specification is introduced using the data memory node in data-storage system as the method for executing subject below in conjunction with Fig. 6
Embodiment, the embodiment can apply the system shown in Fig. 1 b, and embodiment of the method shown in corresponding diagram 2, which comprises
Step 210: data memory node receives the target transaction that client is initiated;
Step 220: the target transaction is broadcast to any one intelligent contract node.
Step 230: being returned after receiving the corresponding Intelligent target contract of target transaction described in the intelligent contract node pre-execution
The pre-execution result returned.
Step 240: the pre-execution result being sent to other intelligent contract nodes, so that other intelligence contract node moulds
Quasi- performance objective intelligence contract.
Step 250: when the simulation implementing result that other nodes return is consistent with the pre-execution result, determining institute
The verification of pre-execution result is stated to pass through.
In one embodiment, the intelligent contract node is located at contract administration system, and the contract administration system is storage
The block catenary system of intelligent contract;
The data memory node is located at data-storage system, and the data-storage system is the block of storing data state
Catenary system.
In one embodiment, during the pre-execution result is the intelligent contract node pre-execution Intelligent target contract
Result set made of the read-write collection of generation is packaged;The simulation implementing result is that other intelligent contract node simulations execute
Result set made of the read-write collection generated during Intelligent target contract is packaged;The result set carries each node device
Signature;
The method also includes:
When the simulation implementing result is consistent with the pre-execution result, the pre-execution result is sent to the number
It knows together according to other node devices in storage system.
In one embodiment, the common recognition mainly carries out data check to read-write collection data mode variation;If the number
It is consistent with the data mode being locally stored according to state change, illustrate that verification passes through.To modify corresponding data mode, and set
Transaction is set as effectively transaction.
In one embodiment, after common recognition passes through, data memory node can also return to prompt information to client.Such as
Block event occurs for implementing result.
This specification is introduced using the intelligent contract node in contract administration system as the method for executing subject below in conjunction with Fig. 7
Embodiment, the embodiment can apply the system shown in Fig. 1 b, and embodiment of the method shown in corresponding diagram 2, which comprises
Step 310: intelligent contract node receives the pre-execution result that data memory node is sent;Wherein, the pre-execution
It as a result is the target transaction of other intelligent contract node customer in response ends initiations, target transaction described in pre-execution corresponds to Intelligent target
The result obtained after contract;
Step 320: the Intelligent target contract being executed according to pre-execution result simulation, by simulation performance objective intelligence
The simulation pre-execution result obtained after contract returns to the data memory node;So that the data memory node is verified
In one embodiment, other intelligent contract nodes respond the target transaction, target transaction described in pre-execution
Corresponding Intelligent target contract, specifically includes:
According to the contract parameter carried in the target transaction, the corresponding Intelligent target contract of the contract parameter is obtained;
The contract logic of Intelligent target contract described in pre-execution.
In the embodiment, the target transaction can be carried for intelligence contract needed for positioning the execution target transaction
Contract parameter.
Wherein, the contract parameter may include Contract ID, call function name, contract version number, input parameter, transaction
The information such as ID, timestamp.
Based on the Contract ID in the contract parameter, it is corresponding from the contract administration system to obtain the Contract ID
Intelligent contract address;
According to the calling function name, the calling function interface method under the intelligence contract address is determined.
However, in general, an intelligent contract may externally be provided with multiple function interface methods.Each function interface side
Method has all corresponded to a specific service logic, therefore after intelligent contract address has been determined according to Contract ID, it is also necessary to according to
Function name is called to determine the calling function interface method under the intelligence contract address.
In one embodiment, the target transaction that other intelligent contract node customer in response ends are initiated, described in pre-execution
Target transaction correspond to obtain after Intelligent target contract as a result, specifically including:
The target transaction that other intelligence contract node customer in response ends are initiated, if target transaction described in pre-execution is corresponding
Intelligent target contract needs data mode, according to the parameter transaction carried in the target transaction, Xiang Suoshu data storage device
Obtain the data mode.
In practical applications in conjunction with earlier figures 3, some transaction can not need input data state, can for this kind of transaction
Not obtain data mode to data-storage system.But it intricately trades for some, then needs to use data mode;Mesh thus
Need to provide these data modes corresponding service parameter in mark transaction.
The difference of service parameter illustrated below and data mode:
Assuming that the transaction that client is sent is to enable a+1.Then field a and plus 1 be service parameter, and a current value is
Data mode.In actual operation a+1, it is necessary first to obtain the original value (business datum) of a, then add on the basis of original value
1 can just obtain implementing result.
It should be noted that the service logic for executing intelligent contract can also generate read-write collection in the process.The read-write collection can
With the input data (including data mode) and the corresponding output data of input data needed when including pre-execution intelligence contract.It is right
In complicated intelligent contract, input data and output data may include multiple groups, i.e. read-write collection is in intelligent contract implementation procedure
Required all input datas and corresponding output data, the data acquisition system of composition can really reflect the entire of intelligent contract
Execute calculating process.
It is noted that intelligent contract node sends the implementing result obtained after Intelligent target contract described in pre-execution
When to the data-storage system, need to add the signature of this node device for implementing result;To endorse to implementing result.
In one embodiment, during the pre-execution result is the intelligent contract node pre-execution Intelligent target contract
Result set made of the read-write collection of generation is packaged;The simulation implementing result is that other intelligent contract node simulations execute
Result set made of the read-write collection generated during Intelligent target contract is packaged;The result set carries each node device
Signature.
It is noted that the node device for carrying out logic verify, which does not need to obtain to data-storage system again, executes institute
Data mode needed for stating target transaction, so as to according to read-write intensive data dry run Intelligent target contract.
As long as it is noted that the intelligent contract logic operation success of contract administration system interior joint equipment, will from
It keeps a record on body node device.The principle that logic verify is only done in line with node device is recorded as transaction id+ result set hash and constitutes
A unique value.Each transaction record is collected within the scope of certain time is packaged as a block.Have in the block
The timestamp of packing.Each item records no sequencing, and only clear execute within this period completes certain transactions.
In one embodiment, the data memory node is verified, and is specifically included:
Data memory node compares the pre-execution result and simulation pre-execution result;
If the pre-execution result is consistent with simulation pre-execution result, determine that verification passes through.
In one embodiment, the intelligent contract node is located at contract administration system, and the contract administration system is storage
The block catenary system of intelligent contract;
The data memory node is located at data-storage system, and the data-storage system is the block of storing data state
Catenary system.
In one embodiment, the Intelligent target contract is executed according to pre-execution result simulation, simulation is executed into mesh
It marks the simulation pre-execution result obtained after intelligent contract and returns to the data memory node, specifically include:
Performance objective intelligence contract is simulated according to the read-write intensive data of pre-execution result;
The analog result collection for simulating performance objective intelligence contract is returned into the data memory node.
By reading and writing collection caused by an intelligent contract node pre-execution Intelligent target contract, so that other intelligence contracts
Node, according to memory node, can simulate performance objective intelligence contract using read-write collection without access number again;If it is described its
The simulation implementing result that its intelligent contract node returns is consistent with pre-execution result before, then can determine that verification passes through.Such as
This, on the one hand, the safety that intelligent contract executes can be promoted by logic verify.On the other hand, the intelligence of logic verify is carried out
Energy contract node reduces the number of access data memory node without obtaining data mode again.In another aspect, by trading
Contract verification and data check decoupling in journey, are divided into independent two parts;Node device in contract administration system is only born
Contract logic verify is blamed, the node device in data-storage system is only responsible for data check;It simplifies verification and executes logic, reduction
Verify the cycle of operation.
Corresponding with aforementioned intelligent contract method of calibration embodiment, this specification additionally provides intelligent contract calibration equipment
Embodiment.Described device embodiment can also be realized by software realization by way of hardware or software and hardware combining.
It taking software implementation as an example, is to be deposited by the processor of equipment where it by non-volatile as the device on a logical meaning
Corresponding computer business program instruction is read into memory what operation was formed in reservoir.For hardware view, such as Fig. 8 institute
Show, is a kind of hardware structure diagram of equipment where this specification intelligence contract calibration equipment, in addition to processor shown in Fig. 8, net
Except network interface, memory and nonvolatile memory, the equipment in embodiment where device is verified generally according to intelligent contract
Actual functional capability can also include other hardware, repeat no more to this.
Fig. 9 is referred to, for the module map for the intelligent contract calibration equipment that one embodiment of this specification provides, described device pair
Embodiment illustrated in fig. 6 is answered, described device includes:
First receiving unit 410, data memory node receive the target transaction that client is initiated;
The target transaction is broadcast to any one intelligent contract node by radio unit 420;
Second receiving unit 430 receives the corresponding Intelligent target of target transaction described in the intelligent contract node pre-execution
The pre-execution result returned after contract;
The pre-execution result is sent to other intelligent contract nodes by transmission unit 440, so that other intelligence contract sections
Point simulation performance objective intelligence contract;
Verification unit 450, when the simulation implementing result that other nodes return is consistent with the pre-execution result, really
The fixed pre-execution result verification passes through.
Optionally, further includes:
Common recognition unit, is sent to other node devices in the data-storage system for the pre-execution result and is total to
Know.
Optionally, the pre-execution result is generation during the intelligent contract node pre-execution Intelligent target contract
Result set made of read-write collection is packaged;The simulation implementing result is that other intelligent contract nodes simulate performance objective intelligence
Result set made of the read-write collection generated during energy contract is packaged;The result set carries the signature of each node device.
Optionally, the intelligent contract node is located at contract administration system, and the contract administration system is that storage intelligence is closed
Block catenary system about;
The data memory node is located at data-storage system, and the data-storage system is the block of storing data state
Catenary system.
Referring to Figure 10, for the module map for the intelligent contract calibration equipment that one embodiment of this specification provides, described device
Embodiment illustrated in fig. 7 is corresponded to, described device includes:
Receiving unit 510, intelligent contract node receive the pre-execution result that data memory node is sent;Wherein, described pre-
Implementing result is the target transaction that other intelligent contract node customer in response ends are initiated, and target transaction described in pre-execution corresponds to target
The result obtained after intelligent contract;
Execution unit 520 executes the Intelligent target contract according to pre-execution result simulation, will simulate performance objective
The simulation pre-execution result obtained after intelligent contract returns to the data memory node;For data memory node progress
Verification.
Optionally, the data memory node is verified, and is specifically included:
Data memory node compares the pre-execution result and simulation pre-execution result;
If the pre-execution result is consistent with simulation pre-execution result, determine that verification passes through.
Optionally, the pre-execution result is generation during the intelligent contract node pre-execution Intelligent target contract
Result set made of read-write collection is packaged;The simulation implementing result is that other intelligent contract nodes simulate performance objective intelligence
Result set made of the read-write collection generated during energy contract is packaged;The result set carries the signature of each node device.
Optionally, the Intelligent target contract is executed according to pre-execution result simulation, by simulation performance objective intelligence
The simulation pre-execution result obtained after contract returns to the data memory node, specifically includes:
Performance objective intelligence contract is simulated according to the read-write intensive data of pre-execution result;
The analog result collection for simulating performance objective intelligence contract is returned into the data memory node.
Optionally, the target transaction that other intelligent contract node customer in response ends are initiated, target described in pre-execution are handed over
Obtained after easily corresponding Intelligent target contract as a result, specifically including:
The target transaction that other intelligence contract node customer in response ends are initiated, if target transaction described in pre-execution is corresponding
Intelligent target contract needs data mode, according to the parameter transaction carried in the target transaction, Xiang Suoshu data storage device
Obtain the data mode.
Optionally, the intelligent contract node is located at contract administration system, and the contract administration system is that storage intelligence is closed
Block catenary system about;
The data memory node is located at data-storage system, and the data-storage system is the block of storing data state
Catenary system.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
Figure 9 above describes the inner function module of the executive device of intelligent contract and structural representation in block chain, in fact
Executing subject in matter can be a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Data memory node receives the target transaction that client is initiated;
The target transaction is broadcast to any one intelligent contract node;
Return after the corresponding Intelligent target contract of target transaction described in the intelligent contract node pre-execution pre- is received to hold
Row result;
The pre-execution result is sent to other intelligent contract nodes, so that other intelligence contract node simulations execute mesh
Mark intelligent contract;
When the simulation implementing result that other nodes return is consistent with the pre-execution result, the pre-execution is determined
As a result verification passes through.
Figure 10 above describes the inner function module of the calibration equipment of intelligent contract and structural representation in block chain, in fact
Executing subject in matter can be a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Intelligent contract node receives the pre-execution result that data memory node is sent;Wherein, the pre-execution result is it
The target transaction that its intelligent contract node customer in response end is initiated, target transaction described in pre-execution must after correspond to Intelligent target contract
The result arrived;
The Intelligent target contract is executed according to pre-execution result simulation, will be obtained after simulation performance objective intelligence contract
To simulation pre-execution result return to the data memory node;So that the data memory node is verified.
In the embodiment of above-mentioned electronic equipment, it should be appreciated that the processor can be central processing unit (English:
Central Process ing Uni t, referred to as: CPU), it can also be other general processors, digital signal processor (English
Text: Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific
Integrated Circui t, referred to as: ASIC) etc..General processor can be microprocessor or the processor is also possible to
Any conventional processor etc., and memory above-mentioned can be read-only memory (English: read-only memory, abbreviation:
ROM), random access memory (English: random access memory, abbreviation: RAM), flash memory, hard disk or solid
State hard disk.The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor and execute completion, or
Hardware and software module combination in person's processor execute completion.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.It is set especially for electronics
For standby embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method reality
Apply the part explanation of example.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to this specification
Other embodiments.This specification is intended to cover any variations, uses, or adaptations of this specification, these modifications,
Purposes or adaptive change follow the general principle of this specification and undocumented in the art including this specification
Common knowledge or conventional techniques.The description and examples are only to be considered as illustrative, the true scope of this specification and
Spirit is indicated by the following claims.
It should be understood that this specification is not limited to the precise structure that has been described above and shown in the drawings,
And various modifications and changes may be made without departing from the scope thereof.The range of this specification is only limited by the attached claims
System.