Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add info about tracer config, rm revertReasonTracer #25509

Merged
merged 2 commits into from Aug 18, 2022

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Aug 10, 2022

@holiman holiman merged commit 31488e4 into ethereum:gh-pages Aug 18, 2022

##### Setup

`setup` is invoked once, in the beginning when the tracer is being constructed by Geth for a given transaction. It takes in one argument `config`. `config` allows users to pass in options to the tracer. `config` is to be JSON-decoded for usage and its default value is `"{}"`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s1na Can you please explain what these new config options are?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These configs are meant to be tracer-specific. I.e. each JS or native tracer can now define which options it accepts. Let's say the callTracer has the following option to only collect data about the top-level call:

debug.traceTransaction('<txhash>, { tracer: 'callTracer', tracerConfig: { onlyTopCall: true } })

Or we're contemplating adding the following option to the prestateTracer to also collect the state of each account after tx execution:

debug.traceTransaction('<txhash>, { tracer: 'prestateTracer': tracerConfig: { collectPostState: true } })

But passing collectPostState to callTracer will have no effect because callTracer doesn't parse/understand it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants