Skip to content

[consensus] Use OptQuorumStore payload exclusively in proof_manager#18653

Open
ibalajiarun wants to merge 1 commit intomainfrom
ibalajiarun/optqs-payload-only
Open

[consensus] Use OptQuorumStore payload exclusively in proof_manager#18653
ibalajiarun wants to merge 1 commit intomainfrom
ibalajiarun/optqs-payload-only

Conversation

@ibalajiarun
Copy link
Contributor

Summary

This change consolidates payload generation in proof_manager.rs to only produce Payload::OptQuorumStore variants, removing generation of legacy payload types.

  • Payload::empty() now returns OptQuorumStore V1 when quorum store is enabled
  • Removed enable_payload_v2 field from ProofManager (no longer needed)
  • Fallback path in handle_proposal_request() uses OptQuorumStore V1
  • Cleaned up unused allow_batches_without_pos_in_proposal fields from ProposalGenerator, DagDriver, OrderedNotifierAdapter, and DagBootstrapper

Test plan

  • ./scripts/rust_lint.sh passes
  • CI tests pass

🤖 Generated with Claude Code

This change consolidates payload generation in proof_manager.rs to only
produce Payload::OptQuorumStore variants, removing generation of legacy
payload types (QuorumStoreInlineHybrid, QuorumStoreInlineHybridV2, and
InQuorumStore from empty()).

Key changes:
- Payload::empty() now returns OptQuorumStore V1 when quorum store is enabled
- Removed enable_payload_v2 field from ProofManager (no longer needed)
- Fallback path in handle_proposal_request() uses OptQuorumStore V1
- Cleaned up unused allow_batches_without_pos_in_proposal fields from
  ProposalGenerator, DagDriver, OrderedNotifierAdapter, and DagBootstrapper

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link

@cursor cursor bot left a 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.

let author = *anchor.author();
let mut validator_txns = vec![];
let mut payload = Payload::empty(
!anchor.payload().is_direct(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Payload extend panics with mixed OptQuorumStore and legacy types

High Severity

The Payload::empty() function now returns OptQuorumStore when quorum store is enabled, but Payload::extend() explicitly panics with unimplemented!() when combining OptQuorumStore with QuorumStoreInlineHybrid or QuorumStoreInlineHybridV2. In OrderedNotifierAdapter::send_ordered_nodes(), an empty OptQuorumStore payload is created and then extended with node payloads. During upgrades or mixed-version scenarios, nodes with legacy payload types would cause a runtime panic.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant