-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Quorum driver take server requested retry interval into consideration #17520
Quorum driver take server requested retry interval into consideration #17520
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
c4e7de1
to
19df793
Compare
19df793
to
30bae9d
Compare
30bae9d
to
24fbd0a
Compare
24fbd0a
to
362aa13
Compare
@@ -1119,7 +1128,8 @@ where | |||
// | |||
// TODO: currently retryable overload and above overload error look redundant. We want to have a unified | |||
// code path to handle both overload scenarios. | |||
state.retryable_overloaded_stake += weight; | |||
state.retryable_overload_info.stake += weight; | |||
state.retryable_overload_info.requested_retry_after = state.retryable_overload_info.requested_retry_after.max(Duration::from_secs(err.retry_after_secs())); |
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.
just thinking out loud, should we use 67 percentile of all suggested values instead of the highest one? cuz it could be MAX by a byzantine validator.
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.
Very good point! For a second, I was thinking the malicious can go both ways: by sending a duration that is too big or too small. But I guess the too big case is more damaging since we already perform exponential backoff in the client.
I changed the code to make the retry_after corresponding to a good quorum threshold of validators with the smallest retry after duration.
9871adc
to
182f901
Compare
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.
Looks good!
…eshold of validators
182f901
to
03d600e
Compare
@halfprice is attempting to deploy a commit to the Mysten Labs Team on Vercel. A member of the Team first needs to authorize it. |
Description
ValidatorOverloadedRetryAfter error contains a server suggested retry after duration. So when the quorum driver retries under SystemOverloadRetryAfter error, it should take the suggested retry duration into consideration.
Test plan
Unit tests added.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.