Skip to content

Commit

Permalink
docs: update tracing docs (#26270)
Browse files Browse the repository at this point in the history
* Move JS tracing ref from API page

* add tracerConfig to ref, link to traceConfig in other methods
  • Loading branch information
s1na committed Nov 29, 2022
1 parent 8d3e566 commit 761fcd5
Show file tree
Hide file tree
Showing 4 changed files with 537 additions and 516 deletions.
11 changes: 9 additions & 2 deletions docs/_evm-tracing/builtin-tracers.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@ Things to note about the call tracer:
- In case a frame reverts, the field `output` will contain the raw return data
- In case the top level frame reverts, its `revertReason` field will contain the parsed reason of revert as returned by the Solidity contract

`callTracer` has an option to only trace the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info are required. Here's how it can be configured:
#### Config

`callTracer` accepts two options:

- `onlyTopCall: true` instructs the tracer to only process the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info are required.
- `withLog: true` instructs the tracer to also collect the logs emitted during each call.

Example invokation with the `onlyTopCall` flag:

```terminal
> debug.traceTransaction('0xc73e70f6d60e63a71dabf90b9983f2cdd56b0cb7bcf1a205f638d630a95bba73', { tracer: 'callTracer', tracerConfig: { onlyTopCall: true } })
Expand Down Expand Up @@ -504,4 +511,4 @@ debug.traceCall({from: , to: , input: }, 'latest', {stateOverrides: {'0x...': {c
This page showed how to use the tracers that come bundled with Geth. There are a set
written in Go and a set written in Javascript. They are invoked by passing their names
when calling an API method. State overrides can be used in combination with tracers to
examine precisely what the EVM will do in some hypothetical scenario.
examine precisely what the EVM will do in some hypothetical scenario.
Loading

0 comments on commit 761fcd5

Please sign in to comment.