Implement SSZ decoding for SignedBlockContents (#4744)

* Implement `SignedBlockContent` decoding and fixed bug in `SignedBlockContent::new`

* Update Cargo.lock file

* Use `make_genesis_spec` to simplify test setup.

* Fix syntax errors.
This commit is contained in:
Jimmy Chen
2023-09-20 08:18:05 +10:00
committed by GitHub
parent 5f98a7b8ad
commit 665334e936
3 changed files with 123 additions and 24 deletions

View File

@@ -197,6 +197,21 @@ pub struct BlindedBlobSidecar {
pub kzg_proof: KzgProof,
}
impl BlindedBlobSidecar {
pub fn empty() -> Self {
Self {
block_root: Hash256::zero(),
index: 0,
slot: Slot::new(0),
block_parent_root: Hash256::zero(),
proposer_index: 0,
blob_root: Hash256::zero(),
kzg_commitment: KzgCommitment::empty_for_testing(),
kzg_proof: KzgProof::empty(),
}
}
}
impl SignedRoot for BlindedBlobSidecar {}
pub type SidecarList<T, Sidecar> = VariableList<Arc<Sidecar>, <T as EthSpec>::MaxBlobsPerBlock>;