-
Notifications
You must be signed in to change notification settings - Fork 212
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
[Merged by Bors] - Retry registration timeout fix #6136
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.
I don't quite understand what the purpose of "Default Timeout" is, when it is only used for a single type of request and for others individual timeouts have to be specified.
The changes seem to also have broken other tests that now hang when executed. |
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.
Removing the timeout is not enough. It will now retry to submit MaxRequestRetries
times (handled by the go-retryablehttp library), but no more. We need to manually retry submitting till the end of the cycle gap (probably the best place to do this is in the PoetService::Submit()
method.
Please, also add a test checking that it retries submitting up until the cycle gap.
I agree that this might need to be changed but I don't agree with thee suggested approach of retrying the failed The Wdyt? |
Retrying via the mechanism built in the |
Maybe, I didn't check the full documentation but even if not, an http client isn't very expensive to keep around - from the users perspective its still the PoetClient with a Submit and Proof method, but internally it uses 2 http clients; I don't see an issue with this 🙂 |
# Conflicts: # CHANGELOG.md
# Conflicts: # activation/activation.go # config/mainnet.go # config/presets/testnet.go
I think we are using wrong backoff functions. For the For submit we also want some jitter to not have all nodes query a poet at exactly the same time, but we do not want to increase the time between requests by too much. I believe a backoff function like this can be used: // customJitterBackoff always waits between `min` and `max` before retrying
func customJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
if max <= min {
return min
}
return min + rand.N(max-min)
} |
bors merge |
## Motivation Fix an issue #6035 Co-authored-by: ConvallariaMaj <[email protected]>
Pull request successfully merged into develop. Build succeeded: |
Motivation
Fix an issue #6035
Description
Closes
#6035 `Fix first half of issue: established separate parameter for submit challenge timeout. If timeout is not set, submitting challenge will continue till poet round starts.
Added tests and comments to config parameters.
Second half of issue is fixed within #6116
Test Plan
Tested with unit tests
TODO