[consensus] Use OptQuorumStore payload exclusively in proof_manager#18653
[consensus] Use OptQuorumStore payload exclusively in proof_manager#18653ibalajiarun wants to merge 1 commit intomainfrom
Conversation
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]>
There was a problem hiding this comment.
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(), |
There was a problem hiding this comment.
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.


Summary
This change consolidates payload generation in
proof_manager.rsto only producePayload::OptQuorumStorevariants, removing generation of legacy payload types.Payload::empty()now returnsOptQuorumStoreV1 when quorum store is enabledenable_payload_v2field fromProofManager(no longer needed)handle_proposal_request()usesOptQuorumStoreV1allow_batches_without_pos_in_proposalfields fromProposalGenerator,DagDriver,OrderedNotifierAdapter, andDagBootstrapperTest plan
./scripts/rust_lint.shpasses🤖 Generated with Claude Code