CN108898490A - Execution method, node, system, electronic equipment and the storage medium of intelligent contract - Google Patents

Execution method, node, system, electronic equipment and the storage medium of intelligent contract Download PDF

Info

Publication number
CN108898490A
CN108898490A CN201810660731.7A CN201810660731A CN108898490A CN 108898490 A CN108898490 A CN 108898490A CN 201810660731 A CN201810660731 A CN 201810660731A CN 108898490 A CN108898490 A CN 108898490A
Authority
CN
China
Prior art keywords
node
contract
zero
verifying
intelligent contract
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.)
Pending
Application number
CN201810660731.7A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810660731.7A priority Critical patent/CN108898490A/en
Publication of CN108898490A publication Critical patent/CN108898490A/en
Pending legal-status Critical Current

Links

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

Abstract

The embodiment of the present application provides execution method, node, system, electronic equipment and the storage medium of a kind of intelligent contract.This method includes:Contract in block chain executes node and executes pending intelligent contract, obtains the implementing result of intelligent contract;Contract executes the zero-knowledge proof information that node generates implementing result, zero-knowledge proof information is broadcasted to the verifying node into block chain, so that verifying node verifies received zero-knowledge proof information, and determine that intelligence contract runs succeeded when being verified, wherein, verifying node is other nodes in block chain in addition to contract executes node.By the scheme of the embodiment of the present application, the execution efficiency of intelligent contract can be effectively improved.

Description

