pendulum-chain / spacewalk

Apache License 2.0
34 stars 7 forks source link

Retry on rpc timeout response #518

Closed gianfra-t closed 4 months ago

gianfra-t commented 4 months ago

Closes #516.

General Description

Upon receiving a RequestTimeout error, the client should retry sending the transaction. This will be done with the same backoff used for other errors defined as "Skippable".

Implementation

We add a method to identify the RequestTimeout error, and add it to the respective closures with the corresponding Skip retry policy.

The client's existing timeout (for some transactions) should also be larger (currently 5 minutes) than the one returned by the unresponsive chain. For requests we will just retry until the backoff is exausted.

gianfra-t commented 4 months ago

@pendulum-chain/devs Although I think this could solve the issue, I was not able to trigger a RequestTimeout on a modified local chain to test it.

gianfra-t commented 4 months ago

The CI keeps failing on me 😕. Someone knows why could this be?

ebma commented 4 months ago

I don't know about this error but the 'test_get_proof_for_current_slot failed' in this run is probably just due to a shaky test. The test_get_proof_for_current_slot() test is known to fail often in the CI 😞 I just restarted it again, let's see.

gianfra-t commented 4 months ago

Yes one of the previous was a failed build, very strange since it has been built many times already!