Skip to content

Commit

Permalink
[optqs][co] Implement optQS payload validation in CO (#15188)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalajiarun authored Nov 6, 2024
1 parent 7eba334 commit 8b472e7
Show file tree
Hide file tree
Showing 2 changed files with 289 additions and 30 deletions.
12 changes: 8 additions & 4 deletions consensus/consensus-types/src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ use std::{
sync::Arc,
};

pub type OptBatches = BatchPointer<BatchInfo>;

pub type ProofBatches = BatchPointer<ProofOfStore>;

pub trait TDataInfo {
fn num_txns(&self) -> u64;

Expand Down Expand Up @@ -254,8 +258,8 @@ impl DerefMut for InlineBatches {
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct OptQuorumStorePayloadV1 {
inline_batches: InlineBatches,
opt_batches: BatchPointer<BatchInfo>,
proofs: BatchPointer<ProofOfStore>,
opt_batches: OptBatches,
proofs: ProofBatches,
execution_limits: PayloadExecutionLimit,
}

Expand Down Expand Up @@ -292,8 +296,8 @@ pub enum OptQuorumStorePayload {
impl OptQuorumStorePayload {
pub fn new(
inline_batches: InlineBatches,
opt_batches: BatchPointer<BatchInfo>,
proofs: BatchPointer<ProofOfStore>,
opt_batches: OptBatches,
proofs: ProofBatches,
execution_limits: PayloadExecutionLimit,
) -> Self {
Self::V1(OptQuorumStorePayloadV1 {
Expand Down
Loading

0 comments on commit 8b472e7

Please sign in to comment.