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: remove stacked benchmark from benchy (broken) #1229

Merged
merged 1 commit into from
Jul 24, 2020
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
12 changes: 7 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ jobs:
cat micro-benchmarks.json
no_output_timeout: 60m
- run:
name: Run stacked benchmarks using 512MiB sectors
name: Run Winning PoST benchmarks using 512MiB sectors
command: |
./fil-proofs-tooling/scripts/run-remote.sh "${CIRCLE_BRANCH}" "${BENCHMARK_SERVER_SSH_USERNAME}@${BENCHMARK_SERVER_IP_ADDR}" ./fil-proofs-tooling/scripts/benchy.sh stacked --size=$((512*1024)) > stacked-benchmarks.json
cat stacked-benchmarks.json
./fil-proofs-tooling/scripts/run-remote.sh "${CIRCLE_BRANCH}" "${BENCHMARK_SERVER_SSH_USERNAME}@${BENCHMARK_SERVER_IP_ADDR}" ./fil-proofs-tooling/scripts/benchy.sh winning-post --size=$((512*1024)) > winning-post-benchmarks.json
cat winning-post-benchmarks.json
no_output_timeout: 60m
- run:
name: Run Window PoST benchmarks using a 512MiB sector
Expand All @@ -199,10 +199,12 @@ jobs:
- run:
name: Aggregate benchmarks into single JSON document
command: |
./fil-proofs-tooling/scripts/aggregate-benchmarks.sh stacked-benchmarks.json micro-benchmarks.json hash-constraints.json window-post-benchmarks.json > aggregated-benchmarks.json
./fil-proofs-tooling/scripts/aggregate-benchmarks.sh winning-post-benchmarks.json micro-benchmarks.json hash-constraints.json window-post-benchmarks.json > aggregated-benchmarks.json
cat aggregated-benchmarks.json
- store_artifacts:
path: stacked-benchmarks.json
path: winning-post-benchmarks.json
- store_artifacts:
path: window-post-benchmarks.json
- store_artifacts:
path: hash-constraints.json
- store_artifacts:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ There are currently several different crates:
- [**Filecoin Proofs (`filecoin-proofs`)**](./filecoin-proofs)
A wrapper around `storage-proofs`, providing an FFI-exported API callable from C (and in practice called by [lotus](https://github.com/filecoin-project/lotus) via cgo). Filecoin-specific values of setup parameters are included here.

## Security Audits

`rust-fil-proofs` has undergone a [SNARK proofs security audit performed by Dr. Jean-Philippe Aumasson and Antony Vennard](audits/protocolai-audit-DRAFT-2020-07-23-2.pdf) and been deemed free of *critical* or *major* security issues. In addition to the security analysis, the document provides the audit goals, methodology, functionality descriptions and finally observations on what could be improved. All known issues have been resolved to date.

## Design Notes

Earlier in the design process, we considered implementing what has become the **FPS** in Go – as a wrapper around potentially multiple SNARK circuit libraries. We eventually decided to use [bellman](https://github.com/zkcrypto/bellman) – a library developed by Zcash, which supports efficient pedersen hashing inside of SNARKs. Having made that decision, it was natural and efficient to implement the entire subsystem in Rust. We considered the benefits (self-contained codebase, ability to rely on static typing across layers) and costs (developer ramp-up, sometimes unwieldiness of borrow-checker) as part of that larger decision and determined that the overall project benefits (in particular ability to build on Zcash’s work) outweighed the costs.
Expand Down
Binary file added audits/protocolai-audit-DRAFT-2020-07-23-2.pdf
Binary file not shown.
101 changes: 0 additions & 101 deletions fil-proofs-tooling/src/bin/benchy/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,93 +8,12 @@ use crate::prodbench::ProdbenchInputs;
mod hash_fns;
mod merkleproofs;
mod prodbench;
mod stacked;
mod window_post;
mod winning_post;

fn main() -> Result<()> {
fil_logger::init();

let stacked_cmd = SubCommand::with_name("stacked")
.about("Run stacked sealing")
.arg(
Arg::with_name("size")
.required(true)
.long("size")
.help("The data size in KB")
.takes_value(true),
)
.arg(
Arg::with_name("challenges")
.long("challenges")
.help("How many challenges to execute")
.default_value("1")
.takes_value(true),
)

.arg(
Arg::with_name("hasher")
.long("hasher")
.help("Which hasher should be used. Available: \"pedersen\", \"sha256\", \"blake2s\" (default \"pedersen\")")
.default_value("pedersen")
.takes_value(true),
)
.arg(
Arg::with_name("layers")
.long("layers")
.help("How many layers to use")
.default_value("11")
.takes_value(true),
)
.arg(
Arg::with_name("no-tmp")
.long("no-tmp")
.help("Don't use a temp file for random data (write to current directory instead).")
)
.arg(
Arg::with_name("dump")
.long("dump")
.help("Dump vanilla proofs to current directory.")
)
.arg(
Arg::with_name("partitions")
.long("partitions")
.help("How many circuit partitions to use")
.default_value("1")
.takes_value(true),
)
.arg(
Arg::with_name("groth")
.long("groth")
.help("Generate and verify a groth circuit proof.")
)
.arg(
Arg::with_name("bench")
.long("bench")
.help("Synthesize and report inputs/constraints for a circuit.")
)
.arg(
Arg::with_name("no-bench")
.long("no-bench")
.help("Don't synthesize and report inputs/constraints for a circuit.")
)
.arg(
Arg::with_name("bench-only")
.long("bench-only")
.help("Don't replicate or perform Groth proving.")
.conflicts_with_all(&["no-bench", "groth", "extract"])
)
.arg(
Arg::with_name("circuit")
.long("circuit")
.help("Print the constraint system.")
)
.arg(
Arg::with_name("extract")
.long("extract")
.help("Extract data after proving and verifying.")
);

let window_post_cmd = SubCommand::with_name("window-post")
.about("Benchmark Window PoST")
.arg(
Expand Down Expand Up @@ -231,7 +150,6 @@ fn main() -> Result<()> {

let matches = App::new("benchy")
.version("0.1")
.subcommand(stacked_cmd)
.subcommand(window_post_cmd)
.subcommand(winning_post_cmd)
.subcommand(hash_cmd)
Expand All @@ -240,25 +158,6 @@ fn main() -> Result<()> {
.get_matches();

match matches.subcommand() {
("stacked", Some(m)) => {
let layers = value_t!(m, "layers", usize)?;

stacked::run(stacked::RunOpts {
bench: m.is_present("bench"),
bench_only: m.is_present("bench-only"),
challenges: value_t!(m, "challenges", usize)?,
circuit: m.is_present("circuit"),
dump: m.is_present("dump"),
extract: m.is_present("extract"),
groth: m.is_present("groth"),
hasher: value_t!(m, "hasher", String)?,
layers,
no_bench: m.is_present("no-bench"),
no_tmp: m.is_present("no-tmp"),
partitions: value_t!(m, "partitions", usize)?,
size: value_t!(m, "size", usize)?,
})?;
}
("window-post", Some(m)) => {
let preserve_cache = m.is_present("preserve-cache");
// For now these options are combined.
Expand Down
Loading