Skip to content

Implement retry in bridges equivocation loop#11283

Merged
serban300 merged 7 commits intoparitytech:masterfrom
serban300:small_fixes_bridge
Mar 6, 2026
Merged

Implement retry in bridges equivocation loop#11283
serban300 merged 7 commits intoparitytech:masterfrom
serban300:small_fixes_bridge

Conversation

@serban300
Copy link
Copy Markdown
Contributor

Implement retry mechanism in bridges equivocation loop

@serban300 serban300 self-assigned this Mar 5, 2026
@serban300 serban300 added the T15-bridges This PR/Issue is related to bridges. label Mar 5, 2026
@paritytech-review-bot paritytech-review-bot bot requested a review from a team March 5, 2026 14:03
@serban300 serban300 force-pushed the small_fixes_bridge branch from 9f7ddb9 to f861b30 Compare March 5, 2026 14:18
&mut self.target_client,
&mut self.finality_proofs_buf,
&mut self.reporter,
(3, 5),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe retry more than just 3 times, with larger backoff:

I would retry for 5 mins, say every 20s:

Suggested change
(3, 5),
(15, 20),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense to retry more, but I think we should also avoid waiting too much for a single block. I changed it to (5, 10). WDYT ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually let's use the tick that is used for the main loop as well. It's better for the tests.

@serban300
Copy link
Copy Markdown
Contributor Author

/cmd prdoc --audience node_dev --bump patch

Comment on lines +239 to +240
tokio::time::sleep(retry_tick).await;
block_checker = err
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nit, maybe not necessary, we don't need to sleep on last attemp

Suggested change
tokio::time::sleep(retry_tick).await;
block_checker = err
block_checker = err;
if i + 1 < max_attempts {
tokio::time::sleep(retry_tick).await;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe also add some trace log, that we are retrying? Would this be useful?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Very nit, maybe not necessary, we don't need to sleep on last attempt

Nice catch ! Done.

Maybe also add some trace log, that we are retrying? Would this be useful?

Done. Probably it's good to have.

@serban300 serban300 added this pull request to the merge queue Mar 6, 2026
Merged via the queue into paritytech:master with commit 98e2967 Mar 6, 2026
210 of 214 checks passed
@serban300 serban300 deleted the small_fixes_bridge branch March 6, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T15-bridges This PR/Issue is related to bridges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants