Modify lighthouse_network gossip types to free the blobs (#4064)

* Modify blob topics

* add signedblol type

pubsun messages are signed

* improve subnet topic index

* improve display code

* fix parse code

---------

Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
This commit is contained in:
Divma
2023-03-10 05:53:36 -05:00
committed by GitHub
parent 545532a883
commit 3898cf7be8
7 changed files with 74 additions and 48 deletions

View File

@@ -101,6 +101,7 @@ pub mod sqlite;
pub mod blob_sidecar;
pub mod blobs_sidecar;
pub mod signed_blob;
pub mod signed_block_and_blobs;
pub mod transaction;
@@ -181,6 +182,7 @@ pub use crate::signed_beacon_block::{
SignedBlindedBeaconBlock,
};
pub use crate::signed_beacon_block_header::SignedBeaconBlockHeader;
pub use crate::signed_blob::*;
pub use crate::signed_block_and_blobs::SignedBeaconBlockAndBlobsSidecar;
pub use crate::signed_block_and_blobs::SignedBeaconBlockAndBlobsSidecarDecode;
pub use crate::signed_bls_to_execution_change::SignedBlsToExecutionChange;

View File

@@ -0,0 +1,24 @@
use crate::{test_utils::TestRandom, BlobSidecar, EthSpec, Signature};
use serde_derive::{Deserialize, Serialize};
use ssz_derive::{Decode, Encode};
use test_random_derive::TestRandom;
use tree_hash_derive::TreeHash;
#[derive(
Debug,
Clone,
PartialEq,
Serialize,
Deserialize,
Encode,
Decode,
TestRandom,
TreeHash,
arbitrary::Arbitrary,
)]
#[serde(bound = "T: EthSpec")]
#[arbitrary(bound = "T: EthSpec")]
pub struct SignedBlobSidecar<T: EthSpec> {
pub blob: BlobSidecar<T>,
pub signature: Signature,
}