nevillegrech / gigahorse-toolchain

A binary lifter and analysis framework for Ethereum smart contracts
Other
295 stars 61 forks source link

Introduce precise fallback decompiler configuration #49

Closed sifislag closed 1 year ago

sifislag commented 1 year ago

The main item of this PR is the introduction of the precise fallback decompilation configuration option. When this option is enabled, if the default decompilation configuration (transactional) completes with imprecision (non empty Analytics_JumpToMany) it attempts to re-decompile it with a more precise configuration (currently employs the same kind of block cloning as the --early_cloning flag).

Precise fallback is on by default and can be disabled using the --disable_precise_fallback flag. In addition the --single_decomp flag has been removed and --disable_scalable_fallback has been introduced.

Other items:

sifislag commented 1 year ago

For 1000 contracts for the elipmoc dataset (default is with the scalable fallback):

Timeouts are unchanged
Total decompilation time:
default: 6031 s
default+precise_fallback: 9826 s

JumpToMany:
default: 591
default+precise_fallback: 364

NonModeledMLOAD:
default 16718
default+precise_fallback: 14189
sifislag commented 1 year ago

For 1000 contracts for the elipmoc dataset without the scalable fallback config:

Timeouts are unchanged
Total decompilation time:
transactional: 3118 s
transactional+precise_fallback: 6938 s

JumpToMany:
transactional: 403
transactional+precise_fallback: 176

NonModeledMLOAD:
transactional: 15340
transactional+precise_fallback: 12831