erigon-pulse/core/vm
Suhabe Bugrara b18727911f
CFG analysis (#1327)
* First

* More on SA interpreter

* Fixup

* Add cfg action to hack binary that invokes the SaInterpreter. Added an operation handler for PUSH1

* refactor cfg tests into separate file

* Move cfg tests into separate file

* More refactoring into new file

* dataflow interpreter

* work on cfg0

* finish cfg0

* df works on base examples

* refactor into dataflow spec

* add bounded stack

* add harder example

* fix switch pass thru

* fix switch pass thru

* bug fix, and better printing

* manual merge

* restore call to test gencfg

* abstract interpretation based cfg analysis

* fix post signature

* use uint256 instead uint64, add post function

* preprocess stmts

* initial implementation of resolve

* fix resolve

* fix resolve

* print stmts for edges

* print stmts for edges

* print states

* print states

* bug fixes, debugging

* fix jumpi dest - first working impl

* reachability analysis to filter out dead edges

* add all transfer functions

* larger contract bytecodes from solc compiler

* simple solidity contract goes thru

* add deposit contract bytecode

* rename deposit contract test

* fix new contract arg

* Address non-determinism leading to imprecise results

* improve debugging output

* improve debugging output

* improve debugging output

* fix for bug causing incorrect analysis results

* fix for bug causing incorrect analysis results

* fix for bug causing incorrect analysis results

* add more test cases

* fix coverage bug

* debugging for non-termination

* fix bad fixpoint check

* fix data inference

* fix transfer function for halting stmts

* switch to deposit contract test, disable debugging

* add anly counter to viz, fix stmt.valid check

* show all preds, adjust anlycounter behavior

* dfs instead of bfs to fail earlier

* viz improvements

* add worklist size to viz

* add test case for private functions

* valueset analysis

* add more checks to fail earlier in the analysis to help debugging, improve debugging output, catch additional bad jumps

* delete old code

* delete old code

* delete old code

* fix up minor changes to jump table

* copy over comments from cgf-1 branch

* remove minor diffs

* add recompiled deposit contract

* graph viz

* cleanup/refactoring

* initial impl of viz

* script to run cfg anly and generate dot file

* div example

* accept bytecode from cmd line

* add minimal deposit contract example

* replace valueset analysis with stackset analysis

* get in sync with master

* sync with master

* fix linting

* fix linting

* fix linting

* reformatting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* harness for running over all contracts

* refactor anly, track coverage metrics

* breakdown unresolved into different types, fix bad opcode bug

* sort programs by frequency

* ingest used contracts from bigquery

* performance, concurrency, bug fixes

* more test cases, handle invalid jumps differently, remove duplicate edges, report analytics limit

* simplify concurrency

* correctly track short stack

* add new transfer function, fix stack len

* variable stack length, perf opts, inc anly count limit

* profiling

* test case for large state size

* use custom hash function for control

* timeouts

* cfg.sh

* increase to 5 min timeout

* track elpased time

* use ptr

* increase limits

* increase limits

* fix mem leak

* debug mem leak

* debug mem leak

* lower resource limits

* fix nil error

* add new lattice element

* re-enable

* cut down limits

* preliminary proof checker

* refactor batch mode to run cfg in subprocess,put memory limit

* remove hard wiring

* adjust limits

* update metrics tracking

* more succinct proof checker

* rewrite checker

* bug fixes on checker

* bug fix

* remove print stmts

* track proof size

* print proof size

* don't panic on process error

* compress proof

* go mody tidy

* code formatting

* fix capitalization

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* remove unnecessary files

* fix typo

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-10-30 12:24:14 +00:00
..
runtime geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
stack geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
testdata core/vm: fix benchmark overflow + prep for precompile repricings (#21530) 2020-10-06 14:12:09 +02:00
absint_cfg_proof_check.go CFG analysis (#1327) 2020-10-30 12:24:14 +00:00
absint_cfg_proof_gen.go CFG analysis (#1327) 2020-10-30 12:24:14 +00:00
absint_cfg.go CFG analysis (#1327) 2020-10-30 12:24:14 +00:00
analysis_test.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00
analysis.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00
common.go Use uint256 in EVM implementation (kudos to Pawel Bylica) (#551) 2020-05-18 08:10:59 +01:00
contract.go fixups 2020-08-14 17:43:48 +02:00
contracts_test.go core/vm: fix benchmark overflow + prep for precompile repricings (#21530) 2020-10-06 14:12:09 +02:00
contracts.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
doc.go core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
eips.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
errors.go core/vm: EIP-2315, JUMPSUB for the EVM (#20619) 2020-06-15 19:38:13 +03:00
evm.go Add the missing CaptureStart and CaptureEnd (#1316) 2020-10-29 12:44:11 +00:00
evmc.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
gas_table_test.go Jump tables data race (#1245) 2020-10-20 22:23:56 +01:00
gas_table.go geth-1.9.23: post-rebase fixups 2020-10-26 17:16:00 +01:00
gas.go all: fix typos in comments (#21118) 2020-06-15 19:38:13 +03:00
gen_structlog.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
instructions_test.go Jump tables data race (#1245) 2020-10-20 22:23:56 +01:00
instructions.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
interface.go Use uint256 for account balance (#580) 2020-05-26 17:53:50 +01:00
interpreter.go Jump tables data race (#1245) 2020-10-20 22:23:56 +01:00
jump_table.go Control Flow Analysis (#990) 2020-08-28 07:26:49 +01:00
logger_json.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
logger_test.go geth 1.9.18 post-rebase fixups 2020-08-08 17:33:35 +02:00
logger.go geth-1.9.23: post-rebase fixups 2020-10-26 17:16:00 +01:00
memory_table.go stack pool (#627) 2020-06-05 17:45:56 +03:00
memory.go Use uint256 in EVM implementation (kudos to Pawel Bylica) (#551) 2020-05-18 08:10:59 +01:00
opcodes.go core/vm: EIP-2315, JUMPSUB for the EVM (#20619) 2020-06-15 19:38:13 +03:00
stack_table.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00