go-ethereum
go-ethereum copied to clipboard
ethclient/gethclient: add tracing apis to gethclient
Add methods to ethclient/gethclient:
- TraceCall
- TraceTransaction
- TraceChain
- TraceBlock
- TraceBlockByNumber
- TraceBlockByHash
to resolve the issue: #28182
@s1na Thanks for reviewing. All issues resolved. Please review at you convenience.
Hi @s1na , could the PR be merged?
@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
TracerConfigwhich allows configuration of every other tracer. The new config object should unify that. I.e. loggerConfig should be provided as part ofTracerConfig. - For state and block overrides use the types defined in gethclient
Note the backend should not be changed.
@bnovil please reopen if you decide to pick this back up.