Optimism - debug_trace and Node Performance Issues

The Optimism chain behaves like a non-deterministic chain. This causes many issues, demonstrating notably weak performance for debug_trace methods, especially with pre-Bedrock blocks.

debug_traceBlockByNumber example

Observations with batch requests:

  1. One query (no batch): result in 1 second
  2. Two queries: result in 12.5 seconds
  3. Three queries: result in 22 seconds
  4. Four queries: result in 28 seconds and a timeout.

Good to Know

  • Older blocks exhibit worse response/performance than the latest blocks (if you follow the tip).
  • Large batches result in worse response/performance compared to running a simple call multiple times.
  • It's usually not possible to achieve more than 5 requests per second (rps) using the debug_traceBlockByNumber method when fetching old data.

📘

Additional information about Optimism and debug_traceBlockByNumber is avalable over its GitHub page.