CN109783195A - A kind of real-time adjustment method of intelligent contract based on container - Google Patents

A kind of real-time adjustment method of intelligent contract based on container Download PDF

Info

Publication number
CN109783195A
CN109783195A CN201910037863.9A CN201910037863A CN109783195A CN 109783195 A CN109783195 A CN 109783195A CN 201910037863 A CN201910037863 A CN 201910037863A CN 109783195 A CN109783195 A CN 109783195A
Authority
CN
China
Prior art keywords
contract
code
compiling
intelligent
container
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
CN201910037863.9A
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.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN201910037863.9A priority Critical patent/CN109783195A/en
Publication of CN109783195A publication Critical patent/CN109783195A/en
Pending legal-status Critical Current

Links

Abstract

The intelligent real-time adjustment method of contract code based on container that the invention discloses a kind of.Main debugging process includes: 1) to input intelligent contract code by user;2) front end system feeds back the result whether code meets specification according to configured rule detection contract code;3) contract code is pulled in Docker container, carry out syntax parsing and compiles intelligent contract, obtains the corresponding abi of contract, while compiling result and syntax error being fed back;4) if step 3) compiling contract code success, contract is deployed in hyperchain alliance chain;5) if step 3) compiling contract code failure, failure result is fed back and provides suggestion for revision;If 6) deployment contract success in step 4), start the debugging process of contract code, the contract parameter of capture user's input, while returning to contract call result.The present invention is integrated with the compiling, deployment and debugging of intelligent contract, solves the problems, such as that intelligent contract code debugging is not convenient and fast.

Description

A kind of real-time adjustment method of intelligent contract based on container
Technical field
The present invention relates to block chain technology, solidity intelligence contract technology, Docker container more particularly to one kind to be based on The real-time adjustment method of intelligent contract of container.
Background technique
Block chain technology is a kind of novel distributed account book technology, its main feature is that decentralization with can not tamper.It is logical The driving of common recognition algorithm is crossed, during each verifying node on block chain is involved in transaction verification, guarantees block chain account The consistency of notebook data with can not distort.
Intelligent contract refers to a string of the binary codes that may operate on block chain, it can be understood as block chain and the external world The bridge of communication can carry out some high safe operations, than in full under the characteristic that block chain can not be distorted on intelligent contract Word moneytary operations, the operation such as inter-bank clearance of bank.The execution of intelligent contract be automatically, and operate have atomicity, i.e., Success or full revocation.This is just important as the atomic operation in conventional database systems, some important It is acted in occasion, such as wholesale payment, the cross-border operation such as transfer accounts more obvious.
Docker container is a kind of evolution of virtual machine technique (VM), is a kind of container engine.It operates in different vessels Application, be able to maintain complete isolation, and host machine only needs to provide minimum extra performance expense.Light weight and ring The characteristic of border isolation, it is easy to which the intelligent contract code operation in user's space is isolated in realization.
Currently, writing, debug and testing for intelligent contract is a relatively cumbersome process.Deployment and call contract it Before, it needs to build alliance's chain and intelligent contract translation and compiling environment needs during writing and debugging contract mutually isolated It continuously attempts to carry out contract calling in environment.Cumbersome process significantly limits the application of intelligent contract.
Summary of the invention
In view of the deficiencies of the prior art, it is an object of the present invention to provide a kind of intelligent contract based on Docker container is real-time Adjustment method provides the integration environment that intelligent contract is write, compiles, disposes and debugged, and improves intelligent contract debugging efficiency.
The purpose of the present invention is what is be achieved through the following technical solutions: a kind of intelligent contract code based on container is adjusted in real time Method for testing includes the following steps:
1) intelligent contract code is inputted by user;
2) front end system feeds back the result whether code meets specification out according to configured rule detection contract code Come;
3) contract code is pulled in Docker container, carry out syntax parsing and compiles intelligent contract, and it is corresponding to obtain contract Abi, while will compiling result and syntax error feed back;
4) if step 3) compiling contract code success, contract is deployed in alliance's chain;
5) if step 3) compiling contract code failure, failure result is fed back and provides suggestion for revision;
If 6) deployment contract success in step 4), start the debugging process of contract code, the conjunction of capture user's input About parameter, while returning to contract call result.
Further, in the step 1), user has good coding body when inputting contract code using front end system It tests, removes to commonly use the process of the complicated expansion plugin of code IDE installation.
Further, in the step 2), front end system possesses a set of general contract verification rule, passes through these schools The normalized written degree and correctness of rule detection contract code are tested, user can find basic mistake before compiling, simultaneously To amending advice.
Further, in the step 3), front end system is connected with Docker container, carries out syntax parsing in a reservoir With stringent syntactic verification.If contract is syntactically correct, the bytecode that contract compiling generates is obtained, otherwise, by syntax error Information feeds back to front end system.
Further, the premise of the step 6) is the bytecode that step 4) can correctly dispose contract, and the step is To the process that contract is specifically debugged, contract parameter is inputted by user, is fed back after contract implementing result is obtained on alliance's chain To front end system.
The beneficial effects of the present invention are: the present invention directly obtains user's input from intelligent contract editing machine, to contract code Two layers of parsing is carried out, first layer is to detect contract code using general rule in front end system, to not meeting code normalized written The case where (user can voluntarily add customized specification), directly feeds back, the second layer be to contract code carry out syntax parsing, Compiling, feeds back to front end system to syntax error and internal error.Automatic deployment is provided to alliance's catenary system after compiling successfully Visual debugging entrance, can debug contract.The present invention significantly reduces the cost of intelligent contract debugging, passes through collection At the code detection and automatic deployment mechanism inside Docker container, debugging efficiency is improved.
Detailed description of the invention
Fig. 1 is that intelligent contract debugs full steps flow chart.
Specific embodiment
Below according to the drawings and specific embodiments the present invention is described in detail, the objects and effects of the present invention will become brighter It is aobvious.
As shown in Figure 1, the method for the present invention, includes the following steps:
1) intelligent contract code is inputted by user;
2) front end system feeds back the result whether code meets specification out according to configured rule detection contract code Come;
3) contract code is pulled in Docker container, carry out syntax parsing and compiles intelligent contract, and it is corresponding to obtain contract Abi, while will compiling result and syntax error feed back;
4) if step 3) compiling contract code success, contract is deployed in alliance's chain;
5) if step 3) compiling contract code failure, failure result is fed back and provides suggestion for revision;
If 6) deployment contract success in step 4), start the debugging process of contract code, the conjunction of capture user's input About parameter, while returning to contract call result.
Further, in the step 1), user has good coding body when inputting contract code using front end system It tests, removes to commonly use the process of the complicated expansion plugin of code IDE installation.
Further, in the step 2), front end system possesses a set of general contract verification rule, passes through these schools The normalized written degree and correctness of rule detection contract code are tested, user can find basic mistake before compiling, simultaneously To amending advice.
Further, in the step 3), front end system is connected with Docker container, carries out syntax parsing in a reservoir With stringent syntactic verification.If contract is syntactically correct, the bytecode that contract compiling generates is obtained, otherwise, by syntax error Information feeds back to front end system.
Further, the premise of the step 6) is the bytecode that step 4) can correctly dispose contract, and the step is To the process that contract is specifically debugged, contract parameter is inputted by user, is fed back after contract implementing result is obtained on alliance's chain To front end system.
Illustrate specific embodiment with a specific intelligent contract debugging example below, have the following steps:
1) firstly, user is in front end system editorial intelligence contract code,
2) front end system automatically parses contract code specification, by wrong Real-time Feedback in front end system;
3) format error of contract code is correct according to prompt modification, back-end system carries out syntax parsing to contract code And compiling, contract syntax error and internal error are fed back into front end system;
4) syntax error of contract code is correct according to prompt modification, back-end system correctly compiles intelligent contract and obtains two Ary codes;
5) binary code is deployed to alliance's chain by back-end system;
6) user issues in debugging system and calls contract request;
7) back-end system feeds back contract call result.

Claims (5)

