Skip to content

fix(beacon): guard against nil finality fields and recover request panics - #251

Open
samcm wants to merge 2 commits into
masterfrom
fix/finality-nil-guards
Open

fix(beacon): guard against nil finality fields and recover request panics#251
samcm wants to merge 2 commits into
masterfrom
fix/finality-nil-guards

Conversation

@samcm

@samcm samcm commented Jun 12, 2026

Copy link
Copy Markdown
Member

If an upstream returned a Finality with a nil Finalized, Justified, or PreviousJustified, the majority decider dereferenced it directly and panicked. Because this runs in the background polling goroutine rather than an HTTP handler, that panic took down the process.

The decider now skips finality entries with nil fields (they don't count toward the majority threshold), checkFinality filters them before aggregating, and the HTTP router gets a PanicHandler so a panic on the request path returns a 500 instead of crashing.

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.

1 participant