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

[Feature] Add iterator to BlobTransactionSidecar #1255

Closed
mattsse opened this issue Sep 7, 2024 · 0 comments · Fixed by #1334
Closed

[Feature] Add iterator to BlobTransactionSidecar #1255

mattsse opened this issue Sep 7, 2024 · 0 comments · Fixed by #1334
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mattsse
Copy link
Member

mattsse commented Sep 7, 2024

Component

consensus, eips, genesis

Describe the feature you would like

this type is a container type

pub struct BlobTransactionSidecar {
/// The blob data.
#[cfg_attr(
all(debug_assertions, feature = "serde"),
serde(deserialize_with = "deserialize_blobs")
)]
pub blobs: Vec<Blob>,
/// The blob commitments.
pub commitments: Vec<Bytes48>,
/// The blob proofs.
pub proofs: Vec<Bytes48>,
}

all arrays are supposed to have the same length.

an iterator type would be helpful here that yields

struct BlobTransactionSidecarItem {
  index, blob, kzg_commitment, kzg_proof
}

which is basically a subset of

pub struct BlobData {
/// Blob index
#[serde_as(as = "DisplayFromStr")]
pub index: u64,
#[serde(deserialize_with = "deserialize_blob")]
/// Blob data
pub blob: Box<Blob>,
/// The blob's commitment
pub kzg_commitment: Bytes48,
/// The blob's proof
pub kzg_proof: Bytes48,

TODO

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
1 participant