Skip to content

fix: cherry-pick Miga Labs #271 nil committee panic fix#6

Open
anadi2311 wants to merge 1 commit into
masterfrom
test/issue-271-nil-committee-panic
Open

fix: cherry-pick Miga Labs #271 nil committee panic fix#6
anadi2311 wants to merge 1 commit into
masterfrom
test/issue-271-nil-committee-panic

Conversation

@anadi2311
Copy link
Copy Markdown

Summary

Cherry-picks migalabs/goteth@4bc5c76 from fix/issue-271-nil-committee-panic onto Obol master.

  • Root cause: NewEpochData retries committee/proposer-duties fetch (up to --max-request-retries) and fails the state download instead of caching empty committees after transient Beacon errors (e.g. unexpected EOF).
  • Defense in depth: GetAttestingIndices / GetValidatorFromCommitteeIndex return errors on missing committees instead of nil-panicking.

Fixes the Electra indexer crash reported in production/Hoodi canary (internal notes / GOTETH_MIGALABS_ISSUE_ELECTRA_PANIC.md).

Test plan

A transient beacon-node/proxy failure (e.g. 'unexpected EOF') while
fetching committees made NewEpochData swallow the error and build a
state with empty committees. ElectraMetrics.GetAttestingIndices then
dereferenced a nil committee, crashing the whole indexer with a SIGSEGV;
the legacy Altair/Deneb path had the same latent hazard via an
out-of-range slice access.

Root cause fix: NewEpochData now retries the committees/proposer-duties
fetch up to --max-request-retries and returns an error on failure, so
the state download is retried instead of caching a state with empty
committees.

Defense in depth: GetAttestingIndices (Electra) and
GetValidatorFromCommitteeIndex (Altair/Deneb) now return a clear error
on a missing committee instead of panicking, and the Electra attestation
path propagates it for a graceful shutdown rather than log.Fatalf.

Adds unit tests covering the missing-committee guards.
@anadi2311 anadi2311 requested a review from aly-obol May 26, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants