Skip to content

ethclient/gethclient: add tracing API methods #31510

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DeVikingMark
Copy link

Added methods:

  • TraceTransaction - trace transaction execution
  • TraceCall - trace contract call
  • TraceBlock - trace all transactions in a block
  • TraceChain - trace transactions across a range of blocks
  • TraceCallWithCallTracer - specialized method with call tracer
  • TraceTransactionWithCallTracer - specialized method with call tracer

Fixes #28182

@s1na
Copy link
Contributor

s1na commented May 2, 2025

As I've mentioned before I think just a super-light wrapper around the tracing methods that returns interface{} doesn't make as much sense. I think I will have to work on the generic methods myself.

In the meanwhile we can accept the CallTracer specific methods. I think those are valuable. Please remove everything else and only keep CallTracer methods.

@s1na
Copy link
Contributor

s1na commented May 2, 2025

I vaguely remembered there was another PR. And indeed: there is also #31364 which does exactly that. I will take a closer at both and if equal in quality will merge the "earlier" PR.

@DeVikingMark
Copy link
Author

@s1na I've updated the PR to keep only the CallTracer-specific methods as requested. I've removed all generic tracing methods that return interface{} (TraceTransaction, TraceCall, TraceBlock, and TraceChain) and kept only the CallTracer-specific methods (TraceCallWithCallTracer and TraceTransactionWithCallTracer). I've also fixed the remaining implementation to ensure proper type safety.

@paulmillr
Copy link

what about trace_filter?

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.

Support tracing API in gethclient
3 participants