1. a kind of intelligent real-time adjustment method of contract code based on container, which comprises the steps of:
1) intelligent contract code is inputted by user.
2) front end system feeds back the result whether code meets specification according to configured rule detection contract code.
3) contract code is pulled in Docker container, carry out syntax parsing and compiles intelligent contract, and it is corresponding to obtain contract Abi, while compiling result and syntax error being fed back.
4) if step 3) compiling contract code success, contract is deployed in alliance's chain, step 6) is gone to.
5) if failure result, is fed back and is provided suggestion for revision, go to step by step 3) compiling contract code failure 1)。
If 6) deployment contract success in step 4), start the debugging process of contract code, the contract ginseng of capture user's input Number, while returning to contract call result.
2. a kind of real-time adjustment method of intelligent contract based on container as described in claim 1, which is characterized in that in step 1) User has good coding to experience when inputting contract code using front end system, remove to commonly use the complicated expansion of code IDE installation Open up the process of plug-in unit.
3. a kind of real-time adjustment method of intelligent contract based on container as described in claim 1, which is characterized in that in step 2) Front end system possesses a set of general contract verification rule, by the normalized written degree of these verification rule detection contract codes and Correctness, user can find basic mistake before compiling, while obtain amending advice.
4. a kind of real-time adjustment method of intelligent contract based on container as described in claim 1, which is characterized in that step 3) In, front end system is connected with Docker container, carries out syntax parsing and stringent syntactic verification in a reservoir.If contract language Method is correct, then obtains the bytecode that contract compiling generates and syntax error message is otherwise fed back to front end system.
5. a kind of real-time adjustment method of intelligent contract based on container as described in claim 1, which is characterized in that step 6) On condition that step 4) can correctly dispose the bytecode of contract, the step is the process specifically debugged to contract, by with Family inputs contract parameter, feeds back to front end system after contract implementing result is obtained on alliance's chain.
CN201910037863.9A 2019-01-16 2019-01-16 A kind of real-time adjustment method of intelligent contract based on container Pending CN109783195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910037863.9A CN109783195A (en) 2019-01-16 2019-01-16 A kind of real-time adjustment method of intelligent contract based on container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910037863.9A CN109783195A (en) 2019-01-16 2019-01-16 A kind of real-time adjustment method of intelligent contract based on container

Publications (1)

Publication Number Publication Date
CN109783195A true CN109783195A (en) 2019-05-21

Family

ID=66500661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910037863.9A Pending CN109783195A (en) 2019-01-16 2019-01-16 A kind of real-time adjustment method of intelligent contract based on container

Country Status (1)

