MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.94k stars 4.88k forks source link

Switch Retry Algorithm to Exponential Backoff #2669

Closed sdtsui closed 6 years ago

sdtsui commented 6 years ago

(This issue uses private Slack archive links.)

From @maurycyp in Slack: we'd like to lower our total number of retries for pending tx's, using exponential backoff. This would decrease load on infura nodes, and help lower current congestion more quickly. This was discussed live with @frankiebee and is ready to be started on.

There are a few libs out there that can help with this. It may be simplest to roll our own algo, using examples here and here: just remember to cap the backoff to, say, a day. I'm not familiar enough with these controllers to suggest that we use localStorage to keep track of retries or if we have a preferred way of doing this: will leave it up to the implementor.

Notes:

danfinlay commented 6 years ago

Cool idea!

sdtsui commented 6 years ago

Implemented in #2670.