go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

ethclient/gethclient: add tracing apis to gethclient

Open bnovil opened this issue 2 years ago • 3 comments

Add methods to ethclient/gethclient:

  • TraceCall
  • TraceTransaction
  • TraceChain
  • TraceBlock
  • TraceBlockByNumber
  • TraceBlockByHash

to resolve the issue: #28182

bnovil avatar Sep 28 '23 07:09 bnovil

@s1na Thanks for reviewing. All issues resolved. Please review at you convenience.

bnovil avatar Oct 04 '23 12:10 bnovil

Hi @s1na , could the PR be merged?

bnovil avatar Nov 14 '23 08:11 bnovil

@bnovil Hey sorry for the delay here. I took another look at the PR. I would like to have another set of changes. Specifically I'd like to re-define and polish the trace config objects in the ethclient code. Biggest reason is those are internally using ethapi.StateOverride and ethapi.BlockOverrides types, however ethclient has re-defined those types. This inconsistency is not good.

We can use this chance to make the config UX a bit better organized:

  • It should be easy to pick one of the built-in tracers for the name (so those should be defined as constants). But also pass in name of custom tracer.
  • logger.Config: this is the configuration for the structLogger. However there is overlap with TracerConfig which allows configuration of every other tracer. The new config object should unify that. I.e. loggerConfig should be provided as part of TracerConfig.
  • For state and block overrides use the types defined in gethclient

Note the backend should not be changed.

s1na avatar Dec 06 '23 08:12 s1na

@bnovil please reopen if you decide to pick this back up.

lightclient avatar Aug 02 '24 17:08 lightclient