• Matthew Slipper's avatar
    l2geth: Fix NPE in API tracer (#2873) · c3363225
    Matthew Slipper authored
    The `debug_standardTraceBlockToFile` RPC was panicing here:
    
    ```go
    // Line 572 in eth/api_tracer.go
    if config != nil && config.Overrides != nil {
    ```
    
    `config` is an instance of `StdTraceConfig`, which embeds a pointer to `vm.LogConfig`. This pointer is `nil` when the user doesn't pass in any overrides. Since `vm.LogConfig` exposes the `Overrides` parameter, this caused a panic.
    
    `debug_standardTraceBlockToFile` is required for users like Dune, who need access to transaction traces that are too complex to serve over RPC.
    c3363225
api_tracer.go 29.7 KB