-
Notifications
You must be signed in to change notification settings - Fork 176
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
Client grace period is configurable. #2837
base: main
Are you sure you want to change the base?
Conversation
b333caf
to
c12fbb0
Compare
I'm torn on making a struct GracePeriod(f64);
impl Default for GracePeriod {
fn default() -> Self {
Self(0.1)
}
}
// etc... |
c12fbb0
to
9b0c33f
Compare
@@ -161,7 +159,7 @@ where | |||
&& (highest_key_score >= committee.quorum_threshold() | |||
|| highest_key_score + remaining_votes < committee.quorum_threshold()) | |||
{ | |||
end_time = Some(Instant::now() + start_time.elapsed().mul_f64(GRACE_PERIOD)); | |||
end_time = Some(Instant::now() + start_time.elapsed().mul_f64(grace_period)); |
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 could do this only in the first case (i.e. if we did reach a quorum).
FYI I created #2836 for this.
@@ -135,6 +135,9 @@ A Byzantine-fault tolerant sidechain with low-latency finality and high throughp | |||
Don't include any messages in blocks, and don't make any decision whether to accept or reject | |||
|
|||
* `--restrict-chain-ids-to <RESTRICT_CHAIN_IDS_TO>` — A set of chains to restrict incoming messages from. By default, messages from all chains are accepted. To reject messages from all chains, specify an empty string | |||
* `--grace-period <GRACE_PERIOD>` — The amount of time we wait for additional validators to contribute to the result, as a fraction of how long it took to reach a quorum | |||
|
|||
Default value: `0.1` |
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.
Please let's keep the current value 0.2
.
Motivation
The grace period, which is the amount of time we wait for validators to respond after achieving a quorum, is hard coded to 20% which is not optimal for all client use-cases, i.e. when optimising for low latency.
Proposal
Make the grace period configurable as a client option.
Test Plan
Tested manually. 20% improvement (when set to 0) in performance in non-ideal networks, that is, networks which have one or more validators which are slower than a quorum.
Release Plan