-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixing multinode state transition logic by register polling subscription in rpc client #14534
base: develop
Are you sure you want to change the base?
fixing multinode state transition logic by register polling subscription in rpc client #14534
Conversation
.changeset/moody-rules-agree.md
Outdated
"chainlink": patch | ||
--- | ||
|
||
- register polling subscription logic in rpc client so when node unhealthy new susbcription will be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- register polling subscription logic in rpc client so when node unhealthy new susbcription will be used | |
- register polling subscription to avoid subscription leaking when rpc client gets closed. |
require.NoError(t, rpc.Dial(ctx)) | ||
|
||
ch := make(chan *evmtypes.Head) | ||
_, err := rpc.SubscribeNewHead(tests.Context(t), ch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you check that the returned subscription is closed?
@@ -6,6 +6,7 @@ import ( | |||
"errors" | |||
"fmt" | |||
"math/big" | |||
_ "net/http/pprof" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug artifact
Description
SubscribeToFinalizedHeads and SubscribeToHeads won’t abort polling subscription after Close
It could cause clients like HeadTracker to keep using subscriptions to unhealthy RPC despite MultiNode's transitioning to an unhealthy state.
DoD: polling subscription must be registered
Also added a patch for subscribeNewHead when polling is enabled.
Tickets:
BCFR-946(https://smartcontract-it.atlassian.net/browse/BCFR-946