Skip to content

Commit

Permalink
temporary use wasm for witness calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Nov 8, 2024
1 parent 7aa3149 commit 595c8a1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 20 additions & 18 deletions packages/prover/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,27 @@ WORKDIR /root
RUN ls /root
RUN mkdir params
WORKDIR /root/params

RUN curl https://storage.googleapis.com/circom-ether-email-auth/v1.0.2/email_auth.zkey --output ./email_auth.zkey
RUN mkdir ./email_auth_cpp
WORKDIR /root/params/email_auth_cpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/email_auth --output ./email_auth
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/Makefile --output ./Makefile
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/calcwit.cpp --output ./calcwit.cpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/calcwit.hpp --output ./calcwit.hpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/calcwit.o --output ./calcwit.o
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/circom.hpp --output ./circom.hpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/email_auth.cpp --output ./email_auth.cpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/email_auth.dat --output ./email_auth.dat
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.asm --output ./fr.asm
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.cpp --output ./fr.cpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.hpp --output ./fr.hpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.o --output ./fr.o
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr_asm.o --output ./fr_asm.o
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/main.cpp --output ./main.cpp
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/main.o --output ./main.o
RUN chmod +x ./email_auth
RUN curl https://storage.googleapis.com/circom-ether-email-auth/v1.0.2/email_auth.wasm --output ./email_auth.wasm
# RUN mkdir ./email_auth_cpp
# WORKDIR /root/params/email_auth_cpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/email_auth --output ./email_auth
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/Makefile --output ./Makefile
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/calcwit.cpp --output ./calcwit.cpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/calcwit.hpp --output ./calcwit.hpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/calcwit.o --output ./calcwit.o
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/circom.hpp --output ./circom.hpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/email_auth.cpp --output ./email_auth.cpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/email_auth.dat --output ./email_auth.dat
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.asm --output ./fr.asm
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.cpp --output ./fr.cpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.hpp --output ./fr.hpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr.o --output ./fr.o
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/fr_asm.o --output ./fr_asm.o
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/main.cpp --output ./main.cpp
# RUN curl https://storage.googleapis.com/circom-ether-email-auth/v2.0.1-preview/email_auth_cpp/main.o --output ./main.o
# RUN chmod +x ./email_auth
WORKDIR /root
RUN ls params
RUN ls params/email_auth_cpp
Expand Down
4 changes: 3 additions & 1 deletion packages/prover/circom_proofgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public_path="${buildDir}/rapidsnark_public_${circuitName}_${nonce}.json"
cd "${SCRIPT_DIR}"
echo "entered zk email path: ${SCRIPT_DIR}"

${paramsDir}/${circuitName}_cpp/${circuitName} "${input_path}" "${witness_path}"
# ${paramsDir}/${circuitName}_cpp/${circuitName} "${input_path}" "${witness_path}"
echo "NODE_OPTIONS='--max-old-space-size=644000' snarkjs wc "${paramsDir}/${circuitName}.wasm" "${input_path}" "${witness_path}""
NODE_OPTIONS='--max-old-space-size=644000' snarkjs wc "${paramsDir}/${circuitName}.wasm" "${input_path}" "${witness_path}" | tee /dev/stderr
status_jswitgen=$?
echo "✓ Finished witness generation with cpp! ${status_jswitgen}"

Expand Down

0 comments on commit 595c8a1

Please sign in to comment.