Implement retry in bridges equivocation loop#11283
Implement retry in bridges equivocation loop#11283serban300 merged 7 commits intoparitytech:masterfrom
Conversation
9f7ddb9 to
f861b30
Compare
| &mut self.target_client, | ||
| &mut self.finality_proofs_buf, | ||
| &mut self.reporter, | ||
| (3, 5), |
There was a problem hiding this comment.
maybe retry more than just 3 times, with larger backoff:
I would retry for 5 mins, say every 20s:
| (3, 5), | |
| (15, 20), |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Actually let's use the tick that is used for the main loop as well. It's better for the tests.
|
/cmd prdoc --audience node_dev --bump patch |
…e_dev --bump patch'
| tokio::time::sleep(retry_tick).await; | ||
| block_checker = err |
There was a problem hiding this comment.
Very nit, maybe not necessary, we don't need to sleep on last attemp
| tokio::time::sleep(retry_tick).await; | |
| block_checker = err | |
| block_checker = err; | |
| if i + 1 < max_attempts { | |
| tokio::time::sleep(retry_tick).await; | |
| } |
There was a problem hiding this comment.
Maybe also add some trace log, that we are retrying? Would this be useful?
There was a problem hiding this comment.
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.
98e2967
Implement retry mechanism in bridges equivocation loop