fix(turbo/execution): skip if header number is nil #12033
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm running with erigon e3 in holesky chain, and found somd panic message in erigon's log:
[EROR] [09-18|23:57:23.899] RPC method engine_getPayloadBodiesByHashV1 crashed: runtime error: invalid memory address or nil pointer dereference [service.go:223 panic.go:770 panic.go:261 signal_unix.go:881 getters.go:154 execution_client.go:41 chain_reader.go:220 engine_server.go:599 engine_server.go:766 value.go:596 value.go:380 service.go:228 handler.go:534 handler.go:484 handler.go:425 handler.go:245 handler.go:338 asm_amd64.s:1695]
The panic was raised in this line
erigon/turbo/execution/eth1/getters.go
Lines 150 to 154 in 1dd4a55
After some digging, found
HeaderByNumber
maybe returnnil, nil
, so I think we need to handle thenil
number caseerigon/turbo/snapshotsync/freezeblocks/block_reader.go
Lines 265 to 274 in f0acc51
erigon/turbo/snapshotsync/freezeblocks/block_reader.go
Lines 478 to 490 in f0acc51