Skip to content

Commit

Permalink
feat: debug failing sdr porep test
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPeterVanNostrand committed Mar 9, 2022
1 parent 2db8d57 commit 069954d
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 151 deletions.
296 changes: 149 additions & 147 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ jobs:
ulimit -n 20000
ulimit -u 20000
ulimit -n 20000
cargo +<< pipeline.parameters.nightly-toolchain >> test --all --verbose --release << parameters.cargo-args >> -- --nocapture << parameters.test-args >>
cargo +<< pipeline.parameters.nightly-toolchain >> test test_seal_lifecycle_upgrade --verbose --release << parameters.cargo-args >> -- --nocapture --ignored
# cargo +<< pipeline.parameters.nightly-toolchain >> test --all --verbose --release << parameters.cargo-args >> -- --nocapture << parameters.test-args >>
cargo +<< pipeline.parameters.nightly-toolchain >> test --all --verbose --release test_stacked_porep_prove_verify << parameters.cargo-args >> -- --nocapture << parameters.test-args >>
# cargo +<< pipeline.parameters.nightly-toolchain >> test test_seal_lifecycle_upgrade --verbose --release << parameters.cargo-args >> -- --nocapture --ignored
no_output_timeout: 30m
environment:
RUST_BACKTRACE: 1
FIL_PROOFS_USE_GPU_COLUMN_BUILDER: true
FIL_PROOFS_USE_GPU_TREE_BUILDER: true
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
Expand Down Expand Up @@ -371,58 +373,58 @@ workflows:
jobs:
- ensure_groth_parameters_and_keys_linux
- cargo_fetch
- rustfmt:
requires:
- cargo_fetch
- clippy:
requires:
- cargo_fetch

- test_release:
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_ignored_release:
name: test_ignored_release_storage_proofs_post
crate: "storage-proofs-post"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_ignored_release:
name: test_ignored_release_storage_proofs_core
crate: "storage-proofs-core"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_ignored_release:
name: test_ignored_release_storage_proofs_porep
crate: "storage-proofs-porep"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_ignored_release:
name: test_ignored_release_filecoin_proofs
crate: "filecoin-proofs"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_gpu_tree_building:
name: test_gpu_tree_building_opencl (regular)
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_gpu_tree_building:
name: test_gpu_tree_building_opencl (ignored)
test-args: "--ignored --skip test_seal_lifecycle_upgrade"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux
# - rustfmt:
# requires:
# - cargo_fetch
# - clippy:
# requires:
# - cargo_fetch
#
# - test_release:
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_ignored_release:
# name: test_ignored_release_storage_proofs_post
# crate: "storage-proofs-post"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_ignored_release:
# name: test_ignored_release_storage_proofs_core
# crate: "storage-proofs-core"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_ignored_release:
# name: test_ignored_release_storage_proofs_porep
# crate: "storage-proofs-porep"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_ignored_release:
# name: test_ignored_release_filecoin_proofs
# crate: "filecoin-proofs"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_gpu_tree_building:
# name: test_gpu_tree_building_opencl (regular)
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_gpu_tree_building:
# name: test_gpu_tree_building_opencl (ignored)
# test-args: "--ignored --skip test_seal_lifecycle_upgrade"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux

- test_gpu_tree_building:
name: test_gpu_tree_building_cuda (regular)
Expand All @@ -431,96 +433,96 @@ workflows:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_gpu_tree_building:
name: test_gpu_tree_building_cuda (ignored)
cargo-args: "--features cuda"
test-args: "--ignored"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_multicore_sdr:
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_filecoin_proofs
crate: "filecoin-proofs"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_storage_proofs_core
crate: "storage-proofs-core"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_storage_proofs_post
crate: "storage-proofs-post"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_storage_proofs_porep
crate: "storage-proofs-porep"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_fil_proofs_tooling
crate: "fil-proofs-tooling"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_sha2raw
crate: "sha2raw"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test:
name: test_filecoin_hashers
crate: "filecoin-hashers"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux


- test:
name: test_fil_proofs_param
crate: "fil-proofs-param"
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_no_gpu:
name: test_no_gpu
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- test_arm_no_gpu:
name: test_arm_no_gpu
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux

- bench:
requires:
- cargo_fetch
- ensure_groth_parameters_and_keys_linux
- test_darwin

- test:
name: test_fr32
crate: "fr32"
requires:
- cargo_fetch
# - test_gpu_tree_building:
# name: test_gpu_tree_building_cuda (ignored)
# cargo-args: "--features cuda"
# test-args: "--ignored"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_multicore_sdr:
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_filecoin_proofs
# crate: "filecoin-proofs"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_storage_proofs_core
# crate: "storage-proofs-core"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_storage_proofs_post
# crate: "storage-proofs-post"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_storage_proofs_porep
# crate: "storage-proofs-porep"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_fil_proofs_tooling
# crate: "fil-proofs-tooling"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_sha2raw
# crate: "sha2raw"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test:
# name: test_filecoin_hashers
# crate: "filecoin-hashers"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
#
# - test:
# name: test_fil_proofs_param
# crate: "fil-proofs-param"
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_no_gpu:
# name: test_no_gpu
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - test_arm_no_gpu:
# name: test_arm_no_gpu
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
#
# - bench:
# requires:
# - cargo_fetch
# - ensure_groth_parameters_and_keys_linux
# - test_darwin
#
# - test:
# name: test_fr32
# crate: "fr32"
# requires:
# - cargo_fetch
4 changes: 4 additions & 0 deletions storage-proofs-core/src/merkle/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ pub trait MerkleProofTrait: Clone + Serialize + DeserializeOwned + Debug + Sync

fn validate_data(&self, data: <Self::Hasher as Hasher>::Domain) -> bool {
if !self.verify() {
println!("\n\tMerkleProof.verify() failure");
return false;
}

if self.leaf() != data {
println!("\n\tMerkleProof.verify() failure => self.leaf() != data");
}
self.leaf() == data
}

Expand Down
5 changes: 5 additions & 0 deletions storage-proofs-porep/src/stacked/vanilla/column_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ impl<Proof: MerkleProofTrait> ColumnProof<Proof> {
challenge: u32,
expected_root: &<Proof::Hasher as Hasher>::Domain,
) -> bool {
println!("\n\t ColumnProof.verify => 1");
let c_i = self.column_hash();

println!("\n\t ColumnProof.verify => 2");
check_eq!(&self.inclusion_proof.root(), expected_root);
println!("\n\t ColumnProof.verify => 3");
check!(self.inclusion_proof.validate_data(c_i.into()));
println!("\n\t ColumnProof.verify => 4");
check!(self.inclusion_proof.validate(challenge as usize));
println!("\n\t ColumnProof.verify => 5");

true
}
Expand Down
Loading

0 comments on commit 069954d

Please sign in to comment.