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: update paramcache to properly generate .meta files #1551

Merged
merged 4 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
12 changes: 6 additions & 6 deletions fil-proofs-param/scripts/pin-params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set -Eeuo pipefail

# pin-params.sh
#
# - Post the directory of params to cluster.ipfs.io
# - Grab the CID for the previous params from proofs.filecoin.io
# - Add the old params as a `prev` dir to the new params dir to keep them around.
# - Post the directory of params to cluster.ipfs.io
# - Grab the CID for the previous params from proofs.filecoin.io
# - TODO: Add the old params as a `prev` dir to the new params dir to keep them around.
# - Pin the new cid on cluster
# - Publish the new cid as a dnslink to proofs.filecoin.io
# - The gateways will pin the new dir by checking proofs.filecoin.io hourly.
# - Publish the new cid as a dnslink to proofs.filecoin.io
# - The gateways will pin the new dir by checking proofs.filecoin.io hourly.
#
# Requires:
# - `ipfs-cluster-ctl` - download from https://dist.ipfs.io/#ipfs-cluster-ctl
Expand Down Expand Up @@ -79,7 +79,7 @@ ipfs-cluster-ctl \

echo "ok! Pin request sent to additional cluster"

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

echo "done!"
8 changes: 8 additions & 0 deletions fil-proofs-param/src/bin/paramcache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,20 @@ fn cache_empty_sector_update_params<Tree: 'static + MerkleTreeTrait<Hasher = Tre
let public_params: storage_proofs_update::PublicParams =
PublicParams::from_sector_size(u64::from(porep_config.sector_size));

let circuit = <EmptySectorUpdateCompound<Tree> as CompoundProof<
EmptySectorUpdate<Tree>,
EmptySectorUpdateCircuit<Tree>,
>>::blank_circuit(&public_params);

let _ = <EmptySectorUpdateCompound<Tree> as CompoundProof<
EmptySectorUpdate<Tree>,
EmptySectorUpdateCircuit<Tree>,
>>::groth_params::<OsRng>(Some(&mut OsRng), &public_params)
.expect("failed to get groth params");

let _ = <EmptySectorUpdateCompound<Tree>>::get_param_metadata(circuit, &public_params)
.expect("failed to get metadata");

let _ = <EmptySectorUpdateCompound<Tree> as CompoundProof<
EmptySectorUpdate<Tree>,
EmptySectorUpdateCircuit<Tree>,
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-update/src/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ where
})
.collect::<Result<Vec<ChallengeProof<TreeR>>>>()?;

info!("finished generating challege-proofs for partition k={}", k);
info!("finished generating challenge-proofs for partition k={}", k);

Ok(PartitionProof {
comm_c: *comm_c,
Expand Down