-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
A-rpcRelated to the RPC implementationRelated to the RPC implementationA-sdkRelated to reth's use as a libraryRelated to reth's use as a libraryC-enhancementNew feature or requestNew feature or requestM-changelogThis change should be included in the changelogThis change should be included in the changelog
Description
Describe the feature
we often do:
reth/crates/rpc/rpc/src/eth/pubsub.rs
Line 378 in abe6bf6
| 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:
reth/crates/optimism/rpc/src/eth/mod.rs
Line 118 in abe6bf6
| 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
Peponks9
Metadata
Metadata
Assignees
Labels
A-rpcRelated to the RPC implementationRelated to the RPC implementationA-sdkRelated to reth's use as a libraryRelated to reth's use as a libraryC-enhancementNew feature or requestNew feature or requestM-changelogThis change should be included in the changelogThis change should be included in the changelog
Type
Projects
Status
Backlog