Skip to content

Commit

Permalink
fix(params): ensure benchmarking server has groth params and keys bef…
Browse files Browse the repository at this point in the history
…ore running benchmarks (#953)

* fix(params): ensure benchmarking server has groth params and keys

* ci(params): ensure benchmarking server has params
  • Loading branch information
laser authored Nov 20, 2019
1 parent d665961 commit 00a1595
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,14 @@ jobs:
- checkout
- attach_workspace:
at: "."
- restore_cache:
keys:
- cargo-v13-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
- restore_cache:
keys:
- parameter-cache-{{ .Revision }}
- run:
name: Install jq
command: apt-get install time jq -yqq
- run:
name: Ensure existence of Groth parameters and keys on remote host
command: |
./fil-proofs-tooling/scripts/paramcache-remote.sh "${CIRCLE_BRANCH}" "${BENCHMARK_SERVER_SSH_USERNAME}@${BENCHMARK_SERVER_IP_ADDR}" "-z=$((1024*1024*1024))"
no_output_timeout: 60m
- run:
name: Run hash-constraints benchmarks on remote host
command: |
Expand Down
18 changes: 18 additions & 0 deletions fil-proofs-tooling/scripts/paramcache-remote.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -e

CMDS=$(cat <<EOF
cd \$(mktemp -d)
git clone https://github.com/filecoin-project/rust-fil-proofs.git
cd rust-fil-proofs
git checkout -q $1
export RUST_LOG=info
./fil-proofs-tooling/scripts/retry.sh 42 10 60000 \
./fil-proofs-tooling/scripts/with-lock.sh 42 /tmp/benchmark \
./fil-proofs-tooling/scripts/with-dots.sh \
cargo run --release --package filecoin-proofs --bin=paramcache -- ${@:3}
EOF
)

ssh -q $2 "$CMDS"

0 comments on commit 00a1595

Please sign in to comment.