Skip to content

Commit

Permalink
update tracing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcook1186 committed Nov 28, 2022
1 parent f171743 commit 7af02a2
Show file tree
Hide file tree
Showing 5 changed files with 610 additions and 632 deletions.
11 changes: 9 additions & 2 deletions docs/developers/evm-tracing/built-in-tracers.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,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 @@ -452,4 +459,4 @@ debug.traceCall({from: , to: , input: }, 'latest', {stateOverrides: {'0x...': {c

## Summary {#summary}

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.
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 scenarios.
Loading

0 comments on commit 7af02a2

Please sign in to comment.