fix(websocket): refuse newHeads when no live ingress#7
Closed
snowkide wants to merge 1 commit into
Closed
Conversation
Restore only the fail-closed gate dropped in the post-merge slim: ErrNoLiveSubscriptionSource + IngressHealth/HealthReporter + a short bootstrap wait. Head-less pods return retryable 503 instead of zombie subscription IDs. Align ClientStaysConnectedOnUpstreamDrop with self-heal (1001 GoingAway remains shutdown-only). Skip LastHead metric and healthcheck subscriptions surface. Co-authored-by: Cursor <cursoragent@cursor.com>
xray — see through AI slop with deterministic architecture PR diff reviews |
3 tasks
Author
|
Closing: wrong layer for our deployment model. Chainlink nodes intentionally have a single primary pointing at eRPC. eRPC owns upstream failover/self-heal; MultiNode must not be used as the recovery mechanism (refuse → Unreachable → Required behaviour: eRPC keeps the client WS alive, fails over/re-subscribes upstreams internally, resumes |
Author
|
Closed: eRPC must absorb upstream failure; Chainlink stays single-RPC to eRPC. |
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.
Summary
newHeadsgate dropped in slim1886390: refuse with retryableErrNoLiveSubscriptionSource(HTTP 503) when no ingress reportsHealthy(), after a short bootstrap wait viaIngressHealth/HealthReporter.ClientStaysConnectedOnUpstreamDropwith self-heal (client WS stays up on upstream drop;1001 GoingAwayremains shutdown-only).networks[].subscriptions, andSubscriptionHealthAPI — those are observability, not required for MultiNode failover.Context
Chainlink MultiNode + eRPC WS: head-less pods still returned subscription IDs that never delivered heads. Core self-heal (ping/pong + resubscribe) remains; this only makes dead pods fail closed again.
Supersedes the approach in #6 (same bug, smaller surface). Related: #1.
Test plan
go test ./indexer/ -count=1 -timeout 60s -run 'IngressHealth'go test ./erpc/ -count=1 -timeout 180s -run 'WaitForLive|SubscriptionRecovery|UpstreamDiesUngracefully|GracefulShutdown'ErrNoLiveSubscriptionSourceoneth_subscribenewHeads; upstream blip does not emit client1001Made with Cursor