core,eth: call frame tracing (#23087)
This change introduces 2 new optional methods; `enter()` and `exit()` for js tracers, and makes `step()` optiona. The two new methods are invoked when entering and exiting a call frame (but not invoked for the outermost scope, which has it's own methods). Currently these are the data fields passed to each of them: enter: type (opcode), from, to, input, gas, value exit: output, gasUsed, error The PR also comes with a re-write of the callTracer. As a backup we keep the previous tracing script under the name `callTracerLegacy`. Behaviour of both tracers are equivalent for the most part, although there are some small differences (improvements), where the new tracer is more correct / has more information.
Showing
- core/vm/access_list_tracer.go 5 additions, 0 deletionscore/vm/access_list_tracer.go
- core/vm/evm.go 53 additions, 12 deletionscore/vm/evm.go
- core/vm/instructions.go 4 additions, 0 deletionscore/vm/instructions.go
- core/vm/logger.go 12 additions, 0 deletionscore/vm/logger.go
- core/vm/logger_json.go 5 additions, 0 deletionscore/vm/logger_json.go
- core/vm/runtime/runtime_test.go 256 additions, 7 deletionscore/vm/runtime/runtime_test.go
- core/vm/stack.go 1 addition, 1 deletioncore/vm/stack.go
- eth/tracers/internal/tracers/assets.go 43 additions, 20 deletionseth/tracers/internal/tracers/assets.go
- eth/tracers/internal/tracers/call_tracer.js 77 additions, 208 deletionseth/tracers/internal/tracers/call_tracer.js
- eth/tracers/internal/tracers/call_tracer_legacy.js 252 additions, 0 deletionseth/tracers/internal/tracers/call_tracer_legacy.js
- eth/tracers/testdata/call_tracer/create.json 0 additions, 0 deletionseth/tracers/testdata/call_tracer/create.json
- eth/tracers/testdata/call_tracer/deep_calls.json 0 additions, 0 deletionseth/tracers/testdata/call_tracer/deep_calls.json
- eth/tracers/testdata/call_tracer/delegatecall.json 0 additions, 0 deletionseth/tracers/testdata/call_tracer/delegatecall.json
- eth/tracers/testdata/call_tracer/inner_create_oog_outer_throw.json 77 additions, 0 deletions...rs/testdata/call_tracer/inner_create_oog_outer_throw.json
- eth/tracers/testdata/call_tracer/inner_instafail.json 63 additions, 0 deletionseth/tracers/testdata/call_tracer/inner_instafail.json
- eth/tracers/testdata/call_tracer/inner_throw_outer_revert.json 0 additions, 0 deletions...racers/testdata/call_tracer/inner_throw_outer_revert.json
- eth/tracers/testdata/call_tracer/oog.json 0 additions, 0 deletionseth/tracers/testdata/call_tracer/oog.json
- eth/tracers/testdata/call_tracer/revert.json 0 additions, 0 deletionseth/tracers/testdata/call_tracer/revert.json
- eth/tracers/testdata/call_tracer/revert_reason.json 0 additions, 0 deletionseth/tracers/testdata/call_tracer/revert_reason.json
- eth/tracers/testdata/call_tracer/selfdestruct.json 75 additions, 0 deletionseth/tracers/testdata/call_tracer/selfdestruct.json
Loading
Please register or sign in to comment