Skip to content

Fix block stream retry logic for sequential fetching - #3227

Closed
sashaodessa wants to merge 3 commits into
alloy-rs:mainfrom
sashaodessa:patch-6
Closed

sashaodessa wants to merge 3 commits into
alloy-rs:mainfrom
sashaodessa:patch-6

Conversation

@sashaodessa

Copy link
Copy Markdown

retry each block number in NewBlocks before advancing to the next; break out of the fill loop only after exhausting retries for that block

}
};
let Some(block) = block else {
break 'fill;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this should just continue here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think this should just continue here?

@mattsse We need to break out of the loop once the per-number retries are exhausted. Continuing here would skip over the missing block, leaving a hole at self.next_yield; newer blocks would pile up in the cache but couldn’t be yielded until that hole is filled, so we’d waste RPC calls and still block the stream. The previous implementation also break’d on an unrecoverable failure, so this keeps the same behaviour while making the retry budget actually per block.

@github-project-automation github-project-automation Bot moved this to In Progress in Alloy Nov 23, 2025
@sashaodessa
sashaodessa requested a review from mattsse November 24, 2025 12:35
@mattsse

mattsse commented Apr 8, 2026

Copy link
Copy Markdown
Member

Closing as superseded by #3698, which merged on February 17, 2026 and already fixes this retry logic on main.

@mattsse mattsse closed this Apr 8, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Alloy Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants