Trait reth_transaction_pool::TransactionPoolExt

source ·
pub trait TransactionPoolExt: TransactionPool {
    // Required methods
    fn set_block_info(&self, info: BlockInfo);
    fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>);
    fn update_accounts(&self, accounts: Vec<ChangedAccount>);
    fn delete_blob(&self, tx: B256);
    fn delete_blobs(&self, txs: Vec<B256>);
    fn cleanup_blobs(&self);
}
Expand description

Extension for TransactionPool trait that allows to set the current block info.

Required Methods§

source

fn set_block_info(&self, info: BlockInfo)

Sets the current block info for the pool.

source

fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>)

Event listener for when the pool needs to be updated.

Implementers need to update the pool accordingly:

§Fee changes

The CanonicalStateUpdate includes the base and blob fee of the pending block, which affects the dynamic fee requirement of pending transactions in the pool.

§EIP-4844 Blob transactions

Mined blob transactions need to be removed from the pool, but from the pool only. The blob sidecar must not be removed from the blob store. Only after a blob transaction is finalized, its sidecar is removed from the blob store. This ensures that in case of a reorg, the sidecar is still available.

source

fn update_accounts(&self, accounts: Vec<ChangedAccount>)

Updates the accounts in the pool

source

fn delete_blob(&self, tx: B256)

Deletes the blob sidecar for the given transaction from the blob store

source

fn delete_blobs(&self, txs: Vec<B256>)

Deletes multiple blob sidecars from the blob store

source

fn cleanup_blobs(&self)

Maintenance function to cleanup blobs that are no longer needed.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: 'a + TransactionPoolExt + ?Sized> TransactionPoolExt for &'a T

source§

fn set_block_info(&self, info: BlockInfo)

source§

fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>)

source§

fn update_accounts(&self, accounts: Vec<ChangedAccount>)

source§

fn delete_blob(&self, tx: B256)

source§

fn delete_blobs(&self, txs: Vec<B256>)

source§

fn cleanup_blobs(&self)

source§

impl<T: TransactionPoolExt + ?Sized> TransactionPoolExt for Arc<T>
where Arc<T>: TransactionPool,

source§

fn set_block_info(&self, info: BlockInfo)

source§

fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>)

source§

fn update_accounts(&self, accounts: Vec<ChangedAccount>)

source§

fn delete_blob(&self, tx: B256)

source§

fn delete_blobs(&self, txs: Vec<B256>)

source§

fn cleanup_blobs(&self)

Implementors§

source§

impl<V, T, S> TransactionPoolExt for Pool<V, T, S>