Skip to content

Commit 5e8327f

Browse files
authoredOct 29, 2020
feat: integrate blst backend and proof verification optimizations
1 parent a9ce4d3 commit 5e8327f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+289
-338
lines changed
 

‎.circleci/config.yml

+34-14
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- cargo-v28-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
3030
- run: rustup install $(cat rust-toolchain)
3131
- run: rustup default $(cat rust-toolchain)
32+
- run: rustup install nightly
3233
- run: rustup component add rustfmt-preview
3334
- run: rustup component add clippy
3435
- run: cargo update
@@ -127,9 +128,10 @@ jobs:
127128
RUST_TEST_THREADS: 1
128129
no_output_timeout: 30m
129130

130-
# Running with `use_fil_blst=true` should be integrated directly into the test code. For now we
131-
# just re-run the tests that exercise the fil-blst code path with that setting set.
132-
test_fil_blst:
131+
132+
# Running with `use_multicore_sdr=true` should be integrated directly into the test code. For now we
133+
# just re-run the lifecycle tests to exercise the use_multicore_sdr code path with that setting set.
134+
test_multicore_sdr:
133135
docker:
134136
- image: filecoin/rust:latest
135137
working_directory: /mnt/crate
@@ -144,19 +146,28 @@ jobs:
144146
- cargo-v28-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
145147
- restore_parameter_cache
146148
- run:
147-
name: Test with fil-blst enabled
149+
name: Test with use_multicore_sdr pairing enabled
148150
command: |
149151
ulimit -n 20000
150152
ulimit -u 20000
151153
ulimit -n 20000
152-
cargo +$(cat rust-toolchain) test --verbose --release --test api -- --ignored
154+
cargo +nightly -Zpackage-features test --all --verbose --release --test api -- --ignored lifecycle
153155
environment:
154156
RUST_TEST_THREADS: 1
155-
FIL_PROOFS_USE_FIL_BLST: true
157+
FIL_PROOFS_USE_MULTICORE_SDR: true
156158

157-
# Running with `use_multicore_sdr=true` should be integrated directly into the test code. For now we
158-
# just re-run the lifecycle tests to exercise the use_multicore_sdr code path with that setting set.
159-
test_multicore_sdr:
159+
- run:
160+
name: Test with use_multicore_sdr and blst enabled
161+
command: |
162+
ulimit -n 20000
163+
ulimit -u 20000
164+
ulimit -n 20000
165+
cargo +nightly -Zpackage-features test --all --no-default-features --features gpu,blst --verbose --release --test api -- --ignored lifecycle
166+
environment:
167+
RUST_TEST_THREADS: 1
168+
FIL_PROOFS_USE_MULTICORE_SDR: true
169+
170+
test_blst:
160171
docker:
161172
- image: filecoin/rust:latest
162173
working_directory: /mnt/crate
@@ -171,15 +182,23 @@ jobs:
171182
- cargo-v28-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
172183
- restore_parameter_cache
173184
- run:
174-
name: Test with use_multicore_sdr enabled
185+
name: Test ignored with blst enabled
175186
command: |
176187
ulimit -n 20000
177188
ulimit -u 20000
178189
ulimit -n 20000
179-
cargo +$(cat rust-toolchain) test --verbose --release -- --ignored lifecycle
190+
cargo +nightly -Zpackage-features test --all --no-default-features --features gpu,blst --verbose --release --test api -- --ignored
180191
environment:
181192
RUST_TEST_THREADS: 1
182-
FIL_PROOFS_USE_MULTICORE_SDR: true
193+
194+
- run:
195+
name: Test with blst enabled
196+
command: |
197+
ulimit -n 20000
198+
ulimit -u 20000
199+
ulimit -n 20000
200+
cargo +nightly -Zpackage-features test --all --no-default-features --features gpu,blst --verbose
201+
183202
184203
bench:
185204
docker:
@@ -415,11 +434,12 @@ workflows:
415434
requires:
416435
- cargo_fetch
417436
- ensure_groth_parameters_and_keys_linux
418-
- test_fil_blst:
437+
438+
- test_multicore_sdr:
419439
requires:
420440
- cargo_fetch
421441
- ensure_groth_parameters_and_keys_linux
422-
- test_multicore_sdr:
442+
- test_blst:
423443
requires:
424444
- cargo_fetch
425445
- ensure_groth_parameters_and_keys_linux

‎fil-proofs-tooling/Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs"
1010
readme = "README.md"
1111

1212
[dependencies]
13+
storage-proofs = { path = "../storage-proofs", default-features = false }
14+
filecoin-proofs = { path = "../filecoin-proofs", default-features = false }
1315
clap = "2"
1416
serde = { version = "1.0", features = ["derive"] }
1517
serde_json = "1.0"
@@ -20,38 +22,36 @@ regex = "1.3.7"
2022
commandspec = "0.12.2"
2123
chrono = { version = "0.4.7", features = ["serde"] }
2224
memmap = "0.7.0"
23-
bellperson = "0.9.1"
24-
paired = "0.20.0"
25+
bellperson = { version = "0.11", default-features = false }
2526
rand = "0.7"
26-
storage-proofs = { path = "../storage-proofs"}
27-
filecoin-proofs = { path = "../filecoin-proofs"}
2827
tempfile = "3.0.8"
2928
cpu-time = "1.0.0"
3029
git2 = "0.13.6"
31-
heim = { version = "0.1.0-beta.1", features = ["host", "memory", "cpu"] }
30+
heim = { git = "https://github.com/heim-rs/heim", rev = "e22e235", features = ["host", "memory", "cpu"] }
3231
async-std = "1.6"
3332
blake2s_simd = "0.5.6"
3433
fil_logger = "0.1"
3534
log = "0.4.8"
36-
uom = "0.28"
35+
uom = "0.30"
3736
merkletree = "0.21.0"
3837
bincode = "1.1.2"
3938
anyhow = "1.0.23"
4039
ff = { version = "0.2.3", package = "fff" }
4140
rand_xorshift = "0.2.0"
4241
bytefmt = "0.1.7"
4342
rayon = "1.3.0"
44-
flexi_logger = "0.14.7"
43+
flexi_logger = "0.16.1"
4544
typenum = "1.11.2"
46-
generic-array = "0.13.2"
45+
generic-array = "0.14.4"
4746
byte-unit = "4.0.9"
4847

4948
[features]
5049
default = ["gpu", "measurements"]
5150
gpu = ["storage-proofs/gpu", "filecoin-proofs/gpu", "bellperson/gpu"]
5251
measurements = ["storage-proofs/measurements"]
5352
profile = ["storage-proofs/profile", "measurements"]
54-
53+
pairing = ["storage-proofs/pairing", "filecoin-proofs/pairing", "bellperson/pairing"]
54+
blst = ["storage-proofs/blst", "filecoin-proofs/blst", "bellperson/blst"]
5555

5656
[target.'cfg(target_arch = "x86_64")'.dependencies]
57-
raw-cpuid = "7.0.3"
57+
raw-cpuid = "8.1.2"

0 commit comments

Comments
 (0)
Please sign in to comment.