-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support debug_traceTransaction #1737
Comments
Any progress on this? I'm happy to try and pick it up over the weekend if it's stalled. |
this requires some effort, first, ethers-rs does not have support for geth tracing either, gakonst/ethers-rs#558 contains (some of) the first work package, which is bindings for geth's trace types. once we have that we need proper conversions from revm tracing to geth trace types the current revm tracing to parity tracing conversion is handled here https://github.com/foundry-rs/foundry/blob/master/evm/src/trace/node.rs we'd need the same for geth tracing types so to summarize
|
|
So, this ends up being hairier than expected. foundry/anvil/core/src/types.rs Lines 13 to 26 in 695bff1
The
It requires writing some JS built-ins on top of evaluating the JS. Do you have any preference for the JS evaluation piece? it looks like there's a library, |
sorry, hard time understanding this, why would we need to evaluate JS? I don't know where this snippet is from.
so next step would be to convert revm traces to the new geth tracing types, right? once we have those conversions, we can deal wth the we implemented conversions for parity traces here https://github.com/foundry-rs/foundry/blob/master/evm/src/trace/node.rs lmk what's unclear |
Sorry, the JS snippet is from here: https://geth.ethereum.org/docs/dapp/custom-tracer#custom-javascript-tracing Essentially, |
+1 on this one This could very helpful for us as for now we are not able to deeply analyze transactions that were executed on Anvil and we are forced to work side-by-side with hardhat (and re-execute the transactions) |
bumping this |
@mattsse we need javascript support because |
I don't feel super hot about allowing the geth-style JS tracer here FWIW. Geth itself has switched to native tracers I believe for performance reasons? |
I agree that JS tracer is slower than native tracer but it's easier to integrate with existing tracer implementations out there. However, I don't have strong preferences between JS-style tracers and native tracers. We probably need to support the native tracers (mostly |
+1 on this request. |
got some example code? |
closing as |
Component
Anvil
Describe the feature you would like
I am currently working on adding support for anvil to Brownie. (eth-brownie/brownie#1541). Brownie makes heavy use of
eth_debugTraceTransaction
It looks like anvil already has a stub for the rpc call that returns
Not implemented
:foundry/anvil/src/eth/api.rs
Lines 1140 to 1147 in b8733d4
@gakonst said in telegram: "I think we should already should be able to support geth style traces. Maybe we dont expose over rpc?"
Additional context
Brownie currently checks for
response["error"]["code"] != -32601
, so changing anvil to do that in the mean time would be helpful.https://github.com/eth-brownie/brownie/blob/master/brownie/network/web3.py#L119-L131
The text was updated successfully, but these errors were encountered: