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

Fix empty sector update priority and add debugging #1558

Merged
merged 3 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions filecoin-proofs/src/api/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::{ensure, Context, Result};
use bincode::{deserialize, serialize};
use filecoin_hashers::{Domain, Hasher};
use generic_array::typenum::Unsigned;
use log::info;
use log::{info, trace};
use merkletree::merkle::get_merkle_tree_len;
use merkletree::store::StoreConfig;
use storage_proofs_core::{
Expand Down Expand Up @@ -66,11 +66,13 @@ fn get_t_aux<Tree: 'static + MerkleTreeTrait<Hasher = TreeRHasher>>(
cache_path: &Path,
) -> Result<TemporaryAux<Tree, DefaultPieceHasher>> {
let t_aux_path = cache_path.join(CacheKey::TAux.to_string());
trace!("Instantiating TemporaryAux from {:?}", cache_path);
let t_aux_bytes = fs::read(&t_aux_path)
.with_context(|| format!("could not read file t_aux={:?}", t_aux_path))?;

let mut res: TemporaryAux<Tree, DefaultPieceHasher> = deserialize(&t_aux_bytes)?;
res.set_cache_path(cache_path);
trace!("Set TemporaryAux cache_path to {:?}", cache_path);

Ok(res)
}
Expand Down Expand Up @@ -500,7 +502,7 @@ pub fn generate_empty_sector_update_proof_with_vanilla<
sector_bytes: u64::from(config.sector_size),
},
partitions: Some(partitions),
priority: true,
priority: false,
};
let pub_params_compound = EmptySectorUpdateCompound::<Tree>::setup(&setup_params_compound)?;

Expand Down Expand Up @@ -567,7 +569,7 @@ pub fn generate_empty_sector_update_proof<Tree: 'static + MerkleTreeTrait<Hasher
sector_bytes: u64::from(config.sector_size),
},
partitions: Some(partitions),
priority: true,
priority: false,
};
let pub_params_compound = EmptySectorUpdateCompound::<Tree>::setup(&setup_params_compound)?;

Expand Down
8 changes: 8 additions & 0 deletions storage-proofs-update/src/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,14 @@ where
tree_r_base_tree_leafs,
tree_r_base_tree_count,
)?;

trace!("ReplicaConfig Path: {:?}", replica_config.path);
for config in &tree_r_configs {
trace!(
"StoreConfig: {:?}",
StoreConfig::data_path(&config.path, &config.id)
);
}
trace!(
"Instantiating {}: arity={}-{}-{}, base_tree_count={}, base_store_size={}",
name,
Expand Down