Skip to content

Conversation

Peponks9
Copy link

This PR implements the specialization of send_raw_transaction_sync for Optimism (op-reth), adding flashblocks support for faster transaction confirmations, based on new feedback.

Closes #18372

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there

Comment on lines 98 to 104
while let Some(notification) = canonical_stream.next().await {
// First check flashblocks for faster confirmation (Optimism-specific)
if let Ok(Some(pending_block)) = this.pending_flashblock() {
let block_and_receipts = pending_block.into_block_and_receipts();
if block_and_receipts.block.body().contains_transaction(&hash) {
if let Some(receipt) = this.transaction_receipt(hash).await? {
return Ok(receipt);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this await loop we need to change slightly because the canonical_stream and flashblocks are ticking at a different rate

what we want is a tokio::select! here where one branch is canonical_stream.next() and the other is a WatchStream::new using:

pub fn pending_block_rx(&self) -> Option<PendingBlockRx<N::Primitives>> {

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Sep 20, 2025
Copy link
Author

@Peponks9 Peponks9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the feedback @mattsse, changes applied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

specialize send_raw_transaction_sync for op-reth
2 participants