Skip to content

Commit

Permalink
run.sh: rename run_assigner to build_constraint
Browse files Browse the repository at this point in the history
It matters what we make, not what tool we run.
Also, now it's consistent with build_circuit_params.

Run commands in `run.sh all` and CI workflow in the
same order that they go in the README.
  • Loading branch information
NickVolynkin committed Jul 19, 2023
1 parent bcf1eb9 commit 1a2da44
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
- name: Compile a circuit
run: scripts/run.sh --verbose --docker compile

- name: Make constraint and assignment table for EVM verifier endpoint
run: scripts/run.sh --verbose --docker run_assigner

- name: Build circuit parameters for EVM verifier endpoint
run: scripts/run.sh --verbose --docker build_circuit_params

- name: Build a statement for the Proof Market
run: scripts/run.sh --verbose --docker build_statement

- name: Calculate a proof
run: scripts/run.sh --verbose --docker prove

- name: Make constraint and assignment table for EVM verifier endpoint
run: scripts/run.sh --verbose --docker build_constraint

- name: Build circuit parameters for EVM verifier endpoint
run: scripts/run.sh --verbose --docker build_circuit_params
9 changes: 5 additions & 4 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ compile() {
# Use assigner to produce a constraint file and an assignment table.
# This is not a part of the basic development workflow,
# but can be used for debugging circuits.
run_assigner() {
build_constraint() {
if [ "$USE_DOCKER" = true ] ; then
cd "$REPO_ROOT"
$DOCKER run $DOCKER_OPTS \
Expand All @@ -109,7 +109,7 @@ run_assigner() {
--user $(id -u ${USER}):$(id -g ${USER}) \
--volume $(pwd):/opt/zkllvm-template \
ghcr.io/nilfoundation/zkllvm-template:${ZKLLVM_VERSION} \
sh -c "bash ./scripts/run.sh run_assigner"
sh -c "bash ./scripts/run.sh build_constraint"
cd -
else
cd "$REPO_ROOT/build"
Expand Down Expand Up @@ -227,9 +227,10 @@ prove() {

run_all() {
compile
run_assigner
build_statement
prove
build_constraint
build_circuit_params
}

USE_DOCKER=false
Expand All @@ -241,7 +242,7 @@ while [[ "$#" -gt 0 ]]; do
-v|--verbose) set -x ;;
all) SUBCOMMAND=run_all ;;
compile) SUBCOMMAND=compile ;;
run_assigner) SUBCOMMAND=run_assigner ;;
build_constraint) SUBCOMMAND=build_constraint ;;
build_circuit_params) SUBCOMMAND=build_circuit_params ;;
build_statement) SUBCOMMAND=build_statement ;;
prove) SUBCOMMAND=prove ;;
Expand Down

0 comments on commit 1a2da44

Please sign in to comment.