pub struct BlobTransactionSidecarEip7594 {
pub blobs: Vec<Blob>,
pub commitments: Vec<Bytes48>,
pub cell_proofs: Vec<Bytes48>,
}
Expand description
This represents a set of blobs, and its corresponding commitments and cell proofs.
This type encodes and decodes the fields without an rlp header.
Fields§
§blobs: Vec<Blob>
The blob data.
commitments: Vec<Bytes48>
The blob commitments.
cell_proofs: Vec<Bytes48>
List of cell proofs for all blobs in the sidecar, including the proofs for the extension
indices, for a total of CELLS_PER_EXT_BLOB
proofs per blob (CELLS_PER_EXT_BLOB
is the
number of cells for an extended blob, defined in
the consensus specs)
Implementations§
Source§impl BlobTransactionSidecarEip7594
impl BlobTransactionSidecarEip7594
Sourcepub const fn new(
blobs: Vec<Blob>,
commitments: Vec<Bytes48>,
cell_proofs: Vec<Bytes48>,
) -> Self
pub const fn new( blobs: Vec<Blob>, commitments: Vec<Bytes48>, cell_proofs: Vec<Bytes48>, ) -> Self
Constructs a new BlobTransactionSidecarEip7594 from a set of blobs, commitments, and cell proofs.
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Calculates a size heuristic for the in-memory size of the BlobTransactionSidecarEip7594.
Sourcepub fn versioned_hashes(&self) -> impl Iterator<Item = B256> + '_
pub fn versioned_hashes(&self) -> impl Iterator<Item = B256> + '_
Returns an iterator over the versioned hashes of the commitments.
Sourcepub fn match_versioned_hashes<'a>(
&'a self,
versioned_hashes: &'a [B256],
) -> impl Iterator<Item = (usize, BlobAndProofV2)> + 'a
pub fn match_versioned_hashes<'a>( &'a self, versioned_hashes: &'a [B256], ) -> impl Iterator<Item = (usize, BlobAndProofV2)> + 'a
Matches versioned hashes and returns an iterator of (index, BlobAndProofV2
) pairs
where index is the position in versioned_hashes
that matched the versioned hash in the
sidecar.
This is used for the engine_getBlobsV2
RPC endpoint of the engine API
Sourcepub fn rlp_encoded_length(&self) -> usize
pub fn rlp_encoded_length(&self) -> usize
Calculates the length of the BlobTransactionSidecarEip7594 when encoded as RLP.
Sourcepub fn rlp_encode(&self, out: &mut dyn BufMut)
pub fn rlp_encode(&self, out: &mut dyn BufMut)
Encodes the BlobTransactionSidecarEip7594 as RLP bytes.
Sourcepub fn rlp_decode(buf: &mut &[u8]) -> Result<Self>
pub fn rlp_decode(buf: &mut &[u8]) -> Result<Self>
Decodes the BlobTransactionSidecarEip7594 from RLP bytes.
Trait Implementations§
Source§impl Clone for BlobTransactionSidecarEip7594
impl Clone for BlobTransactionSidecarEip7594
Source§fn clone(&self) -> BlobTransactionSidecarEip7594
fn clone(&self) -> BlobTransactionSidecarEip7594
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for BlobTransactionSidecarEip7594
impl Default for BlobTransactionSidecarEip7594
Source§fn default() -> BlobTransactionSidecarEip7594
fn default() -> BlobTransactionSidecarEip7594
Source§impl<'de> Deserialize<'de> for BlobTransactionSidecarEip7594
impl<'de> Deserialize<'de> for BlobTransactionSidecarEip7594
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encodable7594 for BlobTransactionSidecarEip7594
impl Encodable7594 for BlobTransactionSidecarEip7594
Source§fn encode_7594_len(&self) -> usize
fn encode_7594_len(&self) -> usize
Source§fn encode_7594(&self, out: &mut dyn BufMut)
fn encode_7594(&self, out: &mut dyn BufMut)
Source§impl From<BlobTransactionSidecarEip7594> for BlobTransactionSidecarVariant
impl From<BlobTransactionSidecarEip7594> for BlobTransactionSidecarVariant
Source§fn from(value: BlobTransactionSidecarEip7594) -> Self
fn from(value: BlobTransactionSidecarEip7594) -> Self
Source§impl Hash for BlobTransactionSidecarEip7594
impl Hash for BlobTransactionSidecarEip7594
Source§impl PartialEq for BlobTransactionSidecarEip7594
impl PartialEq for BlobTransactionSidecarEip7594
Source§fn eq(&self, other: &BlobTransactionSidecarEip7594) -> bool
fn eq(&self, other: &BlobTransactionSidecarEip7594) -> bool
self
and other
values to be equal, and is used by ==
.impl Eq for BlobTransactionSidecarEip7594
impl StructuralPartialEq for BlobTransactionSidecarEip7594
Auto Trait Implementations§
impl Freeze for BlobTransactionSidecarEip7594
impl RefUnwindSafe for BlobTransactionSidecarEip7594
impl Send for BlobTransactionSidecarEip7594
impl Sync for BlobTransactionSidecarEip7594
impl Unpin for BlobTransactionSidecarEip7594
impl UnwindSafe for BlobTransactionSidecarEip7594
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more