Execution method, node, system, electronic equipment and the storage medium of intelligent contract
Technical field
This application involves intelligent contract technical fields, specifically, the present invention relates to a kind of execution method of intelligent contract, Node, system, electronic equipment and storage medium.
Background technique
Intelligent contract (Smart contract) is a kind of to be intended to be propagated, verify or executed in terms of contract in information-based mode Calculation machine agreement.Intelligent contract permission carries out credible transaction in no third-party situation, these transaction are traceable and irreversible Turn.Intelligent contract is an advantage over the safety method of traditional contract, and can reduce other transaction costs relevant to contract.
For example, for block chain, all users on block chain it can be seen that the intelligent contract based on block chain, Existing intelligence contract need to execute on all nodes of block chain it is primary, and all nodes implementing result it is identical or When the quantity of the identical node of person's implementing result is more than certain amount, the implementing result of intelligent contract can just be written into block In chain.Although entire block chain includes many nodes, the actual calculation power calculated power and be equivalent to a node of whole network, intelligence The existing executive mode of contract wastes a large amount of computing resource.As it can be seen that bit coin, ether mill etc. based on intelligent contract mechanism The speed of the intelligent contract of execution is very slow, trading processing speed is very slow.
Summary of the invention
The purpose of the application is intended at least can solve above-mentioned one of technological deficiency, and it is slow that especially intelligent contract executes speed Technological deficiency.Technical solution used by the application is as follows:
In a first aspect, this application provides a kind of execution methods of intelligent contract, including:
Contract in block chain executes node and executes pending intelligent contract, obtains the implementing result of intelligent contract;
Contract executes the zero-knowledge proof information that node generates implementing result, and zero-knowledge proof information is broadcasted to block chain In verifying node it is and true when being verified so that verifying node verifies received zero-knowledge proof information Fixed intelligence contract runs succeeded, wherein verifying node is other nodes in block chain in addition to contract executes node.
In a kind of possible embodiment of first aspect, contract executes the zero-knowledge proof that node generates implementing result Information, including:Contract executes node, and by knowledge, succinctly noninteractive knowledge proves (zero-knowledge Succinct Non-Interactive Arguments of Knowledges, zkSNARKs) algorithm proof function to implementing result carry out It proves, obtains zero-knowledge proof information;
Verifying node to received zero-knowledge proof information be verified as verifying node by with prove function phase The verifying function of corresponding zkSNARKs algorithm verifies zero-knowledge proof information.
Second aspect, this application provides a kind of execution methods of intelligent contract, including:
Verifying node in block chain receives zero that contract executes the implementing result for the pending intelligent contract that node is sent Knowledge proof information, wherein verifying node is other nodes in block chain in addition to contract executes node;
Verifying node verifies zero-knowledge proof information, if being verified, verifies node and determines that intelligent contract is held It goes successfully.
In a kind of possible embodiment of second aspect, zero-knowledge proof information is that contract execution node passes through The proof information that the proof function of zkSNARKs algorithm proves implementing result;
Verifying node verifies zero-knowledge proof information, including:Verifying node passes through corresponding with function is proved The verifying function of zkSNARKs algorithm verifies zero-knowledge proof information.
The third aspect, this application provides the contracts in a kind of block chain to execute node, including:
Intelligent contract execution module obtains the implementing result of intelligent contract for executing pending intelligent contract;
Information generating module is proved, for generating the zero-knowledge proof information of implementing result;
Information broadcast module is proved, for zero-knowledge proof information to be broadcasted to the verifying node into block chain, so as to test Card node verifies received zero-knowledge proof information, and determines that intelligence contract runs succeeded when being verified, Wherein, verifying node is other nodes in block chain in addition to contract executes node.
In a kind of possible embodiment of the third aspect, it was demonstrated that information generating module is known in generate implementing result zero When knowing proof information, it is specifically used for:
Implementing result is proved by the proof function of zkSNARKs algorithm, obtains zero-knowledge proof information;
Verifying node to received zero-knowledge proof information be verified as verifying node by with prove function phase The verifying function of corresponding zkSNARKs algorithm verifies zero-knowledge proof information.
Fourth aspect, this application provides the verifying nodes in a kind of block chain, including:
It proves information receiving module, executes pending intelligent contract that node is sent for receiving the contract in block chain The zero-knowledge proof information of implementing result, wherein verifying node is other nodes in block chain in addition to contract executes node;
Prove that information authentication module, if being verified, it is true to verify node for verifying to zero-knowledge proof information Fixed intelligence contract runs succeeded.
In a kind of possible embodiment of fourth aspect, zero-knowledge proof information is that contract execution node passes through The proof information that the proof function of zkSNARKs algorithm proves implementing result;
Prove that information authentication module is specifically used for when verifying to zero-knowledge proof information:By with prove function phase The verifying function of corresponding zkSNARKs algorithm verifies zero-knowledge proof information.
5th aspect, this application provides a kind of execution systems of intelligent contract, which includes the application third Contract shown in aspect or the possible embodiment of the third aspect executes node and the application fourth aspect or fourth aspect Node is verified shown in possible embodiment.
6th aspect, this application provides a kind of block chain, which includes intelligence shown in the 5th aspect of the application The execution system of contract.
7th aspect, this application provides a kind of electronic equipment, including processor and memory;
Memory is configured for storage machine readable instructions;
Processor, for executing in the application first aspect or the possible embodiment of first aspect by call instruction Shown in intelligence contract execution method, or execute shown in the application second aspect or the possible embodiment of second aspect Intelligent contract execution method.
Eighth aspect, this application provides a kind of computer readable storage medium, computer readable storage medium is for depositing Store up computer instruction, when computer instruction is run on computers, allow computer execute the application first aspect or The execution method of intelligence contract shown in the possible embodiment of first aspect, or execute the application second aspect or second The execution method of intelligence contract shown in the possible embodiment of aspect.
Technical solution bring beneficial effect provided by the embodiments of the present application is:Scheme provided by the embodiments of the present application, When intelligent contract executes, it is only necessary to contract execute node execute can only contract, the Zero Knowledge of implementing result is demonstrate,proved by verifying node Bright information is verified, due to the speed for all executing without all nodes in block chain, and verifying to intelligent contract Degree is faster than the speed of contract execution, and therefore, by the scheme of the embodiment of the present application, can effectively improve intelligent contract executes effect Rate saves the computing resource of block chain.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, institute in being described below to the embodiment of the present application Attached drawing to be used is needed to be briefly described.
Fig. 1 shows a kind of flow diagram of the execution method of intelligent contract provided by the embodiments of the present application;
Fig. 2 shows the flow diagrams of the execution method of another intelligent contract provided by the embodiments of the present application;
Fig. 3 shows the structural schematic diagram that the contract in a kind of block chain provided by the embodiments of the present application executes node;
Fig. 4 shows the structural schematic diagram of the verifying node in a kind of block chain provided by the embodiments of the present application;
Fig. 5 shows the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the application, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application embodiment party Formula is described in further detail.
First to this application involves several nouns be introduced and explain:
Block chain:Substantially it is the distributed account book database an of decentralization, is a string of use cryptography method phases It is associated with the data block generated, contains the information of network trading in each data block.
Node:It participates in block chain network and carries out the network node of transaction and data exchange, be specific network savvy Terminal device or server are connected between node and node by ICP/IP protocol.Above-mentioned terminal device can refer to the accession to terminal, User equipment, mobile terminal, wireless telecom equipment etc..
Intelligent contract (Smart contract):It is a kind of to be intended to that contract is propagated, verified or executed in a manner of information-based Computer protocol.A intelligence contract is participated and draw jointly by multiple users in block chain, and passes through equity (Peer to Peer, P2P) network is diffused into each node, and is stored in block chain, and intelligent contract periodically carries out state of automata inspection, will expire The affairs of sufficient trigger condition are verified, and are executed automatically after reaching common understanding and are notified user.
Zero-knowledge proof:Refer to that certifier can make in the case where not providing any useful information to verifier Verifier believes that some judgement is correct.Certifier proves and believes it oneself to know or possess a certain disappear to verifier Breath, but proof procedure cannot be leaked to verifier it is any about the information for being proved to message.
zkSNARKs:ZkSNARKs is the abbreviation of " Zero Knowledge succinctly noninteractive knowledge certification ", is a kind of without letting out A kind of zero-knowledge proof that certain data operations are proved in the case of dew data itself, is a kind of zero-knowledge proof side of non-interactive type Case, it was demonstrated that person needs to provide a character string only so that verifier verifies whether it knows data itself really.
In the prior art, intelligent contract is executed by each node disjoint on block chain, when condition is triggered, Intelligent contract can be performed on each node, these nodes can attempt the knot executed with regard to their respective intelligent contract codes Fruit is reached common understanding, and block chain can be written in the data after only reaching common understanding, due to needing whole node independently Primary intelligent contract is executed, causes the execution speed of intelligent contract very slow, and waste a large amount of computing resource in block chain.
Execution method, node, system, electronic equipment and the storage medium of intelligence contract provided by the present application, it is intended to solve The technical problem as above of the prior art.
How the technical solution of the application and the technical solution of the application are solved with specifically embodiment below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, embodiments herein is described.
Fig. 1 shows a kind of flow diagram of the execution method of the intelligent contract provided in the application one embodiment. As shown in Figure 1, the execution method of the intelligence contract mainly may include:
Step S101:Contract in block chain executes node and executes pending intelligent contract, obtains the execution of intelligent contract As a result;
Step S102:Contract executes the zero-knowledge proof information that node generates implementing result, and zero-knowledge proof information is wide The verifying node in block chain is cast to, so that verifying node verifies received zero-knowledge proof information, and is being tested Card by when determine that intelligent contract runs succeeded.
It is understood that contract executed that node refers to is the node for triggering intelligent contract in block chain and executing, due to Any one node may all trigger the execution of intelligent contract in block chain, and therefore, contract, which executes node, can be block chain Any one node in network.Verifying node then refers to other nodes in block chain in addition to contract executes node.
In the embodiment of the present application, in the implementation procedure of intelligent contract, it is only necessary to execute node by the contract in block chain It executes, generates the zero-knowledge proof information of implementing result, and other verifying nodes only need the zero-knowledge proof to implementing result Information is verified, and can confirm whether intelligent contract runs succeeded according to verification result.Since the program does not need all sections Point is carried out primary intelligent contract, and since the process of verifying is considerably faster than the process of contract execution, pass through the application reality The program of example is applied, the treatment effeciency of intelligent contract can be effectively improved, saves the computing resource in block chain.
Block chain is made of block one by one (block), and for block like the record of database, each block includes one Timestamp and one link with previous block.Every completion is primary in block chain trades, and miner's node in block chain is generating It will unify to be packed into Transaction Information in block chain when block.Contract executes node and is executing and obtaining the execution of intelligent contract As a result after, intelligent contract, which executes, to be completed to complete primary transaction, and implementing result can be written in block chain by miner's node. Since the create-rule of block in different block chains is different, for different block chains, the write-in of implementing result Mode may also be different, and miner's node by implementing result write-in block chain may be that contract executes node, it is also possible to Other nodes in block chain.
For any verifying node, after passing through to the zero-knowledge proof Information Authentication of implementing result, the verifying node is then Certification contract executes node and runs succeeded to intelligent contract, if do not led to the verifying of the zero-knowledge proof information of implementing result It crosses, verifying node then thinks that contract executes node and is not carried out intelligent contract, that is to say, which does not recognize that contract executes section Implementing result of the point to intelligent contract, it is believed that contract executes node and executes failure to intelligent contract.In practical applications, for not Rule can be written according to the data of block chain, to determine whether for verification result to be written in block chain in same block chain.
In the embodiment of the present application, contract executes the zero-knowledge proof information that node generates implementing result, can specifically include:
Contract executes node and is proved by the proof function of zkSNARKs algorithm implementing result, obtains Zero Knowledge card Bright information.
Correspondingly, verifying node received zero-knowledge proof information is verified, for verifying node by with card The verifying function of the corresponding zkSNARKs algorithm of bright function verifies zero-knowledge proof information.
Contract can be made to execute node in the case where not informing verifying node implementing result by zero-knowledge proof information, Make to verify verifying of the node realization to implementing result, implementing result is verified if verifying node, can make to verify Node determines that intelligence contract runs succeeded when not knowing implementing result.Specifically, contract executes in the embodiment of the present application Node and verifying node can execute zero knowledge probative agreement, generate the Zero Knowledge of implementing result respectively by zkSNARKs algorithm It proves information and completes the verifying to zero-knowledge proof information.Using zkSNARKs algorithm zero-knowledge proof information generated Data volume very little can be improved verifying node to the efficiency of zero-knowledge proof Information Authentication.
Fig. 2 shows a kind of flow diagrams of the execution method of the intelligent contract provided in another embodiment of the application. As shown in Fig. 2, the execution method of the intelligence contract mainly may include:
Step S201:Verifying node in block chain receives the execution that contract executes the pending intelligent contract that node is sent As a result zero-knowledge proof information;
Step S202:Verifying node verifies zero-knowledge proof information, if being verified, verifies node and determines intelligence Energy contract runs succeeded.
In the embodiment of the present application, the verifying node in block chain is without executing intelligent contract, it is only necessary to the intelligence received The zero-knowledge proof information of the implementing result of energy contract is verified, and determines whether intelligent contract executes into according to verification result Function.Since the speed of verifying is faster than the speed that intelligent contract executes, by the scheme of the embodiment of the present application, effectively improve The treatment effeciency of intelligent contract, especially in the more block chain network of node.
For any verifying node, after passing through to the zero-knowledge proof Information Authentication of implementing result, the verifying node is then Certification contract executes node and runs succeeded to intelligent contract, if it does not lead to the verifying of the zero-knowledge proof information of implementing result It crosses, which thinks that contract executes node and is not carried out intelligent contract.
In the embodiment of the present application, zero-knowledge proof information is the proof function that contract executes that node passes through zkSNARKs algorithm The proof information that implementing result is proved.Corresponding, verifying node verifies zero-knowledge proof information, has Body may include:
Node is verified by the verifying function of zkSNARKs algorithm corresponding with function is proved to zero-knowledge proof information It is verified.
The zero-knowledge proof information of implementing result is generated by zkSNARKs algorithm and completes testing for zero-knowledge proof information Card, can effectively reduce the data volume of zero-knowledge proof information generated, improve the efficiency of verifying.
Corresponding to the execution method of intelligence contract shown in Fig. 1, a kind of block chain is additionally provided in the embodiment of the present application In contract execute node, as shown in figure 3, the contract execute node 300 may include intelligent contract execution module 310, prove Information generating module 320 and proof information broadcast module 330.Wherein:
Intelligent contract execution module 310 obtains the implementing result of intelligent contract for executing pending intelligent contract;
Information generating module 320 is proved, for generating the zero-knowledge proof information of implementing result;
Prove information broadcast module 330, for zero-knowledge proof information to be broadcasted to the verifying node into block chain, so that Verifying node received zero-knowledge proof information is verified, and when being verified determine intelligence contract execute at Function, wherein verifying node is other nodes in block chain in addition to contract executes node.
In the embodiment of the present application, in the implementation procedure of intelligent contract, it is only necessary to execute node by contract and execute intelligence conjunction About, and the zero-knowledge proof information of implementing result is generated, so that verifying node can pass through the zero-knowledge proof to implementing result The verifying of information confirms whether intelligent contract runs succeeded.It is carried out primary intelligent contract due to not needing all nodes, Therefore the treatment effeciency of intelligent contract can be effectively improved, the computing resource in block chain is saved.
In the embodiment of the present application, it was demonstrated that information generating module 320, can when generating the zero-knowledge proof information of implementing result To be specifically used for:
Implementing result is proved by the proof function of zkSNARKs algorithm, obtains zero-knowledge proof information.
It is corresponding, verifying node received zero-knowledge proof information is verified, for verifying node by with Prove that the verifying function of the corresponding zkSNARKs algorithm of function verifies zero-knowledge proof information.
It is understood that above-mentioned each module that the contract in the present embodiment executes node, which has, realizes above-mentioned Fig. 1 or base Contract in the execution method of intelligent contract in Fig. 1 corresponding embodiment executes the function of corresponding steps performed by node. The function can also execute corresponding software realization by hardware realization by hardware.The hardware or software include one Or multiple modules corresponding with above-mentioned function.Above-mentioned module can be software and/or hardware, and above-mentioned each module can be individually real It is existing, it can also be with multiple module integration realizations.The function description for executing each module of node for above-mentioned contract specifically may refer to Corresponding description in the execution method of above-mentioned Fig. 1 or the intelligent contract based on Fig. 1, details are not described herein.
Corresponding to the execution method of intelligent contract shown in Fig. 2, the embodiment of the present application also provides in a kind of block chain Verifying node, as shown in figure 4, the verifying node 400 may include prove information receiving module 410 and prove Information Authentication mould Block 420.Wherein:
It proves information receiving module 410, executes the pending intelligence conjunction that node is sent for receiving the contract in block chain The zero-knowledge proof information of implementing result about, wherein verifying node is other in addition to contract executes node in block chain Node;
Prove that information authentication module 420, if being verified, verifies section for verifying to zero-knowledge proof information Point determines that intelligent contract runs succeeded.
In the present embodiment, execution for intelligent contract, since verifying node 400 is without executing intelligent contract, it is only necessary to The zero-knowledge proof information of the implementing result of intelligent contract received by it is verified, intelligence is determined according to verification result Whether contract runs succeeded, and since the speed of verifying is significantly greater than the speed of contract execution, can effectively improve intelligence The treatment effeciency of contract.
In the embodiment of the present application, zero-knowledge proof information is the proof function that contract executes that node passes through zkSNARKs algorithm The proof information that implementing result is proved.Correspondingly, proving information authentication module 420 to zero-knowledge proof information When being verified, it is specifically used for:
Zero-knowledge proof information is verified by the verifying function of zkSNARKs algorithm corresponding with function is proved.
It is understood that above-mentioned each module of the verifying node in the present embodiment, which has, realizes above-mentioned Fig. 2 or based on Fig. 2 Corresponding embodiment in intelligent contract execution method in verifying node performed by corresponding steps function.The function can be with By hardware realization, corresponding software realization can also be executed by hardware.The hardware or software include it is one or more with it is upper State the corresponding module of function.Above-mentioned module can be software and/or hardware, and above-mentioned each module can be implemented separately, can also be with Multiple module integration realizations.For above-mentioned contract execute node each module function description specifically may refer to above-mentioned Fig. 2 or Corresponding description in the execution method of intelligent contract based on Fig. 2, details are not described herein.
A kind of execution system of intelligent contract is additionally provided in the embodiment of the present application, which may include above-mentioned Contract shown in application any embodiment executes and verifies node shown in node and above-mentioned the application any embodiment.
A kind of block chain is additionally provided in the embodiment of the present application, which includes intelligently closing shown in the embodiment of the present application Execution system about.
The embodiment of the present application provides a kind of electronic equipment, as shown in figure 5, electronic equipment shown in fig. 5 2000 includes:Place Manage device 2001 and transceiver 2004.Wherein, processor 2001 is connected with transceiver 2004, is such as connected by bus 2002.It is optional , electronic equipment 2000 can also include memory 2003.It should be noted that transceiver 2004 is not limited to one in practical application A, the structure of the electronic equipment 2000 does not constitute the restriction to the embodiment of the present application.
Wherein, processor 2001 can be applied in the embodiment of the present application, execute for realizing intelligent contract shown in Fig. 3 Module 310 and the function of proving information generating module 320.Transceiver 2004 includes Receiver And Transmitter, and transceiver 2004 can To be applied in the embodiment of the present application, for realizing the function shown in Fig. 3 of proving information broadcast module 330.
Processor 2001 also can be applied in the embodiment of the present application, for realizing proof Information Authentication mould shown in Fig. 4 The function of block 420.Transceiver 2004 includes Receiver And Transmitter, and proof shown in Fig. 4 also may be implemented in transceiver 2004 The function of information receiving module 410.
Processor 2001 can be CPU, general processor, DSP, ASIC, FPGA or other programmable logic device, crystalline substance Body pipe logical device, hardware component or any combination thereof.It, which may be implemented or executes, combines described by present disclosure Various illustrative logic blocks, module and circuit.Processor 2001 is also possible to realize the combination of computing function, such as wraps It is combined containing one or more microprocessors, DSP and the combination of microprocessor etc..
Bus 2002 may include an access, and information is transmitted between said modules.Bus 2002 can be pci bus or Eisa bus etc..Bus 2002 can be divided into address bus, data/address bus, control bus etc..Only to be used in Fig. 5 convenient for indicating One thick line indicates, it is not intended that an only bus or a type of bus.
Memory 2003 can be ROM or can store the other kinds of static storage device of static information and instruction, RAM Or the other kinds of dynamic memory of information and instruction can be stored, it is also possible to EEPROM, CD-ROM or other CDs Storage, optical disc storage (including compression optical disc, laser disc, optical disc, Digital Versatile Disc, Blu-ray Disc etc.), magnetic disk storage medium Or other magnetic storage apparatus or can be used in carry or store have instruction or data structure form desired program generation Code and can by any other medium of computer access, but not limited to this.
Optionally, memory 2003 is used to store the application code for executing application scheme, and by processor 2001 It is executed to control.Processor 2001 is for executing the application code stored in memory 2003, to realize implementation shown in Fig. 3 The contract that example provides executes the movement of node, or the movement to realize the verifying node of embodiment illustrated in fig. 4 offer.
The embodiment of the present application provides a kind of computer readable storage medium, is stored on the computer readable storage medium The execution of intelligence contract shown in above-mentioned the application any embodiment is realized in computer instruction, the instruction when being executed by processor Method.
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other At least part of the sub-step or stage of step or other steps executes in turn or alternately.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of execution method of intelligence contract, which is characterized in that the method includes:
Contract in block chain executes node and executes pending intelligent contract, obtains the implementing result of the intelligent contract;
The contract executes the zero-knowledge proof information that node generates the implementing result, and the zero-knowledge proof information is broadcasted To the verifying node in the block chain, so that the verifying node tests the received zero-knowledge proof information Card, and determine that when being verified, the intelligent contract runs succeeded, wherein the verifying node in the block chain except institute State other nodes except contract execution node.
2. the execution method of intelligence contract according to claim 1, which is characterized in that the contract executes node and generates institute The zero-knowledge proof information of implementing result is stated, including:
The contract executes node, and by knowledge, succinctly noninteractive knowledge proves the proof function of zkSNARKs algorithm to described Implementing result is proved, the zero-knowledge proof information is obtained;
The verifying node verifies the received zero-knowledge proof information, for the verifying node by with institute Stating proves that the verifying function of the corresponding zkSNARKs algorithm of function verifies the zero-knowledge proof information.
3. a kind of execution method of intelligence contract, which is characterized in that the method includes:
Verifying node in block chain receives the Zero Knowledge that contract executes the implementing result for the pending intelligent contract that node is sent Prove information, wherein the verifying node is other nodes in the block chain in addition to the contract executes node;
The verifying node verifies the zero-knowledge proof information, if being verified, the verifying node determines institute Intelligent contract is stated to run succeeded.
4. the execution method of intelligence contract according to claim 3, which is characterized in that the zero-knowledge proof information is institute It states contract execution node and knot is executed to described by the knowledge proof function that succinctly noninteractive knowledge proves zkSNARKs algorithm The proof information that fruit is proved;
The verifying node verifies the zero-knowledge proof information, including:
The verifying node is by the verifying function of the zkSNARKs algorithm corresponding with the proof function to described zero Knowledge proof information is verified.
5. the contract in a kind of block chain executes node, which is characterized in that including:
Intelligent contract execution module obtains the implementing result of the intelligent contract for executing pending intelligent contract;
Information generating module is proved, for generating the zero-knowledge proof information of the implementing result;
Prove information broadcast module, for the zero-knowledge proof information to be broadcasted to the verifying node into the block chain, with It verifies that the verifying node to the received zero-knowledge proof information, and determines the intelligence when being verified Energy contract runs succeeded, wherein the verifying node is other sections in the block chain in addition to the contract executes node Point.
6. the verifying node in a kind of block chain, which is characterized in that including:
It proves information receiving module, the execution for the pending intelligent contract that node is sent is executed for receiving the contract in block chain As a result zero-knowledge proof information, wherein the verifying node be the block chain in except the contract execute node in addition to Other nodes;
Prove information authentication module, for being verified to the zero-knowledge proof information, if being verified, the verifying section Point determines that the intelligent contract runs succeeded.
7. a kind of execution system of intelligence contract, which is characterized in that the execution system includes contract described in claim 5 Execute verifying node described in node and claim 6.
8. a kind of block chain, which is characterized in that the block chain includes the execution system of intelligent contract described in claim 7 System.
9. a kind of electronic equipment, which is characterized in that including processor and memory;
The memory is configured for storage machine readable instructions;
The processor, for by calling described instruction, perform claim to require the execution side of intelligent contract described in 1 or 2 The execution method of intelligent contract described in method or perform claim requirement 3 or 4.
10. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium is for storing computer Instruction, when the computer instruction is run on computers, so that computer can be required described in 1 or 2 with perform claim The execution method or perform claim of intelligent contract require the execution method of intelligent contract described in 3 or 4.
CN201810660731.7A 2018-06-25 2018-06-25 Execution method, node, system, electronic equipment and the storage medium of intelligent contract Pending CN108898490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810660731.7A CN108898490A (en) 2018-06-25 2018-06-25 Execution method, node, system, electronic equipment and the storage medium of intelligent contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810660731.7A CN108898490A (en) 2018-06-25 2018-06-25 Execution method, node, system, electronic equipment and the storage medium of intelligent contract

