Intelligent contract operation code coverage rate calculation method and system

A smart contract and calculation method technology, applied in the blockchain field, can solve problems such as cumbersome operations and poor calculation accuracy, and achieve the effects of improving calculation accuracy, simplifying the calculation process, and providing comprehensive feedback information

Active Publication Date: 2017-11-07
WEBANK (CHINA)
View PDF11 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The main purpose of the present invention is to provide a smart contract operation code coverage calculation method and system, aiming t

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Intelligent contract operation code coverage rate calculation method and system
  • Intelligent contract operation code coverage rate calculation method and system
  • Intelligent contract operation code coverage rate calculation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0064] It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0065] The invention provides a method for calculating the coverage ratio of an operation code of an intelligent contract.

[0066] refer to figure 1 , figure 1 It is a schematic flowchart of a preferred embodiment of the smart contract operation code coverage calculation method of the present invention.

[0067] It should be noted that the steps shown in the flowcharts of the accompanying drawings may be performed in a computer system, such as a set of computer-executable instructions, and that although a logical order is shown in the flowcharts, in some cases, The steps shown or described may be performed in an order different than here.

[0068] In this embodiment, the smart contract operation code coverage calculation method includes:

[0069] Step S10, when the source code file of the smart contract is obtain...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an intelligent contract operation code coverage rate calculation method and system. The method comprises the steps that when a source code file of an intelligent contract is obtained, a deployment request is sent to a blockchain, and thus the blockchain can deploy the intelligent contract according to the deployment request and return a contract address of the intelligent contract; according to the contract address of the intelligent contract returned by the blockchain, identification information of the intelligent contract is obtained, a transaction request which contains the identification information is constructed, the transaction request is sent to the blockchain, and thus the blockchain can output a corresponding statistical result file to a preset storage medium according to the identification information of the transaction request; according to the identification information, the statistic result file is obtained in the storage medium, and according to the statistic result file and a preset formula, the intelligent contract coverage operation code rate is calculated. The method and system simplify the calculation process of the intelligent contract coverage rate and improve the calculation precision of the intelligent contract coverage rate.

Description

technical field [0001] The present invention relates to the technical field of block chains, in particular to a method and system for calculating the coverage ratio of operation codes of smart contracts. Background technique [0002] Coverage is a measure used to measure the integrity of software functional testing and a measure of the effectiveness of testing techniques. At present, there are mainly two coverage calculation methods in the blockchain field. One is the interface method for manual or script recording of test case execution calls, followed by statistical summary of data, and finally output of analysis results. The other is to use the log event mechanism of the smart contract, first transcompile the source code of the smart contract, insert the custom log event information by analyzing the source code, and send a transaction request to the blockchain, and finally analyze it through the script Log event information of blockchain transactions, summarize the data...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36
Inventor 郭世清张开翔万磊范瑞彬卢道和
Owner WEBANK (CHINA)
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products