Conversation
The local newHeads source forwarded only chain head changes that carried a ws notification payload. When a polled upstream reached a height first, the ws head of the same height arrived with an unchanged chain head and was never sent. On hyperliquid (hl-node /evm polled every 200ms, reth-hl over ws) drpc-warp US-East delivered ~3 of 60 heads per minute. - The chain supervisor keeps a newHeads feed: every ws head (RawData) from an available upstream above the last announced height, whether or not it changed the chain head, at most 128 blocks behind the chain head. When an upstream reports a lower chain head (reorg), that height can be announced again; a head lowered by an upstream leaving is not re-announced. Published on SubscribeNewHeads, apart from the state stream. - The local newHeads source forwards that feed. - Metric: new_heads_skipped_total - heights subscribers never got.
l0gun0v
force-pushed
the
local-newheads-ws-race
branch
from
October 4, 2026 12:26
ac75aff to
ba1cb1f
Compare
l0gun0v
marked this pull request as ready for review
October 5, 2026 09:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The local
newHeadssource forwards ws heads at heights a polled upstream reached first. Workaround until deployed: drpcorg/private-config#1017.Spec
RawData). When a polled upstream (or a head learnt from a response) reached a height first, the ws head of that height came with an unchanged chain head and was never sent. Hyperliquid (hl-node/evmpolled every 200 ms, reth-hl over ws): drpc-warp US-East delivered ~3 of 60 heads per minute, other drpc regions 26-35.ChainSupervisor.SubscribeNewHeads); the state stream (chain status for dproxy, logs source) does not change.nodecore_new_heads_skipped_total{chain}- heights subscribers never got.Changes
internal/upstreams/new_heads_feed.gointernal/upstreams/chain_supervisor.goupdateHead,SubscribeNewHeadsinternal/upstreams/interfaces.goSubscribeNewHeadsonChainSupervisorinternal/upstreams/flow/subengine/heads.goNewHeadsCaplossinternal/upstreams/new_heads_feed_internal_test.go,chain_supervisor_test.go,flow/subengine/heads_test.gointernal/server/*_test.go,flow/sub_aggregation_internal_test.goSubscribeNewHeadsdocs/nodecore/13-subscriptions.md,08-prometheus-metrics.md