erigon-pulse/eth/tracers
David cad36b792c
Add eventlog index when using callTracer withLog (#8230)
First posted [here](https://github.com/ledgerwatch/erigon/pull/8195)
with bugs, which fixed in this PR.


When we call the debug_traceXXX API provided by Erigon, the withLog
option in tracerConfig is very helpful.

However, currently, the tracer cannot guarantee that the order of logs
output is consistent with the event logs returned in the transaction
receipt. This may make it difficult to use the output of the APIs. If
you need to access event logs in order, it is recommended to use the
event logs returned in the transaction receipt.

Here is an example to illustrate the reason why the order of callTracer
logs and receipt eventlogs can be inconsistent:

In a call trace tree, if a call has multiple logs and this call has
multiple child calls, and logs are also output in the child calls, the
logs of the child calls may be output between the logs of the parent
call in receipt.

I add an index field of log to identify log index of the logs in tracer
result, and it helps me a lot.
2023-09-18 13:48:37 +07:00
..
internal/tracetest Add eventlog index when using callTracer withLog (#8230) 2023-09-18 13:48:37 +07:00
js
logger Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
native Add eventlog index when using callTracer withLog (#8230) 2023-09-18 13:48:37 +07:00
api.go
tracer.go
tracers_test.go Update execution-spec-tests to v1.0.1 (#7980) 2023-08-08 15:01:35 +02:00
tracers.go