Skip to content

clients/consensus: track canonical heads from head events - #247

Open
yperbasis wants to merge 1 commit into
ethpandaops:masterfrom
yperbasis:fix/consensus-head-events
Open

yperbasis wants to merge 1 commit into
ethpandaops:masterfrom
yperbasis:fix/consensus-head-events

Conversation

@yperbasis

Copy link
Copy Markdown
Contributor

Block events report imports, including side branches. Treating them as client heads leaves Assertoor on an old fork when fork choice returns to an already imported block. In this failing Erigon run, all three Lighthouse nodes had selected the same slot-13 head before slot 14, while the fork check still compared a discarded slot-13 block with the new slot-14 head.

Track consensus heads from head events and initial/fallback polling. Keep block imports in the shared cache, and publish per-client head updates after updating the head and invalidating the fork cache. Copy the HTTP client before setting its redirect handler so concurrent event subscriptions do not mutate a shared client.

Addresses the observer bug behind erigontech/erigon#26030. Erigon still needs an Assertoor image containing this change. A live Kurtosis rerun remains outstanding because the local Docker daemon is unavailable.

@yperbasis
yperbasis marked this pull request as ready for review November 11, 2026 15:19
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