-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[qs] Make ProofOfStore and SignedBatchInfo generic over BatchInfo #18062
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
673d69d to
faec2e8
Compare
a4199a9 to
75caee4
Compare
d796437 to
c01522f
Compare
0669083 to
b48e5ee
Compare
5c812a3 to
efcdf59
Compare
c01522f to
23bd230
Compare
efcdf59 to
ec38b39
Compare
| /// 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>>), |
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.
The change is backward compatible, right?
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, it will serialize to the same thing as one without the generics
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.
Awesome, TIL 😄
ec38b39 to
acd658c
Compare
23bd230 to
da7c556
Compare
da7c556 to
cd918c7
Compare
acd658c to
016ffc0
Compare
JoshLind
left a comment
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.
LGTM 😄
4c8d58d to
5a2d244
Compare
016ffc0 to
413d07e
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 makes
ProofOfStoreandSignedBatchInfogeneric over parameterT, whereTis someBatchInfotype. It changes existing usages toProofOfStore<BatchInfo>andSignedBatchInfo<BatchInfo>. A new traitTBatchInfois introduced and implemented forBatchInfo. The idea being one can use a different batch info type without duplicating code.Note
Introduces a generic
TBatchInfoand makesProofOfStore,SignedBatchInfo, and related caches/messages generic, updating all call sites toProofOfStore<BatchInfo>andSignedBatchInfo<BatchInfo>.TBatchInfotrait; implement forBatchInfo.ProofOfStore,SignedBatchInfo,ProofOfStoreMsg,SignedBatchInfoMsg, andProofCachegeneric overTBatchInfo.TDataInfoimpls accordingly.ProofOfStore<BatchInfo>andSignedBatchInfo<BatchInfo>acrosspayload,common::ProofWithData,proposal_msg,opt_proposal_msg, observer, and QS components.ProofBatches = BatchPointer<ProofOfStore<BatchInfo>>).ProofOfStore<BatchInfo>/SignedBatchInfo<BatchInfo>and updated APIs.Written by Cursor Bugbot for commit ec38b39. This will update automatically on new commits. Configure here.