Skip to content
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: pin params to the filecoin collab cluster. #1263

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions scripts/pin-params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,32 @@ else
exit 1
fi

CLUSTER_HOST="/dnsaddr/cluster.ipfs.io"
CLUSTER_HOST="/dnsaddr/filecoin.collab.ipfscluster.io"
ADDITIONAL_CLUSTER_HOST="/dnsaddr/cluster.ipfs.io"
CLUSTER_PIN_NAME="filecoin-proof-parameters-$VERSION"
DNSLINK_DOMAIN="proofs.filecoin.io"

# Pin to cluster
# Add and pin to collab cluster. After this it will be on 1 peer and pin requests
# will have been triggered for the others.
ROOT_CID=$(ipfs-cluster-ctl \
--host $CLUSTER_HOST \
--basic-auth $CLUSTER_TOKEN \
add --quieter \
--local \
--name $CLUSTER_PIN_NAME \
--recursive $INPUT_DIR )

echo "ok! root cid is $ROOT_CID"

# Pin to main cluster additionally.
ipfs-cluster-ctl \
--host $ADDITIONAL_CLUSTER_HOST \
--basic-auth $CLUSTER_TOKEN \
pin add $ROOT_CID \
--no-status

echo "ok! Pin request sent to additional cluster"

# Publist the new cid to the dnslink
npx dnslink-dnsimple --domain $DNSLINK_DOMAIN --link "/ipfs/$ROOT_CID"

Expand Down