debug_traceBlockByHash takes a lot of time to get traces and times out
Describe the bug Hello, I am an engineer at Coinbase working on getting Optimism traces for our service. We are seeing a lot of timeouts when calling debug_traceBlockByHash method and it takes a lot of time to get the data. Is this a known issue? And is there any fix for this to speed up the process of getting the traces.
For context, I am using Quicknode to get the Optimism data.
@aditya17cb maybe you can try jsvisa/optimism-l2geth:v0.2 this docker image, FYI https://github.com/ethereum-optimism/optimism/pull/3097
I've been able to resolve this by doing the following:
-
Add 'timeout' param to the RPC call. Example: {"jsonrpc":"2.0", "method":"^Cbug_traceTransaction", "params":["0xa97067dd04cf7ab72a11c56af7506e16b0b70a6b0131840c7221e1aad05ba753", {"timeout":"120s", "tracer": "callTracer"}], "id":1}
-
Configure the node to have extended read and idle timeouts:
-
create a directory (e.g. configs) and create a file called l2geth.toml that has the following: [Node.HTTPTimeouts] ReadTimeout = 120000000000 WriteTimeout = 30000000000 IdleTimeout = 120000000000
-
modify the docker-compose.yml to mount the directory as a volume called /configs/
-
modify the l2geth-start.sh script to have a new option called --configs=/configs/l2geth.toml