Skip to content

Conversation

@ibalajiarun
Copy link
Contributor

@ibalajiarun ibalajiarun commented Nov 7, 2025

Description

This PR makes ProofOfStore and SignedBatchInfo generic over parameter T, where T is some BatchInfo type. It changes existing usages to ProofOfStore<BatchInfo> and SignedBatchInfo<BatchInfo>. A new trait TBatchInfo is introduced and implemented for BatchInfo. The idea being one can use a different batch info type without duplicating code.


Note

Introduces a generic TBatchInfo and makes ProofOfStore, SignedBatchInfo, and related caches/messages generic, updating all call sites to ProofOfStore<BatchInfo> and SignedBatchInfo<BatchInfo>.

  • Types/Traits:
    • Add TBatchInfo trait; implement for BatchInfo.
    • Make ProofOfStore, SignedBatchInfo, ProofOfStoreMsg, SignedBatchInfoMsg, and ProofCache generic over TBatchInfo.
    • Update TDataInfo impls accordingly.
  • API Changes (type updates):
    • Replace usages with ProofOfStore<BatchInfo> and SignedBatchInfo<BatchInfo> across payload, common::ProofWithData, proposal_msg, opt_proposal_msg, observer, and QS components.
    • Update aliases (e.g., ProofBatches = BatchPointer<ProofOfStore<BatchInfo>>).
    • Adjust method signatures/fields (e.g., verification fns, caches, queues) to use generic types.
  • Quorum Store & Networking:
    • Adapt network message enums, senders, and handlers to generic proof/signed info types.
    • Update QS internals (batch store/proof queue/manager/coordinator/builders) to the new generics.
  • Tests:
    • Migrate tests and mocks to ProofOfStore<BatchInfo>/SignedBatchInfo<BatchInfo> and updated APIs.

Written by Cursor Bugbot for commit ec38b39. This will update automatically on new commits. Configure here.

@ibalajiarun ibalajiarun changed the base branch from main to graphite-base/18062 November 7, 2025 20:35
@ibalajiarun ibalajiarun changed the base branch from graphite-base/18062 to balaji/enc-pool-1 November 7, 2025 20:35
@ibalajiarun ibalajiarun force-pushed the balaji/enc-pool-1 branch 12 times, most recently from d796437 to c01522f Compare November 11, 2025 19:35
@ibalajiarun ibalajiarun force-pushed the balaji/enc-pool-2 branch 2 times, most recently from 0669083 to b48e5ee Compare November 11, 2025 20:26
@ibalajiarun ibalajiarun force-pushed the balaji/enc-pool-2 branch 2 times, most recently from 5c812a3 to efcdf59 Compare November 11, 2025 20:49
@ibalajiarun ibalajiarun changed the title [QuorumStore] Introduce BatchExtInfo to support Encrypted Transactions [qs] Make ProofOfStore and SignedBatchInfo generic over BatchInfo Nov 11, 2025
@ibalajiarun ibalajiarun requested a review from JoshLind November 11, 2025 21:09
/// Quorum Store: Send a signed batch digest. This is a vote for the batch and a promise that
/// the batch of transactions was received and will be persisted until batch expiration.
SignedBatchInfo(Box<SignedBatchInfoMsg>),
SignedBatchInfo(Box<SignedBatchInfoMsg<BatchInfo>>),
Copy link
Contributor

Choose a reason for hiding this comment

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

The change is backward compatible, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it will serialize to the same thing as one without the generics

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, TIL 😄

@ibalajiarun ibalajiarun changed the base branch from balaji/enc-pool-1 to graphite-base/18062 November 13, 2025 01:20
@ibalajiarun ibalajiarun changed the base branch from graphite-base/18062 to balaji/enc-pool-1 November 13, 2025 01:26
Copy link
Contributor

@JoshLind JoshLind left a comment

Choose a reason for hiding this comment

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

LGTM 😄

