-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(utils): use multiple sources to download snark artifacts #273
Conversation
import poseidon function, fetch artifacts and generate proof concurrently
|
||
const getPackageVersions = async (proof: Proof) => | ||
fetch(`${ARTIFACTS_BASE_URL}/${proof}-artifacts`) | ||
fetch(`https://registry.npmjs.org/@zk-kit/${proof}-artifacts`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spotted a mistake there, unrelated to this PR though
05babc6
to
71ba422
Compare
@cedoor After further testing, I can confirm that unpkg is throttling downloads. So deciding to combine multiple CDNs with a fetch retry will both make our tests faster and the artifacts fetching more reliable. I would wait for #275 to merge first before continuing there, as both our PRs touch the same functions though. |
|
||
const ARTIFACTS_BASE_URL = "https://unpkg.com/@zk-kit" | ||
const getBaseUrls = (proof: Proof, version: Version) => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my initial idea was to shuffle this randomly, but as privacy-scaling-explorations/snark-artifacts#23 told us how to rank them by download speed, we should follow that order
Will reopen in here privacy-scaling-explorations/snark-artifacts#65 |
wip
closes privacy-scaling-explorations/snark-artifacts#65