Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add script to pin params and publish dnslink (#909)
Adds pin-params.sh which will pin the parameters to cluster and publish the cid to proofs.filecoin.io To keep things simple the script assumes you'll run it against a dir with just the current version of params in. It keeps the previous versions of the params by adding a link called `prev` to the new params dir. So you get . ├── v13-proof-of...meta ├── v13-proof-of...params ... ├── prev ├── v12-proof-of...meta ├── v12-proof-of...params ... and so on. The scripts aims to be idempotent... if you re-run it on the same params it wont endlessly link the same version of the parms. You need to provide the following env vars - CLUSTER_TOKEN - the basic auth user:pass string to pin things to cluster.ipfs.io - DNSIMPLE_TOKEN - the api key to update the dnslink for proofs.filecoin.io You need the following tools available on your PATH - ipfs-cluster-ctl - to talk to cluster. download from https://dist.ipfs.io/#ipfs-cluster-ctl - npx - to run dnslink-dnsimple. comes free with npm these days - ipfs - you probably have one of those. The script will take a while to run. That's expected... It may redundently re-add the prams to your local ipfs, but thats ~1m on my machine. Pinning the new params on cluster can take a while. Depends on the prevailing network winds. Re-running it on the same params is pretty quick, though somewhat redundant. It's fast and loose with its use of `cut`, so it'll need a little more smarts when your version numbers hit 100. The storage space needed to store all the params will become an issue for the gateways pretty quickly... we have about 100GB free per node which is supposed to be used to temporarily cache general gateway content. I'll work on a solution for that. Cluster has about 40TB of space, so fill yer boots in that regard. License: MIT Signed-off-by: Oli Evans <[email protected]>
- Loading branch information