@ibalajiarun ibalajiarun force-pushed the balaji/enc-pool-1 branch 2 times, most recently from 4c8d58d to 5a2d244 Compare November 15, 2025 19:39
Base automatically changed from balaji/enc-pool-1 to main November 15, 2025 20:30
@ibalajiarun ibalajiarun enabled auto-merge (squash) November 16, 2025 04:52
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite compat success on 7685f835f97083580c626fd78a05f91f177302c1 ==> 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7

Compatibility test results for 7685f835f97083580c626fd78a05f91f177302c1 ==> 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7 (PR)
1. Check liveness of validators at old version: 7685f835f97083580c626fd78a05f91f177302c1
compatibility::simple-validator-upgrade::liveness-check : committed: 13012.37 txn/s, latency: 2636.41 ms, (p50: 2700 ms, p70: 3000, p90: 3300 ms, p99: 3600 ms), latency samples: 429140
2. Upgrading first Validator to new version: 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 5038.97 txn/s, latency: 6810.07 ms, (p50: 7500 ms, p70: 7600, p90: 7700 ms, p99: 7800 ms), latency samples: 178180
3. Upgrading rest of first batch to new version: 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 4966.67 txn/s, latency: 6879.91 ms, (p50: 7700 ms, p70: 7800, p90: 7800 ms, p99: 7900 ms), latency samples: 176820
4. upgrading second batch to new version: 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 8046.91 txn/s, latency: 4228.11 ms, (p50: 4600 ms, p70: 4600, p90: 4800 ms, p99: 5000 ms), latency samples: 267640
5. check swarm health
Compatibility test for 7685f835f97083580c626fd78a05f91f177302c1 ==> 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7 passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7

two traffics test: inner traffic : committed: 13454.01 txn/s, latency: 2799.54 ms, (p50: 2700 ms, p70: 2900, p90: 3000 ms, p99: 3600 ms), latency samples: 5011520
two traffics test : committed: 100.02 txn/s, latency: 839.44 ms, (p50: 800 ms, p70: 800, p90: 900 ms, p99: 2400 ms), latency samples: 1780
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.262, avg: 2.099", "ConsensusProposalToOrdered: max: 0.169, avg: 0.166", "ConsensusOrderedToCommit: max: 0.084, avg: 0.070", "ConsensusProposalToCommit: max: 0.250, avg: 0.236"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.42s no progress at version 699 (avg 0.07s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.26s no progress at version 2431995 (avg 0.26s) [limit 16].
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on 7685f835f97083580c626fd78a05f91f177302c1 ==> 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7

Compatibility test results for 7685f835f97083580c626fd78a05f91f177302c1 ==> 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7 (PR)
Upgrade the nodes to version: 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 2114.88 txn/s, submitted: 2123.14 txn/s, failed submission: 8.27 txn/s, expired: 8.27 txn/s, latency: 1385.76 ms, (p50: 1400 ms, p70: 1500, p90: 1800 ms, p99: 2600 ms), latency samples: 189280
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 2124.44 txn/s, submitted: 2134.21 txn/s, failed submission: 9.76 txn/s, expired: 9.76 txn/s, latency: 1362.42 ms, (p50: 1200 ms, p70: 1500, p90: 1800 ms, p99: 2400 ms), latency samples: 191500
5. check swarm health
Compatibility test for 7685f835f97083580c626fd78a05f91f177302c1 ==> 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7 passed
Upgrade the remaining nodes to version: 413d07ed7b714ddac1dbe5d1b82fbe46dd4067a7
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 2151.15 txn/s, submitted: 2161.94 txn/s, failed submission: 10.79 txn/s, expired: 10.79 txn/s, latency: 1335.65 ms, (p50: 1200 ms, p70: 1500, p90: 1700 ms, p99: 2500 ms), latency samples: 195421
Test Ok

@ibalajiarun ibalajiarun merged commit 0747e09 into main Nov 16, 2025
89 checks passed
@ibalajiarun ibalajiarun deleted the balaji/enc-pool-2 branch November 16, 2025 05:35
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.

4 participants