plugeth/eth/tracers
rjl493456442 e50aeac4d0
eth/traces: add state limit (#25812)
This PR introduces a new mechanism in chain tracer for preventing creating too many trace states.

The workflow of chain tracer can be divided into several parts:

- state creator generates trace state in a thread
- state tracer retrieves the trace state and applies the tracing on top in another thread
- state collector gathers all result from state tracer and stream to users

It's basically a producer-consumer model here, while if we imagine that the state producer generates states too fast, then it will lead to accumulate lots of unused states in memory. Even worse, in path-based state scheme it will only keep the latest 128 states in memory, and the newly generated state will invalidate the oldest one by marking it as stale.

The solution for fixing it is to limit the speed of state generation. If there are over 128 states un-consumed in memory, then the creation will be paused until the states are be consumed properly.
2022-10-06 10:48:04 +02:00
..
internal/tracetest eth/tracers: add diffMode to prestateTracer (#25422) 2022-10-05 19:05:43 -05:00
js all: fix docstrings 2022-10-04 09:18:02 +02:00
logger core, eth: pre-allocate map in storage copy (#25279) 2022-07-12 10:08:45 +03:00
native eth/tracers: add diffMode to prestateTracer (#25422) 2022-10-05 19:05:43 -05:00
api_test.go eth/tracer: fix broken test (#25715) 2022-09-08 08:06:06 +02:00
api.go eth/traces: add state limit (#25812) 2022-10-06 10:48:04 +02:00
tracers_test.go all: more linters (#24783) 2022-06-13 16:24:45 +02:00
tracers.go eth/tracers: add onlyTopCall option to callTracer (#25430) 2022-08-09 11:04:57 +02:00
tracker_test.go eth/traces: add state limit (#25812) 2022-10-06 10:48:04 +02:00
tracker.go eth/traces: add state limit (#25812) 2022-10-06 10:48:04 +02:00