-
Notifications
You must be signed in to change notification settings - Fork 102
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
polygon: fix wallet connected/disconnected notifications show up constantly #3163
base: master
Are you sure you want to change the base?
polygon: fix wallet connected/disconnected notifications show up constantly #3163
Conversation
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.
Thank you for looking at this norwnd. All of these values may be back from when we thought we could use local light nodes, and now when testing its mostly simnet, so the actual time it takes for providers to respond, normally, is useful info.
Maybe we should update the live tests to output the time it takes for all providers to respond with all methods.
@@ -88,7 +88,7 @@ const ( | |||
// confCheckTimeout is the amount of time allowed to check for | |||
// confirmations. Testing on testnet has shown spikes up to 2.5 | |||
// seconds. This value may need to be adjusted in the future. | |||
confCheckTimeout = 4 * time.Second |
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.
We are a little worried about trade ticks taking a long time, and this may increase those. Do the errors end in failed trades or they are just loud?
Actually the comment is probably from back when we thought we could use light nodes, so providers would be longer. 30 seconds feels excessive though. Does just a little more work? like... 6 or 8?
@@ -3700,7 +3700,7 @@ func (eth *ETHWallet) monitorBlocks(ctx context.Context) { | |||
// tipChange callback function is invoked and a goroutine is started to check | |||
// if any contracts in the findRedemptionQueue are redeemed in the new blocks. | |||
func (eth *ETHWallet) checkForNewBlocks(ctx context.Context) { | |||
ctx, cancel := context.WithTimeout(ctx, 2*time.Second) |
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.
Thirty seconds also seems excessive here... does 8 work? It's only asking for a header.
Oh the tests do show time for a set provider, just not for the free ones. Here are some times randomly for me and getting the header:
They all seem pretty low, ofc that could change based on how busy they are and distance from them... |
Been running this change for couple of weeks now, pretty sure it's stable and it fixes the issue.
Closes #3143