CN109067759A - A kind of intelligence contract calling single-point execution system - Google Patents
A kind of intelligence contract calling single-point execution system Download PDFInfo
- Publication number
- CN109067759A CN109067759A CN201810978754.2A CN201810978754A CN109067759A CN 109067759 A CN109067759 A CN 109067759A CN 201810978754 A CN201810978754 A CN 201810978754A CN 109067759 A CN109067759 A CN 109067759A
- Authority
- CN
- China
- Prior art keywords
- contract
- calls
- implementing result
- node
- private key
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
Abstract
The present invention is applied to the block chain network including multiple nodes and virtual machine, provides a kind of intelligent contract calling single-point execution system, the system comprises contracts to call node, calls for generating and broadcasting contract;Multiple contracts, which call, executes node;One contract calls single-point to execute node, calls for executing the contract, and broadcasts contract and call implementing result;Mine node is dug, block is generated for calling implementing result to be packaged the contract, and broadcast block and multiple block synchronization nodes, for synchronizing block.The embodiment of the present invention in contract calls by specifying contract to execute address, it ensure that contract calling can only be executed at the first time by single node, efficiently solve and multiple nodes competition execution contracts calling packing implementing results exist in the prior art but only take the technical issues of result of individual node is so as to cause energy waste.It joined the legitimacy that private key signature verifying ensures implementing result during packing and synchronization simultaneously.
Description
Technical field
The present invention relates to block chain fields, call single-point to execute system more particularly to a kind of intelligent contract.
Background technique
Currently, with the continuous development of block chain technology and popular a, important technology of the intelligent contract as block chain
Also gradually known to more people.Block chain network, block chain network rule are added to however as more and more people
Mould is increasing, and existing intelligence contract calls execution method to there is problem of resource waste caused by contract the whole network executes.
The intelligent contract of industry current design, which calls to execute, all uses the mode that the whole network packing node is carried out, that is,
It says if this block chain network has 100 nodes to participate in competition and is packaged, 100 nodes can all execute same contract tune
With, but the final implementing result that can only take a node, the huge waste of the energy is thus caused, and with block chain
The expansion of network size has more nodes and executes same contract calling, and energy waste also can be more serious.
It can be seen that existing block chain intelligence contract calls in execution pattern, there is the node on block chain be carried out it is identical
Contract call, but the technical issues of only take the implementing result of a node, result in great energy waste, and with
The technical issues of expansion of block chain network scale, energy waste, also can be increasingly severe.
Summary of the invention
The embodiment of the present invention provides a kind of intelligent contract calling single-point execution system, it is intended to solve existing block chain intelligence
Contract calls causes the technology of energy waste to be asked present in execution pattern because multinode competition executes due to identical contract calls
Topic.
The embodiment of the present invention provides a kind of intelligent contract calling single-point execution system, and the intelligence contract calls single-point to execute
System includes:
Contract calls node, calls and carry out the whole network broadcast for generating contract according to user's contract call request, described
Contract is assigned with the specified address of contract in calling, and it is according to contract founder address public key and contract that the contract, which specifies address,
What content generated;
Multiple contracts, which call, executes node, calls the contract of node broadcasts to call for receiving contract, carries out contract calling
It executes Authority Verification and determines that contract calls single-point to execute node;
Contract calls single-point to execute node, executes contract tune for the contract received calling to be transferred to the virtual machine
With, and receive the contract that the virtual machine returns and call implementing result, implementing result creation is called according to the contract of the return
First contract calls implementing result and uses private key signature, and first contract calling implementing result is carried out the whole network broadcast;
Mine node is dug, calls the contract calling of node broadcasts and contract to call single-point execution node wide for receiving contract
The first contract broadcast calls implementing result, carries out contract and implementing result verifying and the first contract is called to call implementing result private key
Signature verification is tested in the verifying of implementing result private key signature if the contract calls implementing result verifying and the first contract to call
When card does not pass through, then confirm that first contract calls implementing result illegal, abandons first contract and call implementing result, if
When the contract calls implementing result verifying and the first contract that the verifying of implementing result private key signature is called to pass through, then institute is confirmed
Stating the first contract calls implementing result legal, and calls implementing result to be packaged first contract and generate the first block, by institute
It states the first block and carries out the whole network broadcast;And
Multiple block synchronization nodes call the contract of node broadcasts to call and dig mine node broadcasts for receiving contract
First block obtains the first contract contained in first block and calls implementing result, and holds to first contract calling
Row result carries out contract again and implementing result verifying and the first contract is called to call the verifying of implementing result private key signature, if described
Contract calling implementing result verifying and the first contract call when having verifying not pass through in the verifying of implementing result private key signature, then really
It is illegal to recognize first block, abandons first block, if the contract calls implementing result verifying and the first contract tune
When being passed through with the verifying of implementing result private key signature, then confirm that first block is legal, and synchronous first block.
A kind of intelligent contract provided in an embodiment of the present invention calls single-point to execute system by being assigned in contract calls
Address is executed according to the contract that contract founder address public key generates, so that other nodes, which need to call by contract, executes permission
Verifying can just execute contract calling, and contract founder address public key and unique node address private key match, therefore protect
Demonstrate,proved only exist exclusive node can by contract call execute Authority Verification, so as to avoid multiple nodes compete execute the conjunction
About call and cause the waste of the energy.And single-point is called to execute when node is broadcasted contract calling implementing result also in contract
It joined the node address private key signature, improve the safety that contract calls implementing result, reduce that may be present by him
The risk of people's modification.It digs mine node and calls implementing result verifying and contract that implementing result private key signature is called to test in progress contract
When card, it can judge that the contract calls implementing result to call implementing result mistake or contract calling to execute knot with the presence or absence of contract
The exception that fruit is modified, and call implementing result to be further processed the contract.Multiple block synchronization nodes are also to
When one block carries out contract calling implementing result verifying and contract calling implementing result private key signature verifying, further ensure
The safety and legitimacy of contract calling implementing result.
Detailed description of the invention
Fig. 1 is the structural schematic diagram that a kind of intelligent contract provided in an embodiment of the present invention calls single-point execution system;
Fig. 2 is the topology example figure that a kind of intelligent contract provided in an embodiment of the present invention calls single-point execution system;
Fig. 3 is that contract provided in an embodiment of the present invention calls the structural schematic diagram for executing node;
Fig. 3 a is that contract provided in an embodiment of the present invention calls the structural schematic diagram for executing permission authentication unit;
Fig. 4 is the structural schematic diagram that contract provided in an embodiment of the present invention calls single-point execution node;
Fig. 5 is the structural schematic diagram provided in an embodiment of the present invention for digging mine node;
Fig. 5 a is the structural schematic diagram that the first contract provided in an embodiment of the present invention calls the first authentication unit of implementing result;
Fig. 5 b is the knot that the first contract provided in an embodiment of the present invention calls the first private key signature of implementing result authentication unit
Structure schematic diagram;
Fig. 6 is the structural schematic diagram of block synchronization node provided in an embodiment of the present invention;
Fig. 6 a is the structural schematic diagram that the first contract provided in an embodiment of the present invention calls the second authentication unit of implementing result;
Fig. 6 b is the knot that the first contract provided in an embodiment of the present invention calls the second private key signature of implementing result authentication unit
Structure schematic diagram;
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
A kind of intelligent contract provided in an embodiment of the present invention calls single-point to execute system by being assigned in contract calls
Address is specified according to the contract that contract founder address public key generates, so that other nodes, which need to call by contract, executes permission
Verifying can just execute contract calling, and contract founder address public key and unique node address private key match, therefore protect
Demonstrate,proved only exist exclusive node can by contract call execute Authority Verification, so as to avoid multiple nodes compete execute the conjunction
About call and cause the waste of the energy.
Fig. 1 shows the structural schematic diagram that a kind of intelligent contract provided in an embodiment of the present invention calls single-point to execute system,
Details are as follows.
Intelligence contract provided in an embodiment of the present invention calls single-point to execute system, comprising:
Contract calls node 101, calls and carry out the whole network broadcast, institute for generating contract according to user's contract call request
It states and is assigned with the specified address of contract in contract calling, it is according to contract founder address public key and conjunction that the contract, which specifies address,
About content generates.
As an embodiment of the present invention, contract being assigned in contract calling and specifying address, the contract specifies address
It include contract founder address public key cryptographic Hash and treaty content sequence of hash values.
Contract, which calls, executes node 102, calls the contract of node broadcasts to call for receiving contract, carries out contract calling and hold
Row Authority Verification simultaneously determines that contract calls single-point to execute node.
In embodiments of the present invention, it includes in block chain network except contract calls node that contract, which calls and executes node 102,
Except all nodes, therefore there are multiple contracts to call in each block chain network and execute nodes.
In embodiments of the present invention, each contract calls execution node to require progress contract calling execution permission and tests
Card, and guarantee that having a contract to call execution node that can call by contract executes Authority Verification.
As an embodiment of the present invention, it is assigned in contract calling and is breathed out including contract founder address public key
The contract address of uncommon value, using unique pairing of contract founder address public key and private key, unique one contract of confirmation is called
Execution Authority Verification can be called by contract by executing node.
Contract calls single-point to execute node 103, executes conjunction for the contract received calling to be transferred to the virtual machine
It about calls, and receives the contract that the virtual machine returns and call implementing result, implementing result is called according to the contract of the return
It creates the first contract and calls implementing result and using private key signature, and it is wide that first contract calling implementing result carried out the whole network
It broadcasts.
In embodiments of the present invention, contract, which calls single-point to execute node, is uniquely passed through in multiple contracts calling execution nodes
Contract calls the contract for executing Authority Verification to call and executes node, and executes corresponding contract and call implementation procedure.Residue is not led to
The contract crossed calls the contract for executing Authority Verification to call execution node that wouldn't execute corresponding contract and calls implementation procedure.
Mine node 104 is dug, calls the contract calling of node broadcasts and contract that single-point is called to execute section for receiving contract
First contract of point broadcast calls implementing result, carries out contract and implementing result verifying and the first contract is called to call implementing result
Private key signature verifying, if the contract calls implementing result verifying and the first contract to call in the verifying of implementing result private key signature
When thering is verifying not pass through, then confirm that first contract calls implementing result illegal, abandons the first contract calling and executes knot
Fruit, if the contract calls implementing result verifying and the first contract that the verifying of implementing result private key signature is called to pass through,
Confirm that first contract calls implementing result legal, and calls implementing result to be packaged first contract and generate the firstth area
First block is carried out the whole network broadcast by block.
In the embodiment of the present invention, digging mine node 104 is to dig mine success and be packaged contract calling implementing result
And the exclusive node broadcasted.
As an embodiment of the present invention, mine node is dug to need to call contract implementing result and the first contract to call
Implementing result private key signature is verified, so that it is guaranteed that the first contract calls the safety and legitimacy of implementing result, is reduced
The risk that may be present modified by other people.
Multiple block synchronization nodes 105 call the contract calling of node broadcasts and digging mine node wide for receiving contract
The first block broadcast obtains the first contract contained in first block and calls implementing result, and to the first contract tune
With implementing result and contract calling implementing result verifying and the calling implementing result private key signature verifying of the first contract are carried out, if institute
It states contract calling implementing result verifying and the first contract calls when having verifying not pass through in the verifying of implementing result private key signature, then
Confirm that first block is illegal, abandon first block, if the contract calls implementing result verifying and the first contract
When the verifying of implementing result private key signature being called to pass through, then confirm that first block is legal, and synchronous first block.
In embodiments of the present invention, block synchronization node 105 includes the institute in block chain network in addition to digging mine node
There is node, therefore there are multiple block synchronization nodes in each block chain network.
As an embodiment of the present invention, block synchronization node is needed to the first contract contained in first block
Calling execution result information to carry out contract calls implementing result and the first contract to call the verifying of implementing result private key signature, thus
The safety and legitimacy for ensuring the first block reduce the risk that may be present modified by other people
Fig. 2 is the topology example figure that a kind of intelligent contract provided in an embodiment of the present invention calls single-point execution system, in order to
Convenient for explanation, part related to the present invention is only shown.
By taking the block chain contains eight nodes of A, B, C, D, E, F, G, H as an example, wherein A node initiates contract calling, refers to
Contain D node address public key in fixed contract address, final G successfully digs mine and is packaged to contract calling.
It is that contract calls node 101 that then the contract, which calls node A, and node B, C, D, E, F, G, H are multiple contract tune
With execution node 102, wherein since A defines D node address public key in contract calling, only D node address private key can
It is matched with public key, then only node D, which has passed through contract, calls execution Authority Verification, i.e. D is that contract calls single-point to execute node
103, node G are to dig mine node 104, and node A, B, C, D, E, F, H are multiple block synchronization nodes 105, synchronous or discarding
Block from node G broadcast.
Fig. 3 shows contract provided in an embodiment of the present invention and calls the structural schematic diagram for executing node, for ease of description,
Part related to the present invention is only shown.
In embodiments of the present invention, it includes that contract calls receiving unit 301 and contract to call that contract, which calls and executes node,
Execute permission authentication unit 302.
Contract calls receiving unit 301, calls the contract of node broadcasts to call for receiving contract.
Contract, which calls, executes permission authentication unit 302, calls execution Authority Verification and determining contract tune for carrying out contract
Node is executed with single-point.
In embodiments of the present invention, all contracts call execution node to require to carry out a contract to any contract calling
It calls and executes Authority Verification, and there is a contract to call execution node that can call by contract any contract calling and hold
Row Authority Verification.
Fig. 3 a shows contract provided in an embodiment of the present invention and calls the structural schematic diagram for executing permission authentication unit, in order to
Convenient for explanation, part related to the present invention is only shown.
In embodiments of the present invention, contract calling execution permission authentication unit includes:
Address public key parsing module 301a, the contract address for specifying in calling to received contract parse
And obtain contract founder address public key.
In embodiments of the present invention, the contract address specified in the contract calling is according to contract founder address public key
Information containing contract founder address public key in the contract address for generating, therefore being specified in contract calling, to the contract
The information parsing of founder address public key can obtain contract founder address public key.
Public key contrast module 302a, for judging that the contract calls the contract of execution node address private key and the acquisition
Whether founder address public key is the key pair uniquely matched.
As an embodiment of the present invention, there is the relationships uniquely matched between the private key and public key, by sentencing
The contract that breaks calls the contract founder address public key for executing node address private key and the acquisition to whether there is only
The relationship of one pairing confirms that the contract calls and whether executes node by contract calling execution Authority Verification.
Contract calls execution permission to be verified module 303a, if executing node address for judging that the contract calls
When private key and the contract founder address public key of the acquisition are the key pairs uniquely matched, then confirm that the contract calls and execute
Node is called by contract and executes Authority Verification, and confirming that the contract calls execution node is that contract calls single-point to execute node.
Contract, which calls to execute permission and test, does not pass through module 304a, if executing node address for judging that the contract calls
When private key and the contract founder address public key of the acquisition are not the key pairs uniquely matched, then confirm that the contract calling is held
Row node is not called by contract and executes Authority Verification, and confirming that the contract calls execution node is not that contract calls single-point to execute
Node.
Fig. 4 shows the structural schematic diagram that contract provided in an embodiment of the present invention calls single-point to execute node, for the ease of
Illustrate, part related to the present invention is only shown.
In the embodiment of the present invention, contract calling single-point executes node and includes:
Contract calls transmission first unit 401, executes contract tune for the contract received calling to be transferred to virtual machine
With.
In embodiments of the present invention, only having passed through contract calls the contract for executing Authority Verification that single-point is called to execute node
The contract received calling can be transferred to virtual machine at the first time and execute contract calling.
Contract calls the first receiving unit of implementing result 402, and the contract for receiving virtual machine return calls implementing result.
Contract calls the first creating unit of implementing result 403, for calling implementing result wound according to the contract of the return
It builds the first contract and calls implementing result.
In embodiments of the present invention, the contract that virtual machine returns calls implementing result also to need to call single-point to hold by contract
Row Node is that the first contract calls implementing result.
First contract calls implementing result private key signature unit 404, for being held using private key to first contract calling
Row result is signed.
As an embodiment of the present invention, it calls implementing result to carry out signature first contract using private key to be convenient for
Other nodes call implementing result to carry out signature verification the first contract, it is ensured that and the first contract calls the legitimacy of implementing result,
Reduce the risk that may be present modified by other people.
First contract calls implementing result radio unit 405, for calling first contract containing private key signature
Implementing result carries out the whole network broadcast.
Fig. 5 show it is provided in an embodiment of the present invention dig mine node structural schematic diagram, for ease of description, only show with
The relevant part of the present invention.
In embodiments of the present invention, digging mine node includes:
Contract calls receiving unit 501, calls the contract of node broadcasts to call for receiving contract.
First contract calls the first receiving unit of implementing result 502, calls single-point to execute node broadcasts for receiving contract
The first contract containing private key signature call implementing result.
In embodiments of the present invention, digging mine node similarly has the contract calling that can be received from other node broadcasts
And contract calls the unit of implementing result.
First contract call the first authentication unit of implementing result 503, for carry out contract call implementing result verifying and it is true
Whether fixed first contract calls implementing result legal.
As an embodiment of the present invention, the contract that carries out calls implementing result verifying in order to avoid using mistake
Contract calls implementing result, ensure that the first contract calls the accuracy of implementing result.
First contract calls the first private key signature of implementing result authentication unit 504, calls execution for carrying out the first contract
As a result private key signature is verified and determines that first contract calls implementing result whether legal.
As an embodiment of the present invention, the progress contract calls implementing result verifying to be modified in order to avoid using
The contract crossed calls implementing result, ensure that the first contract calls the safety of implementing result.
First contract calls implementing result packaged unit 505, for the first legal contract to be called implementing result
It is packaged and generates the first block.
In the embodiment of the present invention, the digging mine node only calls implementing result to beat legal effective first contract
Packet, when the first contract of verifying calls implementing result illegal, i.e., described first contract calls implementing result, and there may be safety
When hidden danger, abandons the first contract and call implementing result.
As an embodiment of the present invention, include in the first block legal the first contract call implementing result and
All other contracts not being packaged generated before contract calling call implementing result.
First block radio unit 506, for first block to be carried out the whole network broadcast.
Fig. 5 a shows the first contract provided in an embodiment of the present invention and the structure of the first authentication unit of implementing result is called to show
The structural schematic diagram of intention only shows part related to the present invention for ease of description.
In the embodiment of the present invention, the first contract calling the first authentication unit of implementing result includes:
Contract calls the second module 501a of transmission, executes contract tune for the contract received calling to be transferred to virtual machine
With.
In embodiments of the present invention, after contract calls single-point to execute node for the calling implementing result broadcast of the first contract,
Mine node is dug just to be allowed to transmit contract calling progress result verification to virtual machine.
Contract calls the second receiving module of implementing result 502a, and the contract calling for receiving virtual machine return executes knot
Fruit.
In embodiments of the present invention, identical contract is called, the contract that virtual machine returns calls implementing result general
It is identical.
Contract calls the second creation module of implementing result 503a, for calling implementing result wound according to the contract of the return
It builds the second contract and calls implementing result.
Contract calls the first contrast module of implementing result 504a, for judging that first contract calls implementing result and institute
Whether state the second contract calls implementing result identical.
In embodiments of the present invention, verifying contract calls the accuracy of implementing result, avoids and calls single-point to hold contract
The contract of row node broadcasts mistake calls implementing result to carry out packing processing.
First contract calls implementing result first to be verified module 505a, if for judging that first contract calls
Implementing result calls implementing result identical with second contract, then the contract calls implementing result to be identified through contract calling
Implementing result verifying, and confirm that the contract calls implementing result legal.
First contract calls the verifying of implementing result first not by module 506a, if for judging the first contract tune
It calls implementing result different from second contract with implementing result, then confirms that the contract calls implementing result not pass through contract
Implementing result verifying is called, and confirms that the contract calls implementing result illegal, first contract is abandoned and calls implementing result.
Figure 5b shows that the first contracts provided in an embodiment of the present invention to call the first private key signature of implementing result authentication unit
Structural schematic diagram part related to the present invention is only shown for ease of description.
In the embodiment of the present invention, the first contract calling the first private key signature of implementing result authentication unit includes:
First contract calls the first private key signature of implementing result to obtain module 501b, calls for obtaining first contract
The private key signature contained in implementing result.
In embodiments of the present invention, the first contract that the contract calls single-point to execute node broadcasts calls in implementing result
It calls single-point to execute node private key signature containing contract, calls implementing result whether by him convenient for other first contracts of node verification
People modified, and ensure that the first contract calls the safety of implementing result.
Private key signature the first contrast module 502b, private key signature and the contract for judging the acquisition call single-point
Whether the public key for executing node is the key pair uniquely matched;
First contract calls the first private key signature of implementing result by module 503b, if for judging the private of the acquisition
It is the key pair uniquely matched that key signature calls single-point to execute the public key of node with the contract, then confirms that the contract calling is held
Row result calls the verifying of implementing result private key signature by the first contract, and confirms that the contract calls implementing result legal.
First contract calls the first private key signature of implementing result not pass through module 504b, if for judging the acquisition
It is not the key pair uniquely matched that private key signature and the contract, which call single-point to execute the public key of node, then confirms the contract tune
Do not pass through the first contract with implementing result and call the verifying of implementing result private key signature, and confirms that the contract calls implementing result non-
Method abandons first contract and calls implementing result.
In the embodiment of the present invention, due to unique pairing of private key and public key, so that other nodes are easily verified that out first
The true and false of contract calling implementing result, if modified, and avoided to there are the contract of security risk calling to execute knot by other people
Fruit carries out packing processing.
The structural schematic diagram that Fig. 6 shows block synchronization node provided in an embodiment of the present invention only shows for ease of description
Part related to the present invention out.
In embodiments of the present invention, block synchronization node includes:
Contract calls receiving unit 601, calls the contract of node broadcasts to call for receiving contract.
First block reception unit 602, for receiving the first block for digging mine node broadcasts.
In embodiments of the present invention, block synchronization node, which similarly has, can receive the contract from other node broadcasts
Calling and contract call the unit of implementing result.
First contract calls implementing result acquiring unit 603, for obtaining the first contract contained in first block
Call implementing result.
First contract call the second authentication unit of implementing result 604, for carry out contract call implementing result verifying and it is true
Whether fixed first block is legal.
As an embodiment of the present invention, the contract that carries out calls implementing result verifying in order to avoid using mistake
Block ensure that the accuracy of the first block
First contract calls the second private key signature of implementing result authentication unit 605, calls execution for carrying out the first contract
As a result private key signature is verified and determines the whether legal of first block
First block synchronization unit 606, for synchronizing the first legal block.
In the embodiment of the present invention, the block synchronization node only synchronizes legal effective first block, when testing
Demonstrate,prove the first block it is illegal when, i.e., described first block abandons the first block there may be when security risk.
Fig. 6 a shows the first contract provided in an embodiment of the present invention and the structure of the second authentication unit of implementing result is called to show
It is intended to, for ease of description, part related to the present invention is only shown.
In the embodiment of the present invention, the first contract calling the second authentication unit of implementing result includes:
Contract calls third transmission module 601a, executes contract tune for the contract received calling to be transferred to virtual machine
With.
In embodiments of the present invention, after contract calls single-point to execute node for the calling implementing result broadcast of the first contract,
Block synchronization node is just allowed to transmit contract calling progress result verification to virtual machine.
Contract calls implementing result third receiving module 602a, and the contract calling for receiving virtual machine return executes knot
Fruit.
In embodiments of the present invention, identical contract is called, the contract that virtual machine returns calls implementing result general
It is identical
Contract calls implementing result third creation module 603a, for calling implementing result wound according to the contract of the return
It builds third contract and calls implementing result.
Contract calls the second contrast module of implementing result 604a, for judging that first contract calls implementing result and institute
Whether state third contract calls implementing result identical.
In embodiments of the present invention, verifying contract calls the accuracy of implementing result, avoids wrong to mine node broadcasts are dug
The first block accidentally synchronizes processing
First contract calls implementing result second to be verified module 605a, if for judging that first contract calls
Implementing result calls implementing result identical with the third contract, then confirms that first block calls implementing result by contract
Verifying, and confirm that first block is legal.
First contract calls the verifying of implementing result second not by module 606a, if for judging the first contract tune
It calls implementing result different from the third contract with implementing result, then confirms that first block is not called by contract and execute
Result verification, and confirm that first block is illegal, abandon first block.
Fig. 6 b shows the first contract provided in an embodiment of the present invention and calls the second private key signature of implementing result authentication unit
Structural schematic diagram part related to the present invention is only shown for ease of description.
In the embodiment of the present invention, the first contract calling the second private key signature of implementing result authentication unit includes:
First contract calls the second private key signature of implementing result to obtain module 601b, calls for obtaining first contract
The private key signature contained in implementing result.
Private key signature the second contrast module 602b, private key signature and the contract for judging the acquisition call single-point
Whether the public key for executing node is the key pair uniquely matched.
First contract calls the second private key signature of implementing result to be verified module 603b, if for judging the acquisition
Private key signature and the contract call single-point execute node public key be the key pair uniquely matched, then confirm firstth area
Block calls the verifying of implementing result private key signature by the first contract, and confirms that first block is legal.
First contract calls the verifying of the second private key signature of implementing result not by module 604b, if for judging described obtain
It is not the key pair uniquely matched that the private key signature that takes and the contract, which call single-point to execute the public key of node, then confirms described the
One block does not pass through the first contract and calls the verifying of implementing result private key signature, and confirms that first block is illegal, described in discarding
First block.
A kind of intelligent contract provided in an embodiment of the present invention calls single-point to execute system by being assigned in contract calls
According to the contract address that contract founder address public key generates, so that other nodes, which need to call by contract, executes Authority Verification
Contract calling can be just executed, and contract founder address public key and unique node address private key match, therefore ensure that
Execution Authority Verification can be called by contract by only existing exclusive node, competed so as to avoid multiple nodes and executed the contract tune
With and lead to the waste of the energy.And it calls single-point to execute when node is broadcasted contract calling implementing result in contract and is additionally added
The node address private key signature improves the safety that contract calls implementing result, reduces and that may be present is repaired by other people
The risk changed.It digs mine node and is carrying out contract calling implementing result verifying and contract calling implementing result private key signature verifying
When, it can judge that the contract calls implementing result to call implementing result mistake or contract to call implementing result with the presence or absence of contract
The exception modified, and call implementing result to be further processed the contract.Multiple block synchronization nodes are also to first
When block carries out contract calling implementing result verifying and contract calling implementing result private key signature verifying, conjunction is further ensured
About call the safety and legitimacy of implementing result.
In embodiments of the present invention, it is called about contract and executes node 102, contract calls single-point to execute node 103, Wa Kuang
The refinement of node 104, block synchronization node 105 is detailed in the above contract calling single-point execution system and executes section about contract calling
It is attached that point 102, contract call single-point to execute node 103, digging mine node 104, the description of block synchronization node 105 and reference book
Figure content.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.
Claims (8)
1. a kind of intelligence contract calls single-point to execute system, applied to the block chain network for including multiple nodes and virtual machine,
It is characterized in that, the intelligence contract calling single-point execution system includes:
Contract calls node, calls and carry out the whole network broadcast, the contract for generating contract according to user's contract call request
It is assigned with contract in calling and executes address, it is according to contract founder address public key and treaty content that the contract, which specifies address,
It generates;
Multiple contracts, which call, executes node, calls the contract of node broadcasts to call for receiving contract, progress contract, which calls, to be executed
Authority Verification simultaneously determines that contract calls single-point to execute node;
Contract calls single-point to execute node, executes contract calling for the contract received calling to be transferred to the virtual machine,
And receive the contract that the virtual machine returns and call implementing result, implementing result creation first is called according to the contract of the return
Contract calls implementing result and uses private key signature, and first contract calling implementing result is carried out the whole network broadcast;
Mine node is dug, calls the contract calling of node broadcasts and contract that single-point is called to execute node broadcasts for receiving contract
First contract calls implementing result, carries out contract and implementing result verifying and the first contract is called to call implementing result private key signature
Verifying, if the contract, which calls implementing result verifying and the first contract to call in the verifying of implementing result private key signature, has verifying not
By when, then confirm that first contract calls implementing result illegal, abandon first contract and call implementing result, if described
Contract call implementing result verifying and the first contract call the verifying of implementing result private key signature by when, then confirm described the
One contract calls implementing result legal, and calls implementing result to be packaged the first block of generation first contract, by described the
One block carries out the whole network broadcast;And
Multiple block synchronization nodes call the contract of node broadcasts to call and dig the first of mine node broadcasts for receiving contract
Block obtains the first contract contained in first block and calls implementing result, and executes knot to first contract calling
Fruit carries out contract again and implementing result verifying and the first contract is called to call the verifying of implementing result private key signature, if the contract
The verifying of calling implementing result and the first contract call when having verifying not pass through in the verifying of implementing result private key signature, then confirm institute
It is illegal to state the first block, abandons first block, if the contract calls implementing result verifying and the first contract calling to hold
When the verifying of row result private key signature passes through, then confirm that first block is legal, and synchronous first block.
2. system according to claim 1, which is characterized in that it includes block link network that the multiple contract, which calls and executes node,
All nodes in network in addition to contract calls node.
3. system according to claim 1, which is characterized in that the contract calling executes node and includes:
Contract calls receiving unit, calls the contract of node broadcasts to call for receiving contract;And
Contract, which calls, executes permission authentication unit, and for carrying out, contract calls execution Authority Verification and determining contract calls single-point to hold
Row node;
Wherein, the contract calls execution permission authentication unit to specifically include:
Address public key parsing module, the contract address for specifying in calling to received contract are parsed and obtain conjunction
About founder address public key;
Public key contrast module executes node address private key with the contract founder of the acquisition for judging that the contract calls
Whether location public key is the key pair uniquely matched;
Contract, which calls, to be executed permission and tests through module, if for judge the contract call execute node address private key with it is described
When the contract founder address public key of acquisition is the key pair uniquely matched, then confirm that the contract calls execution node to pass through conjunction
It about calls and executes Authority Verification, confirming that the contract calls execution node is that contract calls single-point to execute node;And
Contract, which calls to execute permission and test, does not pass through module, if executing node address private key and institute for judging that the contract calls
When the contract founder address public key for stating acquisition is not the key pair uniquely matched, then confirms that the contract calls and execute node not
It is called by contract and executes Authority Verification, confirming that the contract calls execution node is not that contract calls single-point to execute node.
4. system according to claim 1, which is characterized in that the contract calling single-point executes node and includes:
Contract calls transmission first unit, executes contract calling for the contract received calling to be transferred to virtual machine;
Contract calls the first receiving unit of implementing result, and the contract for receiving virtual machine return calls implementing result;
Contract calls the first creating unit of implementing result, for calling implementing result creation first to close according to the contract of the return
About call implementing result;
First contract call implementing result private key signature unit, for using private key to first contract call implementing result into
Row signature;And
First contract calls implementing result radio unit, for first contract containing private key signature to be called implementing result
Carry out the whole network broadcast.
5. system according to claim 1, which is characterized in that the digging mine node includes:
Contract calls receiving unit, calls the contract of node broadcasts to call for receiving contract;
First contract calls the first receiving unit of implementing result, calls containing for single-point execution node broadcasts private for receiving contract
First contract of key signature calls implementing result;
First contract calls the first authentication unit of implementing result, calls implementing result to verify for carrying out contract and determines described the
Whether one contract calls implementing result legal;
First contract calls the first private key signature of implementing result authentication unit, calls implementing result private key for carrying out the first contract
Signature verification simultaneously determines that first contract calls implementing result whether legal;
First contract calls implementing result packaged unit, for calling implementing result to be packaged the first legal contract
And generate the first block;And
First block radio unit, for first block to be carried out the whole network broadcast;
Wherein, first contract calls the first authentication unit of implementing result to specifically include:
Contract calls the second module of transmission, executes contract calling for the contract received calling to be transferred to virtual machine;
Contract calls the second receiving module of implementing result, and the contract for receiving virtual machine return calls implementing result;
Contract calls the second creation module of implementing result, for calling implementing result creation second to close according to the contract of the return
About call implementing result;
Contract calls the first contrast module of implementing result, for judging that first contract calls implementing result and described second to close
About call implementing result whether identical;
First contract calls implementing result first to be verified module, if for judging that first contract calls implementing result
Call implementing result identical with second contract, then the contract calls implementing result to be identified through contract and calls implementing result
Verifying, and confirm that the contract calls implementing result legal;And
First contract calls the verifying of implementing result first not by module, if for judging that the first contract calling executes knot
Fruit calls implementing result different from second contract, then confirms that the contract calls implementing result not call by contract and executes
Result verification, and confirm that the contract calls implementing result illegal, it abandons first contract and calls implementing result;
First contract calls the first private key signature of implementing result authentication unit to specifically include:
First contract calls the first private key signature of implementing result to obtain module, calls implementing result for obtaining first contract
In the private key signature that contains;And
The first contrast module of private key signature, private key signature and the contract for judging the acquisition call single-point to execute node
Public key whether be the key pair uniquely matched;
First contract calls the first private key signature of implementing result by module, if for judge the private key signature of the acquisition with
It is the key pair uniquely matched that the contract, which calls single-point to execute the public key of node, then confirms that the contract calls implementing result logical
It crosses the first contract and calls the verifying of implementing result private key signature, and confirm that the contract calls implementing result legal;And
First contract calls the first private key signature of implementing result not pass through module, if for judging the private key signature of the acquisition
Calling single-point to execute the public key of node with the contract is not the key pair uniquely matched, then confirms that the contract calling executes knot
Fruit does not pass through the first contract and calls the verifying of implementing result private key signature, and confirms that the contract calls implementing result illegal, abandons
First contract calls implementing result.
6. system according to claim 1, which is characterized in that first block includes that the first contract calling executes knot
Fruit and all other contracts not being packaged generated before contract calling call implementing result.
7. system according to claim 1, which is characterized in that the multiple block synchronization node includes in block chain network
All nodes in addition to digging mine node.
8. system according to claim 1, which is characterized in that the multiple block synchronization node includes:
Contract calls receiving unit, calls the contract of node broadcasts to call for receiving contract;
First block reception unit, for receiving the first block for digging mine node broadcasts;
First contract calls implementing result acquiring unit, calls execution for obtaining the first contract contained in first block
As a result;
First contract calls the second authentication unit of implementing result, calls implementing result to verify for carrying out contract and determines described the
Whether one block is legal;
First contract calls the second private key signature of implementing result authentication unit, calls implementing result private key for carrying out the first contract
Signature verification simultaneously determines whether first block is legal;And
First block synchronization unit, for synchronizing the first legal block;
Wherein, first contract calls the second authentication unit of implementing result to specifically include:
Contract calls third transmission module, executes contract calling for the contract received calling to be transferred to virtual machine;
Contract calls implementing result third receiving module, and the contract for receiving virtual machine return calls implementing result;
Contract calls implementing result third creation module, for calling implementing result creation third to close according to the contract of the return
About call implementing result;
Contract calls the second contrast module of implementing result, for judging that first contract calls implementing result and the third to close
About call implementing result whether identical;
First contract calls implementing result second to be verified module, if for judging that first contract calls implementing result
It calls implementing result identical with the third contract, then confirms that first block calls implementing result verifying by contract, and
Confirm that first block is legal;And
First contract calls the verifying of implementing result second not by module, if for judging that the first contract calling executes knot
Fruit calls implementing result different from the third contract, then confirms that first block does not call implementing result to test by contract
Card, and confirm that first block is illegal, abandon first block;
First contract calls the second private key signature of implementing result authentication unit to specifically include:
First contract calls the second private key signature of implementing result to obtain module, calls implementing result for obtaining first contract
In the private key signature that contains;
The second contrast module of private key signature, private key signature and the contract for judging the acquisition call single-point to execute node
Public key whether be the key pair uniquely matched;
First contract calls the second private key signature of implementing result to be verified module, if for judging the private key label of the acquisition
It is the key pair uniquely matched that name calls single-point to execute the public key of node with the contract, then confirms that first block passes through the
One contract calls the verifying of implementing result private key signature, and confirms that first block is legal;And
First contract calls the verifying of the second private key signature of implementing result not by module, if for judging the private key of the acquisition
Signature calls single-point to execute the public key of node with the contract not to be the key pair uniquely matched, then confirms first block not
The verifying of implementing result private key signature is called by the first contract, and confirms that first block is illegal, abandons first block.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810978754.2A CN109067759B (en) | 2018-08-27 | 2018-08-27 | Intelligent contract calling single-point execution system |
PCT/CN2019/077934 WO2020042587A1 (en) | 2018-08-27 | 2019-03-13 | Smart contract call single point of execution system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810978754.2A CN109067759B (en) | 2018-08-27 | 2018-08-27 | Intelligent contract calling single-point execution system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109067759A true CN109067759A (en) | 2018-12-21 |
CN109067759B CN109067759B (en) | 2020-11-03 |
Family
ID=64757167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810978754.2A Active CN109067759B (en) | 2018-08-27 | 2018-08-27 | Intelligent contract calling single-point execution system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109067759B (en) |
WO (1) | WO2020042587A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109818957A (en) * | 2019-01-25 | 2019-05-28 | 上海淳麒金融信息服务有限公司 | Intelligent contract call method, apparatus and system based on visualization interface |
CN110138767A (en) * | 2019-05-07 | 2019-08-16 | 百度在线网络技术(北京)有限公司 | Processing method, device, equipment and the storage medium of transactions requests |
WO2020042587A1 (en) * | 2018-08-27 | 2020-03-05 | 深圳前海益链网络科技有限公司 | Smart contract call single point of execution system |
CN112104606A (en) * | 2020-08-12 | 2020-12-18 | 北京智融云河科技有限公司 | Credible execution method and system based on random multiple nodes |
CN112118107A (en) * | 2020-08-12 | 2020-12-22 | 北京大学 | Self-adaptive execution method for realizing data credibility |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105809062A (en) * | 2016-03-01 | 2016-07-27 | 布比(北京)网络技术有限公司 | Contract construction and execution methods and apparatuses |
CN106656974A (en) * | 2016-10-17 | 2017-05-10 | 江苏通付盾科技有限公司 | Block chain grouping consensus method and system |
CN106951307A (en) * | 2017-03-06 | 2017-07-14 | 钱德君 | A kind of intelligent contract virtual machine realization method |
CN107257374A (en) * | 2017-06-15 | 2017-10-17 | 中国银行股份有限公司 | Transaction processing method and system on a kind of block chain |
CN107392619A (en) * | 2017-07-31 | 2017-11-24 | 众安信息技术服务有限公司 | Intelligent contract processing method and processing device |
CN107526624A (en) * | 2017-07-18 | 2017-12-29 | 杭州趣链科技有限公司 | A kind of intelligent contract enforcement engine based on Java Virtual Machine |
CN107622385A (en) * | 2017-08-28 | 2018-01-23 | 南京邮电大学 | A kind of copyright distributing method based on block chain intelligence contract |
WO2018058105A1 (en) * | 2016-09-26 | 2018-03-29 | Shapeshift Ag | System and method of managing trustless asset portfolios |
CN108230109A (en) * | 2018-01-02 | 2018-06-29 | 罗梅琴 | A kind of shared system and method based on block chain technology |
CN108320160A (en) * | 2018-02-02 | 2018-07-24 | 张超 | Block catenary system, block common recognition method and apparatus |
CN108399544A (en) * | 2018-02-11 | 2018-08-14 | 深圳市图灵奇点智能科技有限公司 | The method and apparatus that auxiliary based on Internet of Things signs block chain contract |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5452099B2 (en) * | 2009-07-01 | 2014-03-26 | 株式会社日立製作所 | Certificate validity checking method, certificate verification server, program, and storage medium |
WO2018120057A1 (en) * | 2016-12-30 | 2018-07-05 | 深圳前海达闼云端智能科技有限公司 | Currency management method and system based on block chain |
CN107341702B (en) * | 2017-03-08 | 2020-06-23 | 创新先进技术有限公司 | Service processing method and device |
CN108234134B (en) * | 2017-12-28 | 2020-09-29 | 江苏通付盾科技有限公司 | Block synchronization method and system |
CN109067759B (en) * | 2018-08-27 | 2020-11-03 | 深圳前海益链网络科技有限公司 | Intelligent contract calling single-point execution system |
-
2018
- 2018-08-27 CN CN201810978754.2A patent/CN109067759B/en active Active
-
2019
- 2019-03-13 WO PCT/CN2019/077934 patent/WO2020042587A1/en active Application Filing
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105809062A (en) * | 2016-03-01 | 2016-07-27 | 布比(北京)网络技术有限公司 | Contract construction and execution methods and apparatuses |
WO2018058105A1 (en) * | 2016-09-26 | 2018-03-29 | Shapeshift Ag | System and method of managing trustless asset portfolios |
CN106656974A (en) * | 2016-10-17 | 2017-05-10 | 江苏通付盾科技有限公司 | Block chain grouping consensus method and system |
CN106951307A (en) * | 2017-03-06 | 2017-07-14 | 钱德君 | A kind of intelligent contract virtual machine realization method |
CN107257374A (en) * | 2017-06-15 | 2017-10-17 | 中国银行股份有限公司 | Transaction processing method and system on a kind of block chain |
CN107526624A (en) * | 2017-07-18 | 2017-12-29 | 杭州趣链科技有限公司 | A kind of intelligent contract enforcement engine based on Java Virtual Machine |
CN107392619A (en) * | 2017-07-31 | 2017-11-24 | 众安信息技术服务有限公司 | Intelligent contract processing method and processing device |
CN107622385A (en) * | 2017-08-28 | 2018-01-23 | 南京邮电大学 | A kind of copyright distributing method based on block chain intelligence contract |
CN108230109A (en) * | 2018-01-02 | 2018-06-29 | 罗梅琴 | A kind of shared system and method based on block chain technology |
CN108320160A (en) * | 2018-02-02 | 2018-07-24 | 张超 | Block catenary system, block common recognition method and apparatus |
CN108399544A (en) * | 2018-02-11 | 2018-08-14 | 深圳市图灵奇点智能科技有限公司 | The method and apparatus that auxiliary based on Internet of Things signs block chain contract |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020042587A1 (en) * | 2018-08-27 | 2020-03-05 | 深圳前海益链网络科技有限公司 | Smart contract call single point of execution system |
CN109818957A (en) * | 2019-01-25 | 2019-05-28 | 上海淳麒金融信息服务有限公司 | Intelligent contract call method, apparatus and system based on visualization interface |
CN110138767A (en) * | 2019-05-07 | 2019-08-16 | 百度在线网络技术(北京)有限公司 | Processing method, device, equipment and the storage medium of transactions requests |
CN110138767B (en) * | 2019-05-07 | 2021-11-30 | 百度在线网络技术(北京)有限公司 | Transaction request processing method, device, equipment and storage medium |
CN112104606A (en) * | 2020-08-12 | 2020-12-18 | 北京智融云河科技有限公司 | Credible execution method and system based on random multiple nodes |
CN112118107A (en) * | 2020-08-12 | 2020-12-22 | 北京大学 | Self-adaptive execution method for realizing data credibility |
CN112118107B (en) * | 2020-08-12 | 2021-08-27 | 北京大学 | Self-adaptive execution method for realizing data credibility |
CN112104606B (en) * | 2020-08-12 | 2022-06-17 | 北京智融云河科技有限公司 | Credible execution method and system based on random multiple nodes |
Also Published As
Publication number | Publication date |
---|---|
CN109067759B (en) | 2020-11-03 |
WO2020042587A1 (en) | 2020-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109067759A (en) | A kind of intelligence contract calling single-point execution system | |
CN110474846B (en) | Method and device for block propagation in block chain | |
EP3038318B1 (en) | Communication control apparatus, communication control method and communication control program | |
CN107770182A (en) | The date storage method and home gateway of home gateway | |
CN110381075B (en) | Block chain-based equipment identity authentication method and device | |
CN112150284A (en) | Block chain heterogeneous chain cross-chain transaction method | |
US20120011566A1 (en) | System and method for sensor network authentication based on xor chain | |
CN110166562A (en) | Data synchronous method, apparatus, storage medium and electronic equipment | |
CN111401904B (en) | Consensus method and system in alliance chain | |
CN109714742A (en) | A kind of Internet of Things Wi-Fi module network self-adapting switching method | |
CN110213230B (en) | network security verification method and device for distributed communication | |
Galan et al. | OSNMAlib: An open python library for galileo OSNMA | |
CN106059964A (en) | Message forwarding method and apparatus | |
US4575843A (en) | Time-division-multiplexing loop telecommunication system having a first and second transmission line | |
CN111918305A (en) | Same-frequency self-organizing self-healing network method and device | |
CN111865983A (en) | Block chain-based data security tracing method | |
CN110460597A (en) | A kind of control frame precommpression method based on AS6802 agreement | |
CN111464306A (en) | Authentication processing method, authentication processing device, storage medium, and electronic device | |
CN106487637A (en) | A kind of processing system of application message, method and application apparatus | |
CN104270243A (en) | Safety function implementation method for industrial Internet of Things chip | |
CN100393055C (en) | Automatic protection switching protocol testing method | |
CN113378205A (en) | Method for data reverse transmission across security domains | |
KR101992228B1 (en) | Ring network communication method for real time fault processing and restore connection between smart devices and system of the same | |
CN106817162B (en) | A kind of signal processing method and source equipment | |
CN109684212A (en) | A kind of visual logic test method, device, equipment and readable storage medium storing program for executing |
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 |