Publications (1)

Publication Number Publication Date
CN108898490A true CN108898490A (en) 2018-11-27

Family

ID=64346141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810660731.7A Pending CN108898490A (en) 2018-06-25 2018-06-25 Execution method, node, system, electronic equipment and the storage medium of intelligent contract

Country Status (1)

Country Link
CN (1) CN108898490A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919614A (en) * 2019-02-28 2019-06-21 北京科技大学 A kind of method for protecting intelligent contract privacy using zero-knowledge proof in block chain
CN110781521A (en) * 2018-12-06 2020-02-11 山东大学 Intelligent contract authentication data privacy protection method and system based on zero-knowledge proof
CN111585770A (en) * 2020-01-21 2020-08-25 上海致居信息科技有限公司 Method, device, medium and system for distributed acquisition of zero-knowledge proof
CN111898156A (en) * 2019-01-31 2020-11-06 创新先进技术有限公司 Method, node and storage medium for realizing contract calling in block chain
CN113032800A (en) * 2021-02-22 2021-06-25 北京航空航天大学 Zero-knowledge-proof-based on-chain automatic execution intelligent contract middleware system
CN113243094A (en) * 2018-12-12 2021-08-10 美国运通旅游有关服务公司 Zero knowledge proof of Payment Using Block chains
CN113592645A (en) * 2021-07-02 2021-11-02 中国人民银行数字货币研究所 Data verification method and device
CN114297643A (en) * 2022-03-10 2022-04-08 众连智能科技有限公司 Defense method and device of intelligent contract and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548349A (en) * 2016-11-02 2017-03-29 江苏通付盾科技有限公司 Transaction Information verification method and system
CN107274184A (en) * 2017-05-11 2017-10-20 上海点融信息科技有限责任公司 block chain data processing based on zero-knowledge proof
CN107590189A (en) * 2017-08-10 2018-01-16 深圳先进技术研究院 Intelligent contract performs method, apparatus, equipment and storage medium
CN107784580A (en) * 2017-09-15 2018-03-09 数据通信科学技术研究所 A kind of non-stop layer digital cash method of commerce derived from based on public private key pair
CN107835076A (en) * 2016-09-15 2018-03-23 埃森哲环球解决方案有限公司 Method and system for secure communication and its polymerization of token
CN107992621A (en) * 2017-12-22 2018-05-04 杭州云象网络技术有限公司 A kind of intelligent cinematic industry service system based on block chain multichain technological incorporation
CN108021821A (en) * 2017-11-28 2018-05-11 北京航空航天大学 Multicenter block chain transaction intimacy protection system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107835076A (en) * 2016-09-15 2018-03-23 埃森哲环球解决方案有限公司 Method and system for secure communication and its polymerization of token
CN106548349A (en) * 2016-11-02 2017-03-29 江苏通付盾科技有限公司 Transaction Information verification method and system
CN107274184A (en) * 2017-05-11 2017-10-20 上海点融信息科技有限责任公司 block chain data processing based on zero-knowledge proof
CN107590189A (en) * 2017-08-10 2018-01-16 深圳先进技术研究院 Intelligent contract performs method, apparatus, equipment and storage medium
CN107784580A (en) * 2017-09-15 2018-03-09 数据通信科学技术研究所 A kind of non-stop layer digital cash method of commerce derived from based on public private key pair
CN108021821A (en) * 2017-11-28 2018-05-11 北京航空航天大学 Multicenter block chain transaction intimacy protection system and method
CN107992621A (en) * 2017-12-22 2018-05-04 杭州云象网络技术有限公司 A kind of intelligent cinematic industry service system based on block chain multichain technological incorporation

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11411737B2 (en) 2018-12-06 2022-08-09 Shandong University Zero knowledge proof-based privacy protection method and system for authenticated data in smart contract
CN110781521A (en) * 2018-12-06 2020-02-11 山东大学 Intelligent contract authentication data privacy protection method and system based on zero-knowledge proof
WO2020114240A1 (en) * 2018-12-06 2020-06-11 山东大学 Zero-knowledge proof-based smart contract authentication data privacy protection method and system
CN113243094A (en) * 2018-12-12 2021-08-10 美国运通旅游有关服务公司 Zero knowledge proof of Payment Using Block chains
CN111898156A (en) * 2019-01-31 2020-11-06 创新先进技术有限公司 Method, node and storage medium for realizing contract calling in block chain
CN111898156B (en) * 2019-01-31 2024-04-16 创新先进技术有限公司 Method, node and storage medium for realizing contract call in block chain
CN109919614A (en) * 2019-02-28 2019-06-21 北京科技大学 A kind of method for protecting intelligent contract privacy using zero-knowledge proof in block chain
CN111585770A (en) * 2020-01-21 2020-08-25 上海致居信息科技有限公司 Method, device, medium and system for distributed acquisition of zero-knowledge proof
CN111585770B (en) * 2020-01-21 2023-04-07 上海致居信息科技有限公司 Method, device, medium and system for distributed acquisition of zero-knowledge proof
CN113032800A (en) * 2021-02-22 2021-06-25 北京航空航天大学 Zero-knowledge-proof-based on-chain automatic execution intelligent contract middleware system
CN113592645A (en) * 2021-07-02 2021-11-02 中国人民银行数字货币研究所 Data verification method and device
CN113592645B (en) * 2021-07-02 2023-11-14 中国人民银行数字货币研究所 Data verification method and device
CN114297643A (en) * 2022-03-10 2022-04-08 众连智能科技有限公司 Defense method and device of intelligent contract and storage medium
CN114297643B (en) * 2022-03-10 2022-07-08 众连智能科技有限公司 Defense method and device of intelligent contract and storage medium

