-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[consensus] fallback heuristics for optimistic quorum store #14346
Conversation
⏱️ 1h 15m total CI duration on this PR
|
6d3d7b5
to
fbdc550
Compare
b61ab8d
to
4a68f84
Compare
92103ca
to
0c4aa6b
Compare
4a68f84
to
2a9b7de
Compare
2a9b7de
to
a40e083
Compare
a40e083
to
8f8a0ee
Compare
d5211e9
to
6112540
Compare
a0c6e4c
to
cb52952
Compare
cb52952
to
87c18e4
Compare
87c18e4
to
2b6294b
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.
This file is mostly extracted from payload_client/mod.rs
with the addition of OptQSPayloadPullParams
40e5032
to
4a2f31a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
) | ||
.await??; | ||
pub async fn wait_for_payload(&self, block: &Block, deadline: Duration) -> anyhow::Result<()> { | ||
let deadline = deadline.saturating_sub(self.time_service.get_current_timestamp()); |
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.
this probably should be called duration instead of deadline
verifier.get_voting_power(&author).unwrap_or_default() as u128; | ||
} | ||
// The aggregated timeout reason is the reason with the most voting power received from | ||
// at least f+1 peers by voting power. If such voting power does not exist, then the |
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 am just concerned that slow nodes are not marked malicious under the f+1 requirement. But we can leave it for now and see how it performs.
ff18407
to
cbe05b0
Compare
cbe05b0
to
9835591
Compare
9835591
to
ba1dc89
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ba1dc89
to
04a1dc8
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
This PR implements the fallback heuristics for Optimistic Quorum Store along with some refactoring.
RoundTimeoutReason
enum variants to classify proposal failures, payload unavailability, and QC failures.RoundTimeoutReason
. The aggregated timeout reason is the reason with the most voting power received from at leastRoundTimeoutReason::Unknown
.ProposalStatusTracker
which outputsOptQSPayloadPullParams { opt_batch_txns_pct, exclude_author, minimum_batch_age_usecs }
based on the proposal outcome window.opt_batch_txns_pct
is either 0 or 50. 0 means no optimistic batches, and 50 means up to 50% of optimistic batches.minimum_batch_age_usecs
sets the minimum age of the batch to be pulled into OptQS payload.exclude_author
sets the authors whose batches will be excluded into OptQS payload.Proposal Status Tracker
ProposalStatusTracker
will maintain a list of last proposal statuses (same asNewRoundReason
). A exponential window based algorithm to decide whether to go optimistic or not.Initialize the window at 2.
opt_batch_txns_pct
to 0.opt_batch_txns_pct
to 50.exclude_author
is computed as the union of all theRoundTimeoutReason::PayloadUnavailable { missing_authors }
within the window.