Replies: 3 comments 1 reply
-
A quorum of 0 won’t make much sense (it would return immediately, since we successfully have 0 things agreeing ;)), but you can set the quorum to 1 without issue. You can also set up your backends to have a priority, so you can make the one you want to have priority a lower number (e.g. 1) and set the rest higher (e.g. 2) and that will use your preferred one first. And finally, you can specify a longer stallTimeout per provider, which will determine how long it will wait before kicking off the next provider. :) So, with a properly configured FallbackProvider, you can do that today. :) I will be adding a few more options to the FallbackProvider over the next while, but nothing that should impact this use case. Make sense? |
Beta Was this translation helpful? Give feedback.
-
(Moving to discussions) |
Beta Was this translation helpful? Give feedback.
-
@ricmoo I'm experimenting with FallbackProvider, but not getting the result I would expect when using it with InfuraProvider.
Looking at the browser network console, the localhost JsonRpcProvider is called correctly (and fails as expected with ERR_CONNECTION_REFUSED: no rpc running there). |
Beta Was this translation helpful? Give feedback.
-
Hi Richard,
This is very useful https://docs.ethers.io/v5/api/providers/other/#FallbackProvider. However, I'm wondering if there can be something simpler with no quorum requirements, i.e., quorum = 0? For example a primary provider and
n
backup providers, where we only call the backup providers if the primary providers don't return in time.Thanks,
Julian
Beta Was this translation helpful? Give feedback.
All reactions