fix nil pointer panic in check_consensus_sync_status#157
fix nil pointer panic in check_consensus_sync_status#157qu0b merged 2 commits intoethpandaops:masterfrom
Conversation
When GetNodeSyncStatus returns an error, syncStatus is nil, but getClientInfo dereferences it unconditionally. This causes a panic when a consensus client is temporarily unreachable (e.g. during initial network bootstrap before genesis). The execution sync status task already handles this correctly with a nil guard; apply the same pattern here. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1d5b002 to
4321d7d
Compare
Address review: use an early-return guard with Synchronizing: true (assume unhealthy) instead of relying on Go zero-value defaults. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Root cause analysisThe panic was hit in Erigon's glamsterdam Kurtosis CI, which spins up a 3-node devnet (Erigon EL + Lighthouse CL) with a short Timeline
Key observations
|
Summary
check_consensus_sync_statuswhenGetNodeSyncStatusreturns an errorsyncStatusisnil, butgetClientInfodereferences it unconditionally — causing a paniccheck_execution_sync_statustask already has this nil guard; this applies the same patternPanic trace from CI
Observed in Erigon CI glamsterdam Kurtosis tests: https://github.com/erigontech/erigon/actions/runs/24228480466/job/70734695754
Test plan
check_consensus_sync_statusno longer panics when a CL client is unreachable during startupClientInfofor failed clients hasNamepopulated and sync fields zeroed