-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[qs] support pulling OptQuorumStorePayload::V2 #18453
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8066269 to
f9f72c8
Compare
7074c0d to
5c74112
Compare
f9f72c8 to
8f474b1
Compare
5c74112 to
def3a58
Compare
| Some(OptQSPayloadPullParams { | ||
| exclude_authors, | ||
| minimum_batch_age_usecs: self.minimum_batch_age_usecs, | ||
| use_batch_v2: false, |
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.
TX config flag enable_opt_qs_v2_tx is not wired up
Medium Severity
The enable_opt_qs_v2_tx configuration flag is added to control sending V2 payloads, but use_batch_v2 is hardcoded to false in OptQSPullParamsProvider::get_params(). The OptQSPullParamsProvider struct doesn't receive or store the enable_opt_qs_v2_tx config, so V2 payloads will never be created regardless of the config setting. The ProofManager checks params.use_batch_v2 to decide payload format, but this will always be false.
Additional Locations (1)
| pub enable_payload_v2: bool, | ||
| pub enable_batch_v2: bool, | ||
| pub enable_opt_qs_v2_tx: bool, | ||
| pub enable_opt_qs_v2_rx: bool, |
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.
What are the differences between these flags and enable_payload_v2 / enable_batch_v2? What is the plan for roll out for the QS components?
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.
There are a quite a bit of flags here to avoid bug bounty issues, because we are seeing bounties for validator networks these days. The plan is to enable enable_payload_v2, enable_opt_qs_v2_rx, enable_opt_qs_v2_tx, enable_batch_v2 in that order.
| Some(OptQSPayloadPullParams { | ||
| exclude_authors, | ||
| minimum_batch_age_usecs: self.minimum_batch_age_usecs, | ||
| use_batch_v2: false, |
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.
Is this going to be set by config later?
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.
yes.
| counters::NUM_INLINE_BATCHES.observe(inline_block.len() as f64); | ||
| counters::NUM_INLINE_TXNS.observe(inline_block_size.count() as f64); | ||
|
|
||
| // TODO(ibalajiarun): Avoid clones |
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.
nit: clones are still there
def3a58 to
34ae15f
Compare
8f474b1 to
4a7cef3
Compare
b4b2113 to
c35aa2d
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.
c35aa2d to
4460b7a
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
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 adds support for OptQuorumStorePayload V2 by introducing configuration flags to control its transmission and reception. The changes include:
Added two new configuration flags to
QuorumStoreConfig:enable_opt_qs_v2_tx: Controls whether to send V2 payloadsenable_opt_qs_v2_rx: Controls whether to accept V2 payloadsModified the payload verification logic to check the
opt_qs_v2_rx_enabledflag before accepting V2 payloads, replacing the previous hard-coded rejection.Updated the
ProofManagerto create V2 payloads when requested by adding ause_batch_v2flag toOptQSPayloadPullParams.Enhanced the payload creation process to preserve
BatchInfoExtfor V2 payloads while converting toBatchInfofor V1 payloads.Propagated the new configuration flags through the verification chain in consensus components.
These changes enable a gradual rollout of the V2 payload format with separate controls for sending and receiving.