Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feat(debug_traceTransaction): initial commit #1469

Merged
merged 8 commits into from
Jul 24, 2022

Conversation

drawnwren
Copy link
Contributor

@drawnwren drawnwren commented Jul 8, 2022

Motivation

Implementation of #1347 debug_traceTransaction

Solution

Relatively straightforward solution. The GethDebugOptions type was stolen from anvil.

PR Checklist

  • [no ] Added Tests -- no tests added because testing this requires an rpc that supports debug_traceTransaction. I added an example that will work if the RPC_URL environment variable is set to an RPC that supports debug_traceTransaction
  • Added Documentation - yes, however might be room for improvement. lmk
  • Updated the changelog

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

thanks for this,

types needs some changes, otherwise this looks good.

also needs nightly formatting cargo +nightly fmt

ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Show resolved Hide resolved
ethers-providers/src/provider.rs Outdated Show resolved Hide resolved
ethers-providers/src/provider.rs Outdated Show resolved Hide resolved
examples/geth_trace_transaction.rs Show resolved Hide resolved
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm

@gakonst
Copy link
Owner

gakonst commented Jul 11, 2022

The RPC_URL env var is not specified anywhere for the examples, might be worth pulling out the existing infura link from here to an env var and using that @drawnwren

@drawnwren
Copy link
Contributor Author

Right, so the problem is that it requires an endpoint that supports debug_traceTransaction and I don't think anyone wants to leave a public one out there (because the compute is invariably expensive). @gakonst

@gakonst
Copy link
Owner

gakonst commented Jul 11, 2022

Ah ok, in that case maybe let's disable it from the examples running in CI, or use Anvil for it (what's blocking us from supporting geth-style traces again in Anvil @mattsse?) ?

@mattsse
Copy link
Collaborator

mattsse commented Jul 11, 2022

next step is revm tracing conversion to geth types

ref foundry-rs/foundry#1737 (comment)

@gakonst gakonst merged commit cb7e586 into gakonst:master Jul 24, 2022
@grigull grigull mentioned this pull request Sep 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants