Skip to content

Commit 28a1189

Browse files
committed
feat(types): add Fulu cell dissemination SSZ types
Add PartialDataColumnSidecar, PartialDataColumnPartsMetadata, and PartialDataColumnHeader types from consensus-specs #4558. These types support cell-level dissemination via Gossipsub partial messages, allowing individual cells to be sent instead of full data columns for more efficient data availability sampling. 🤖 Generated with AI assistance
1 parent 1060251 commit 28a1189

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/consensus_types/fulu.zig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,26 @@ pub const MatrixEntry = ssz.FixedContainerType(struct {
102102
row_index: RowIndex,
103103
});
104104

105+
// Cell Dissemination types (consensus-specs #4558)
106+
pub const PartialDataColumnSidecar = ssz.VariableContainerType(struct {
107+
cells_present_bitmap: ssz.BitListType(preset.MAX_BLOB_COMMITMENTS_PER_BLOCK),
108+
partial_column: ssz.FixedListType(Cell, preset.MAX_BLOB_COMMITMENTS_PER_BLOCK),
109+
kzg_proofs: ssz.FixedListType(p.KZGProof, preset.MAX_BLOB_COMMITMENTS_PER_BLOCK),
110+
// Optional header, only sent on eager pushes
111+
header: ssz.VariableListType(PartialDataColumnHeader, 1),
112+
});
113+
114+
pub const PartialDataColumnPartsMetadata = ssz.VariableContainerType(struct {
115+
available: ssz.BitListType(preset.MAX_BLOB_COMMITMENTS_PER_BLOCK),
116+
requests: ssz.BitListType(preset.MAX_BLOB_COMMITMENTS_PER_BLOCK),
117+
});
118+
119+
pub const PartialDataColumnHeader = ssz.VariableContainerType(struct {
120+
kzg_commitments: ssz.FixedListType(p.KZGCommitment, preset.MAX_BLOB_COMMITMENTS_PER_BLOCK),
121+
signed_block_header: SignedBeaconBlockHeader,
122+
kzg_commitments_inclusion_proof: ssz.FixedVectorType(p.Bytes32, preset.KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH),
123+
});
124+
105125
// Light client types
106126
pub const LightClientHeader = electra.LightClientHeader;
107127
pub const LightClientBootstrap = electra.LightClientBootstrap;

0 commit comments

Comments
 (0)