Intelligent contract defect triggering detection method and system based on defect abstracts
A smart contract and detection method technology, applied in the direction of error detection/correction, platform integrity maintenance, software testing/debugging, etc., can solve the code defects of the detection results, reduce the validity of the detection results, and can not describe the security of smart contracts well status quo and other issues to achieve the effect of protecting safety
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment 1
[0088] The detection process of a smart contract defect triggerability detection method based on defect summary is:
[0089] Step 1. For the defects of the smart contract to be detected, define the defect trigger constraint conditions (the defect trigger constraint conditions are fixed); the contract symbol σs represents the contract execution stack, INS represents the currently executed instruction and defines related functions, The related functions include: zero extension function ZeroExt, sign extension function SignExt and unsigned number comparison function UGT, etc.
[0090] Take the unsigned number comparison function UGT as an example. When the first parameter is greater than the second parameter, UGT returns true, otherwise it returns false; for example, the defect trigger condition of the subtraction overflow of uint256 data can be expressed as:
[0091] {INS == SUB, UGT(σs[1],σs[0])}
[0092] Step 2. Select any symbolic execution tool to extract the path constraint set T w...
specific Embodiment 2
[0103] The detection process of a smart contract defect triggerability detection method based on defect summary is as follows:
[0104] Step 1: Select the open source tool Oyente as the symbolic execution tool;
[0105] Step 2: Use the open source tool ethereumetl to obtain the smart contract existing in Ethereum as a test case;
[0106] Step 3: Use Oyente for symbolic execution of all test cases, and obtain the defect summary of each test case;
[0107] Step 4: When the contract call for the smart contract in the test case occurs, obtain the state data of the smart contract and the contract call data;
[0108] Step 5: Use real data to replace the symbols in the path constraint and defect trigger condition constraint obtained by symbolic execution with real values;
[0109] Step 6: For path constraints and defect trigger condition constraints whose symbols are replaced with real values, perform constraint solving through Z3, and calculate whether all constraints have solutions;
[0110] S...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


