Skip to content

Add Flashblocks aware ReceiptStream #19681

@mattsse

Description

@mattsse

Describe the feature

we often do:

BroadcastStream::new(self.eth_api.provider().subscribe_to_canonical_state())

to obtain a stream of new receipts, which flashblocks we also want a way to provide a stream of receipts

that combines the canonical state stream with flashblocks:

pub fn subscribe_received_flashblocks(&self) -> Option<FlashBlockRx> {

we can do this by writing a custom flashblocks aware stream primitive that uses both streams as input and yields Receipts, for new blocks
this needs to tracks latest yielded block, so that we avoid yielding duplicate receipts

Additional context

assigning @mablr

Metadata

Metadata

Assignees

Labels

A-rpcRelated to the RPC implementationA-sdkRelated to reth's use as a libraryC-enhancementNew feature or requestM-changelogThis change should be included in the changelog

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions