polytope-labs / hyperbridge

Hyperbridge is a hyperscalable coprocessor for verifiable, cross-chain interoperability
https://docs.hyperbridge.network/
Apache License 2.0
111 stars 41 forks source link

Add retry middleware to sync committee prover #117

Closed Wizdave97 closed 8 months ago

Wizdave97 commented 8 months ago

Enable retries when fetching sync committee data

Wizdave97 commented 8 months ago

Should we integrate in this middleware instead of the regular retry?

seunlanlege commented 8 months ago

Should we integrate in this middleware instead of the regular retry?

Yeah i don't think we need reqwest-retry we just need the provider switching middleware. Although now that i think about it, why not both? I'm assuming if all urls fails, reqwest-retry would kick in?

Wizdave97 commented 8 months ago

Should we integrate in this middleware instead of the regular retry?

Yeah i don't think we need reqwest-retry we just need the provider switching middleware. Although now that i think about it, why not both? I'm assuming if all urls fails, reqwest-retry would kick in?

Yeah but it would only retry on the last provider url.

Wizdave97 commented 8 months ago

Or we use retry first, then move on to switching as the second strategy.

seunlanlege commented 8 months ago

Or we use retry first, then switch as the second strategy.

I think instead, we cycle back to the first url?

Wizdave97 commented 8 months ago

I think instead, we cycle back to the first url?

We can only retry for maximum of the number of urls + the number of retries configured in the reqwest-retry middleware. we can't switch the url used by the reqwest-retry middleware.

Do you mean we should just modify the request to use the first url before exiting the provider switcher so reqwest-retry runs with the first url?