pub struct NewPooledTransactionHashes72 {
pub types: Vec<u8>,
pub sizes: Vec<usize>,
pub hashes: Vec<B256>,
pub cell_mask: Option<B128>,
}Expand description
Same as NewPooledTransactionHashes68 but adds the eth/72 cell_mask field from
EIP-8070.
Fields§
§types: Vec<u8>Transaction types for new transactions that have appeared on the network.
§Note on RLP encoding and decoding
In the eth/72 spec this is defined the following way:
[types: B, [size_0: P, size_1: P, ...], [hash_0: B_32, hash_1: B_32, ...], cell_mask: B_16]
sizes: Vec<usize>Transaction sizes for new transactions that have appeared on the network.
hashes: Vec<B256>Transaction hashes for new transactions that have appeared on the network.
cell_mask: Option<B128>Cell availability mask for type 3 (blob) transactions announced by this message.
Per EIP-8070, this is a B_16
bitarray over CELLS_PER_EXT_BLOB; bit i is set when the announcer has column
i available for every type 3 transaction in the message.
On the wire this field is always encoded as a 16 byte string, zero-filled when no
type 3 transactions are announced: go-ethereum decodes the mask into a fixed
[16]byte and rejects the RLP nil encoding the EIP text describes, so the
always-present form is the de facto network format. None is equivalent to a zero
mask; decoding additionally accepts the spec’s nil encoding for compatibility.
Implementations§
Source§impl NewPooledTransactionHashes72
impl NewPooledTransactionHashes72
Sourcepub const ALL_CELLS_MASK: B128
pub const ALL_CELLS_MASK: B128
Cell mask advertising availability of every cell.
Used when announcing blob transactions whose full sidecar is available locally, since every cell can be computed from the complete blob data.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Returns a new instance with capacity for capacity entries and no cell mask.
Sourcepub fn metadata_iter(&self) -> impl Iterator<Item = (&B256, (u8, usize))>
pub fn metadata_iter(&self) -> impl Iterator<Item = (&B256, (u8, usize))>
Returns an iterator over tx hashes zipped with corresponding metadata.
Sourcepub fn extend<'a, T: SignedTransaction>(
&mut self,
txs: impl IntoIterator<Item = &'a T>,
)
pub fn extend<'a, T: SignedTransaction>( &mut self, txs: impl IntoIterator<Item = &'a T>, )
Appends the provided transactions
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the message vectors as much as possible.
Sourcepub fn with_transaction<T: SignedTransaction>(self, tx: &T) -> Self
pub fn with_transaction<T: SignedTransaction>(self, tx: &T) -> Self
Consumes and appends a transaction
Sourcepub fn with_transactions<'a, T: SignedTransaction>(
self,
txs: impl IntoIterator<Item = &'a T>,
) -> Self
pub fn with_transactions<'a, T: SignedTransaction>( self, txs: impl IntoIterator<Item = &'a T>, ) -> Self
Consumes and appends the provided transactions
Trait Implementations§
Source§impl Arbitrary for NewPooledTransactionHashes72
Available on crate feature arbitrary only.
impl Arbitrary for NewPooledTransactionHashes72
arbitrary only.Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<NewPooledTransactionHashes72>
type Strategy = BoxedStrategy<NewPooledTransactionHashes72>
Strategy used to generate values of type Self.Source§fn arbitrary_with(_args: ()) -> Self::Strategy
fn arbitrary_with(_args: ()) -> Self::Strategy
Source§impl Clone for NewPooledTransactionHashes72
impl Clone for NewPooledTransactionHashes72
Source§impl Debug for NewPooledTransactionHashes72
impl Debug for NewPooledTransactionHashes72
Source§impl Decodable for NewPooledTransactionHashes72
impl Decodable for NewPooledTransactionHashes72
Source§impl<'de> Deserialize<'de> for NewPooledTransactionHashes72
Available on crate feature serde only.
impl<'de> Deserialize<'de> for NewPooledTransactionHashes72
serde only.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 Encodable for NewPooledTransactionHashes72
impl Encodable for NewPooledTransactionHashes72
impl Eq for NewPooledTransactionHashes72
Source§impl From<NewPooledTransactionHashes72> for NewPooledTransactionHashes
impl From<NewPooledTransactionHashes72> for NewPooledTransactionHashes
Source§fn from(hashes: NewPooledTransactionHashes72) -> Self
fn from(hashes: NewPooledTransactionHashes72) -> Self
Source§impl Serialize for NewPooledTransactionHashes72
Available on crate feature serde only.
impl Serialize for NewPooledTransactionHashes72
serde only.impl StructuralPartialEq for NewPooledTransactionHashes72
Auto Trait Implementations§
impl Freeze for NewPooledTransactionHashes72
impl RefUnwindSafe for NewPooledTransactionHashes72
impl Send for NewPooledTransactionHashes72
impl Sync for NewPooledTransactionHashes72
impl Unpin for NewPooledTransactionHashes72
impl UnsafeUnpin for NewPooledTransactionHashes72
impl UnwindSafe for NewPooledTransactionHashes72
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreimpl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 96 bytes