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

Native tracers support #4110

Closed
Tracked by #8269
ValentinAndreevich opened this issue Jan 17, 2023 · 10 comments
Closed
Tracked by #8269

Native tracers support #4110

ValentinAndreevich opened this issue Jan 17, 2023 · 10 comments
Labels
C-anvil Command: anvil T-feature Type: feature
Milestone

Comments

@ValentinAndreevich
Copy link

Component

Anvil

Describe the feature you would like

debug_traceCall is useful for getting an execution trace of eth_call, expecially when it comes to tx simulation. That will be very nice if you are able to add callTracer support as a tracing option.

Additional context

No response

@ValentinAndreevich ValentinAndreevich added the T-feature Type: feature label Jan 17, 2023
@onbjerg onbjerg added the C-anvil Command: anvil label Feb 27, 2023
@algtm
Copy link

algtm commented Mar 20, 2023

+1

@chibitanaka
Copy link

+1, callTracer support would be nice

@mattsse
Copy link
Member

mattsse commented Jun 5, 2023

this is being worked on separately on https://github.com/paradigmxyz/reth
where these are already implemented, there will soon be some consolidation efforts to reduce duplicate code.

If someone wants to add this functionality via copy-paste to anvil until this is done, I'm happy to give pointers.

@lljxx1
Copy link

lljxx1 commented Jun 21, 2023

+1

@Billy1900
Copy link

One more requirement, I got the trace like this:

{
    "depth": 1,
    "gas": 29978936,
    "gasCost": 3,
    "op": "PUSH1",
    "pc": 0,
    "stack": []
},

however, when I use debug_traceTransaction, I got

{
    "depth": 0,
    "error": "",
    "gas": 39469,
    "gasCost": 3,
    "memory": [],
    "op": "PUSH1",
    "pc": 0,
    "stack": [],
    "storage": {}
},

can we add storage and memory part?

@cesarhuret
Copy link

this is being worked on separately on https://github.com/paradigmxyz/reth where these are already implemented, there will soon be some consolidation efforts to reduce duplicate code.

If someone wants to add this functionality via copy-paste to anvil until this is done, I'm happy to give pointers.

could you give me some pointers?

@Billy1900
Copy link

this is being worked on separately on https://github.com/paradigmxyz/reth where these are already implemented, there will soon be some consolidation efforts to reduce duplicate code.
If someone wants to add this functionality via copy-paste to anvil until this is done, I'm happy to give pointers.

could you give me some pointers?

what do you mean pointers, the storage and memory like

{
    "depth": 0,
    "error": "",
    "gas": 39469,
    "gasCost": 3,
    "memory": [],
    "op": "PUSH1",
    "pc": 0,
    "stack": [],
    "storage": {}
},

@cesarhuret
Copy link

this is being worked on separately on https://github.com/paradigmxyz/reth where these are already implemented, there will soon be some consolidation efforts to reduce duplicate code.
If someone wants to add this functionality via copy-paste to anvil until this is done, I'm happy to give pointers.

could you give me some pointers?

what do you mean pointers, the storage and memory like

{
    "depth": 0,
    "error": "",
    "gas": 39469,
    "gasCost": 3,
    "memory": [],
    "op": "PUSH1",
    "pc": 0,
    "stack": [],
    "storage": {}
},

pointers meaning instructions/help on how to implement this into anvil

@Billy1900
Copy link

this is being worked on separately on https://github.com/paradigmxyz/reth where these are already implemented, there will soon be some consolidation efforts to reduce duplicate code.
If someone wants to add this functionality via copy-paste to anvil until this is done, I'm happy to give pointers.

could you give me some pointers?

what do you mean pointers, the storage and memory like

{
    "depth": 0,
    "error": "",
    "gas": 39469,
    "gasCost": 3,
    "memory": [],
    "op": "PUSH1",
    "pc": 0,
    "stack": [],
    "storage": {}
},

pointers meaning instructions/help on how to implement this into anvil

I do not dive deep into how we implement this. But I think you could refer to how debug_traceTransaction does. It won't be hard.

@zerosnacks
Copy link
Member

This is supported as of #8375

Let me know if this is incorrect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-feature Type: feature
Projects
None yet
Development

No branches or pull requests

9 participants