nevillegrech / gigahorse-toolchain

A binary lifter and analysis framework for Ethereum smart contracts
Other
290 stars 59 forks source link

Increase completeness of global analysis by modeling of constant operations relying on the global analysis #136

Closed sifislag closed 3 months ago

sifislag commented 3 months ago

Use an instantiation of the ConstantFolding component to compute jump targets that require values pushed by a previous block (see example in issue https://github.com/nevillegrech/gigahorse-toolchain/issues/124). This change only seems to affect the legacy pipeline. Also played around with increasing the MAX_STACK_HEIGHT which can improve completeness with a negative impact on scalability.

Results: metadata dataset:

1996 contracts decompiled/analyzed by some config
1996 contracts decompiled/analyzed by all configs (common)

For has_output 0 not detected by config may24-meta-master-200: set()
For has_output 0 not detected by config may24-meta-globalcomp7-200: set()

ANALYTIC: decomp_time
may24-meta-master-200 (common): 11472.017761468887
may24-meta-globalcomp7-200 (common): 11713.32877779007 (+2.103%)

ANALYTIC: Analytics_UnreachableBlock
may24-meta-master-200 (common): 11717 (+5.759%)
may24-meta-globalcomp7-200 (common): 11079

ANALYTIC: Analytics_MissingJumpTargetAnyCtx
may24-meta-master-200 (common): 26 (+333.3%)
may24-meta-globalcomp7-200 (common): 6
github-actions[bot] commented 3 months ago

Test Results (Souffle 2.4)

55 tests  +1   55 :white_check_mark: +1   33m 42s :stopwatch: -11s  1 suites ±0    0 :zzz: ±0   1 files   ±0    0 :x: ±0 

Results for commit e3bf769a. ± Comparison against base commit cc3fac62.

github-actions[bot] commented 3 months ago

Test Results (Souffle 2.3)

55 tests  +1   55 :white_check_mark: +1   33m 7s :stopwatch: +42s  1 suites ±0    0 :zzz: ±0   1 files   ±0    0 :x: ±0 

Results for commit e3bf769a. ± Comparison against base commit cc3fac62.