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

eth/tracer: extend call tracer #22245

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Jan 28, 2021

This adds support for state overrides when tracing calls.

Fixes #22197

TODO

  • Updates the tracer API doc

Comment on lines +735 to +769
var traceConfig *TraceConfig
if config != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I had to think a while to figure out why this is needed. So essentially, you do this to clear out the StateOverrides, so it doesn't get applied a second time later on?
If that's the case, why not just set it to nil?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because api.traceTx only accepts the TraceConfig, while TraceCall use the TraceCallConfig. Here just do the parameter conversion.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

One question, but generally LGTM. Haven't tested it

eth/tracers: fix testing

eth, internal: add tests

internal: fix imports

eth/traces: handle invalid block parameter

eth/tracers: fix json field conflict
@rjl493456442
Copy link
Member Author

Rebased the PR

@holiman holiman added this to the 1.10.3 milestone Apr 21, 2021
@holiman holiman merged commit dd9c322 into ethereum:master Apr 21, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
Adds an an optional parameter `overrides *map[common.Address]account` to the `eth_call` API in order for the caller to  can customize the state.
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.

Extend the "TraceCall" API so that the state override can be support
2 participants