You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should implement a fallback to other API endpoints when the primary one is down.
A possibly better & easier alternative is to use FastestNodeClient, see drand-client docs:
// if you're happy to get randomness from many APIs and automatically use the fastest// you can construct a `FastestNodeClient` with multiple URLs// note: the randomness beacons are cryptographically verifiable, so as long as you fill// in the `chainVerificationParams` in the options, you don't need to worry about malicious // providers sending you fake randomness!consturls=['https://api.drand.sh','https://drand.cloudflare.com'// ...]constfastestNodeClient=newFastestNodeClient(urls,options)// don't forget to start the client, or it won't periodically optimise for the fastest node!fastestNodeClient.start()
The text was updated successfully, but these errors were encountered:
Hmm, after reading the implementation, I don't think FastestNodeClient is what we want. You need to run a benchmark to pick the fastest API provider. Then, the request is sent to this fastest provider only.
I wish drand-client provided something like FallbackProvider in Ethers.js.
See e35c089 and https://space-meridian.slack.com/archives/C06RPCL6QGL/p1724249441844879
DRAND provides several API endpoints; see https://drand.love/docs/http-api-reference:
We should implement a fallback to other API endpoints when the primary one is down.
A possibly better & easier alternative is to use
FastestNodeClient
, see drand-client docs:The text was updated successfully, but these errors were encountered: