diff --git a/install-filcrypto b/install-filcrypto index 895a6aba..103a6fed 100755 --- a/install-filcrypto +++ b/install-filcrypto @@ -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}" diff --git a/rust/Cargo.lock b/rust/Cargo.lock index b23f9666..2b331019 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1153,7 +1153,7 @@ dependencies = [ "fil_logger", "filecoin-proofs-api", "filepath", - "fr32", + "fr32 9.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fvm 2.7.0", "fvm 3.8.0", "fvm 4.0.0-alpha.4", @@ -1182,8 +1182,7 @@ dependencies = [ [[package]] name = "filecoin-hashers" version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb5ea33790e200a7d77b929e848fba8c3ee0d206dba6dc41e15286e433f62aa" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "anyhow", "bellperson", @@ -1202,8 +1201,7 @@ dependencies = [ [[package]] name = "filecoin-proofs" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3840a583825e720be353549dca7e2cbd247bf2876adc9a79a8a1752eb95ab96" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "anyhow", "bellperson", @@ -1212,7 +1210,7 @@ dependencies = [ "blstrs", "ff", "filecoin-hashers", - "fr32", + "fr32 9.0.0 (git+https://github.com/filecoin-project/rust-fil-proofs?branch=master)", "generic-array", "hex", "iowrap", @@ -1236,8 +1234,7 @@ dependencies = [ [[package]] name = "filecoin-proofs-api" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61bdd3ba08899866a2b2c7f0fbe1fcb55cc6ad3c2f0b20026ef63263ac8ac50" +source = "git+https://github.com/filecoin-project/rust-filecoin-proofs-api?branch=fixed-rows-to-discard#fcb7dd63d3d7bc3b86e81c1354d3c3e2b087721b" dependencies = [ "anyhow", "bellperson", @@ -1245,7 +1242,7 @@ dependencies = [ "blstrs", "filecoin-hashers", "filecoin-proofs", - "fr32", + "fr32 9.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static", "serde", "storage-proofs-core", @@ -1325,6 +1322,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "fr32" +version = "9.0.0" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" +dependencies = [ + "anyhow", + "blstrs", + "byte-slice-cast", + "byteorder", + "ff", + "thiserror", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2965,8 +2975,7 @@ dependencies = [ [[package]] name = "sha2raw" version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b502b7bf556833b39551a1379b1ea715ce293016da621f18c3583fb13249a2ec" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "byteorder", "cpufeatures", @@ -3045,8 +3054,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storage-proofs-core" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "807382fd21c163e7666587a9f9142881c1caa00db33e14784dd31f7eb9982bee" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "aes", "anyhow", @@ -3058,7 +3066,7 @@ dependencies = [ "config", "ff", "filecoin-hashers", - "fr32", + "fr32 9.0.0 (git+https://github.com/filecoin-project/rust-fil-proofs?branch=master)", "fs2", "generic-array", "itertools 0.10.5", @@ -3080,8 +3088,7 @@ dependencies = [ [[package]] name = "storage-proofs-porep" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c9539ca32203ac4c7e888f967b6343defd29c935614d2defa4912a10148ff8" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "anyhow", "bellperson", @@ -3095,8 +3102,9 @@ dependencies = [ "fdlimit", "ff", "filecoin-hashers", - "fr32", + "fr32 9.0.0 (git+https://github.com/filecoin-project/rust-fil-proofs?branch=master)", "generic-array", + "glob", "hex", "hwloc", "lazy_static", @@ -3122,8 +3130,7 @@ dependencies = [ [[package]] name = "storage-proofs-post" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1780ccdd466460d78ac70290e289c4e7a20721272ffc9ac19736e9f34fcafbc" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "anyhow", "bellperson", @@ -3132,7 +3139,7 @@ dependencies = [ "byteorder", "ff", "filecoin-hashers", - "fr32", + "fr32 9.0.0 (git+https://github.com/filecoin-project/rust-fil-proofs?branch=master)", "generic-array", "hex", "log", @@ -3145,15 +3152,14 @@ dependencies = [ [[package]] name = "storage-proofs-update" version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a9c5760889cffd415961e6c1637c300aa40732e753646e8d4885baa4f48d72" +source = "git+https://github.com/filecoin-project/rust-fil-proofs?branch=master#89ca8157955d4552baf48abc40c49903927c45e9" dependencies = [ "anyhow", "bellperson", "blstrs", "ff", "filecoin-hashers", - "fr32", + "fr32 9.0.0 (git+https://github.com/filecoin-project/rust-fil-proofs?branch=master)", "generic-array", "lazy_static", "log", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b8fa3d6f..2e359d86 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -61,3 +61,12 @@ 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"] + +[patch.crates-io] +filecoin-hashers = { git = "https://github.com/filecoin-project/rust-fil-proofs", branch = "master" } +filecoin-proofs = { git = "https://github.com/filecoin-project/rust-fil-proofs", branch = "master" } +filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api", branch = "fixed-rows-to-discard" } +storage-proofs-core = { git = "https://github.com/filecoin-project/rust-fil-proofs", branch = "master" }