Similar Documents

Publication Publication Date Title
CN108898490A (en) Execution method, node, system, electronic equipment and the storage medium of intelligent contract
CN107196989B (en) A kind of processing method and processing device of service request
CN109889497B (en) Distrust-removing data integrity verification method
Camenisch et al. On the portability of generalized schnorr proofs
Kilian Improved Efficient Arguments: Preliminary version
Prabhakaran et al. Concurrent zero knowledge with logarithmic round-complexity
CN109711192B (en) Method and system for inter-node transaction of block chain system
CN110399735A (en) Encryption data size relation method of proof, device, equipment and storage medium
Badrinarayanan et al. Statistical ZAP arguments
CN110400217A (en) The regular changing process method and device of intelligent contract
CN110659905B (en) Transaction verification method, device, terminal equipment and storage medium
KR102151746B1 (en) Data storage method using block chain based IoT platform
CN112529577A (en) Block chain cross-chain system and method based on excitation treatment
CN110909083A (en) Consensus method and system for verifiable random function on block chain
CN115694777A (en) Privacy set intersection method, device, equipment and medium based on homomorphic encryption
CN108933838A (en) Application data processing method and device
Alikhani et al. Experimental relativistic zero-knowledge proofs
Goldreich et al. A perfect zero-knowledge proof system for a problem equivalent to the discrete logarithm
CN113409145A (en) Cross-block-chain transaction synchronization method and device
CN111640018A (en) Block chain transaction existence verification method and device
CN116599669A (en) Data processing method, device, computer equipment and storage medium
CN108830107A (en) Protect method, apparatus, electronic equipment and the computer readable storage medium of privacy information
Corin et al. Timed analysis of security protocols
Alnahawi et al. On the state of post-quantum cryptography migration
Kiyoshima Round-optimal black-box commit-and-prove with succinct communication

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181127