Skip to content
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

Cleanup TODO: not optimizing blob storage #4128

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

ethDreamer
Copy link
Member

For each block in the database, we're storing a Vec<BlobSidecar<T>>:

pub struct BlobSidecar<T: EthSpec> {
    pub block_root: Hash256,
    // TODO: fix the type, should fit in u8 as well
    #[serde(with = "eth2_serde_utils::quoted_u64")]
    pub index: u64,
    pub slot: Slot,
    pub block_parent_root: Hash256,
    #[serde(with = "eth2_serde_utils::quoted_u64")]
    pub proposer_index: u64,
    #[serde(with = "ssz_types::serde_utils::hex_fixed_vec")]
    pub blob: Blob<T>,
    pub kzg_commitment: KzgCommitment,
    pub kzg_proof: KzgProof,
}

I originally thought we could optimize space by de-duplicating the block_root, slot, parent_root, & proposer_index fields when storing this in the database since all of these fields are the same for blobs of the same block. But after calculating it out, assuming we use max blobs per block and no skipped slots, the most we could save over the entire retention period is 32 MB.. not worth the added complexity and computational time.

Copy link

@ZRDK ZRDK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@realbigsean realbigsean merged commit d84117c into sigp:deneb-free-blobs Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants