Skip to content

Commit

Permalink
feat: add option to not require a t_aux file to be present
Browse files Browse the repository at this point in the history
The `FFI_USE_FIXED_ROWS_TO_DISCARD` variable will make the proofs
ignore the `FIL_PROOFS_ROWS_TO_DISCARD` setting, hence not relying
on a `t_aux` file to be present. If enabled, then no `t_aux` file
will be written by the proofs and a hard-coded value for
`FIL_PROOFS_ROWS_TO_DISCARD` will be used.
  • Loading branch information
vmx committed Nov 8, 2023
1 parent 4f55a65 commit 8bf8a4f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.
12 changes: 10 additions & 2 deletions install-filcrypto
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,19 @@ build_from_source() {
use_multicore_sdr=""
fi

# By default the number or rows to discard of the TreeRLast can be set via
# `FIL_PROOFS_ROWS_TO_DISCARD`. When SupraSeal PC2 is used, then this
# number is fixed.
use_fixed_rows_to_discard=""
if [ "${FFI_USE_FIXED_ROWS_TO_DISCARD}" == "1" ]; then
use_fixed_rows_to_discard=",fixed-rows-to-discard"
fi

# Add feature specific rust flags as needed here.
if [ "${FFI_USE_BLST_PORTABLE}" == "1" ]; then
additional_flags="${additional_flags} --no-default-features --features ${use_multicore_sdr},blst-portable${gpu_flags}"
additional_flags="${additional_flags} --no-default-features --features ${use_multicore_sdr},blst-portable${gpu_flags}${use_fixed_rows_to_discard}"
else
additional_flags="${additional_flags} --no-default-features --features ${use_multicore_sdr}${gpu_flags}"
additional_flags="${additional_flags} --no-default-features --features ${use_multicore_sdr}${gpu_flags}${use_fixed_rows_to_discard}"
fi

echo "Using additional build flags: ${additional_flags}"
Expand Down
37 changes: 19 additions & 18 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ lazy_static = "1.4.0"
serde = "1.0.117"
serde_tuple = "0.5"
safer-ffi = { version = "0.0.7", features = ["proc_macros"] }
filecoin-proofs-api = { version = "16.0", default-features = false }
filecoin-proofs-api = { version = "16.1", default-features = false }

[dev-dependencies]
memmap2 = "0.5"
Expand All @@ -61,3 +61,6 @@ cuda-supraseal = ["filecoin-proofs-api/cuda-supraseal", "rust-gpu-tools/cuda", "
opencl = ["filecoin-proofs-api/opencl", "rust-gpu-tools/opencl", "fvm2/opencl", "fvm3/opencl", "fvm4/opencl"]
multicore-sdr = ["filecoin-proofs-api/multicore-sdr"]
c-headers = ["safer-ffi/headers"]
# This feature enables a fixed number of discarded rows for TreeR. The `FIL_PROOFS_ROWS_TO_DISCARD`
# setting is ignored, no `TemporaryAux` file will be written.
fixed-rows-to-discard = ["filecoin-proofs-api/fixed-rows-to-discard"]

0 comments on commit 8bf8a4f

Please sign in to comment.