Country Link
CN (1) CN109783195A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188049A (en) * 2019-06-10 2019-08-30 北京阿尔山金融科技有限公司 Container Management method, apparatus and electronic equipment
CN110222532A (en) * 2019-06-06 2019-09-10 杭州趣链科技有限公司 A kind of subregion common recognition method for realizing the secret protection of alliance's chain based on NameSpace
CN110287107A (en) * 2019-05-27 2019-09-27 丹阳市萌咔信息技术有限公司 The data processing of block chain and intelligent contract combined debugging integrated approach, system and computer readable storage medium
CN111290958A (en) * 2020-02-20 2020-06-16 联动优势(北京)数字科技有限公司 Method and device for debugging intelligent contract
CN111427555A (en) * 2020-03-30 2020-07-17 中科全维科技(苏州)有限公司 Lightweight intelligent contract framework and contract development method
CN111666216A (en) * 2020-06-05 2020-09-15 中国银行股份有限公司 Intelligent contract analysis method and device
CN113835972A (en) * 2021-11-26 2021-12-24 南京金宁汇科技有限公司 ASM-based alliance chain intelligent contract resource consumption detection method and device
CN113961202A (en) * 2021-12-21 2022-01-21 北京中科金财科技股份有限公司 Method and system for automatically debugging intelligent contract
CN114157444A (en) * 2021-09-10 2022-03-08 北京天德科技有限公司 Block chain deployment system and deployment method based on container technology

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095523A (en) * 2016-06-03 2016-11-09 北京奇虎科技有限公司 A kind of method and system realizing Android compiling isolation
CN106598554A (en) * 2015-10-14 2017-04-26 上海汽车集团股份有限公司 Code generating apparatus
CN106598549A (en) * 2016-12-08 2017-04-26 天津米游科技有限公司 Intelligent agreement system based on block chain and implementation method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598554A (en) * 2015-10-14 2017-04-26 上海汽车集团股份有限公司 Code generating apparatus
CN106095523A (en) * 2016-06-03 2016-11-09 北京奇虎科技有限公司 A kind of method and system realizing Android compiling isolation
CN106598549A (en) * 2016-12-08 2017-04-26 天津米游科技有限公司 Intelligent agreement system based on block chain and implementation method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287107A (en) * 2019-05-27 2019-09-27 丹阳市萌咔信息技术有限公司 The data processing of block chain and intelligent contract combined debugging integrated approach, system and computer readable storage medium
CN110222532A (en) * 2019-06-06 2019-09-10 杭州趣链科技有限公司 A kind of subregion common recognition method for realizing the secret protection of alliance's chain based on NameSpace
CN110188049A (en) * 2019-06-10 2019-08-30 北京阿尔山金融科技有限公司 Container Management method, apparatus and electronic equipment
CN111290958A (en) * 2020-02-20 2020-06-16 联动优势(北京)数字科技有限公司 Method and device for debugging intelligent contract
CN111427555A (en) * 2020-03-30 2020-07-17 中科全维科技(苏州)有限公司 Lightweight intelligent contract framework and contract development method
CN111427555B (en) * 2020-03-30 2023-08-29 中科全维科技(苏州)有限公司 Lightweight intelligent contract framework and contract development method
CN111666216A (en) * 2020-06-05 2020-09-15 中国银行股份有限公司 Intelligent contract analysis method and device
CN111666216B (en) * 2020-06-05 2024-01-23 中国银行股份有限公司 Intelligent contract analysis method and device
CN114157444A (en) * 2021-09-10 2022-03-08 北京天德科技有限公司 Block chain deployment system and deployment method based on container technology
CN113835972A (en) * 2021-11-26 2021-12-24 南京金宁汇科技有限公司 ASM-based alliance chain intelligent contract resource consumption detection method and device
CN113961202A (en) * 2021-12-21 2022-01-21 北京中科金财科技股份有限公司 Method and system for automatically debugging intelligent contract

Similar Documents

Publication Publication Date Title
CN109783195A (en) A kind of real-time adjustment method of intelligent contract based on container
Autili et al. Aligning qualitative, real-time, and probabilistic property specification patterns using a structured english grammar
US20160357519A1 (en) Natural Language Engine for Coding and Debugging
US8418125B2 (en) Incremental model refinement and transformation in generating commerce applications using a model driven architecture
CA2680306C (en) Identification of concepts in software
CN105117233A (en) API calling method and device
US20070271233A1 (en) A generic interface for deep embedding of expression trees in programming languages
US9311077B2 (en) Identification of code changes using language syntax and changeset data
CN115952758B (en) Chip verification method and device, electronic equipment and storage medium
Mäder et al. Rule-based maintenance of post-requirements traceability relations
CN103605556A (en) Virtual test subject integrally-constructing system and method
CN103488738A (en) Method and system for automatically realizing JAVA object and data table SQL (structured query language) file
US20090112554A1 (en) Test Bench, Method, and Computer Program Product for Performing a Test Case on an Integrated Circuit
CN101944061B (en) Method and device for debugging codes
US9612829B2 (en) System and method for pattern based services extraction
CN106598843B (en) A kind of software log behavior automatic identifying method based on program analysis
CN111767035A (en) Application interface docking method and device based on OpenAPI
Chazalon et al. Iterative analysis of pages in document collections for efficient user interaction
CN112559359B (en) S-based 2 ML security critical system analysis and verification method
CN108228314A (en) A kind of Virtual prototype error-detecting method based on equipment stipulations
CN103164325B (en) A kind of method and apparatus of control coding
CN111857752A (en) PostgreSQL database installation method, device and equipment
CN111078576A (en) Independent Web service test equipment based on USB network card technology
CN110333900A (en) A method of BOOT in upgrading single-chip microcontroller memory
CN109032569A (en) A kind of RESTful service method for automatically releasing based on attribute tags

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

Application publication date: 20190521

RJ01 Rejection of invention patent application after publication