forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
FROM alpine | ||
RUN apk add --no-cache curl | ||
COPY target/x86_64-unknown-linux-musl/release/prover /bin/ | ||
# Docs of env variables used for this image | ||
# to test this locally just run | ||
# docker build -t tmp_prover -f =(f envsubst < ./docker/prover/Dockerfile) .; docker run --rm tmp_prover:latest | ||
#ENV NODE_NAME nodename | ||
#ENV POD_NAME podname | ||
#ENV SUPPORTED_BLOCK_CHUNKS_SIZES $SUPPORTED_BLOCK_CHUNKS_SIZES | ||
#ENV SUPPORTED_BLOCK_CHUNKS_SIZES_SETUP_POWERS $SUPPORTED_BLOCK_CHUNKS_SIZES_SETUP_POWERS | ||
#ENV BLOCK_CHUNK_SIZES $BLOCK_CHUNK_SIZES | ||
#ENV KEY_DIR $KEY_DIR | ||
#ENV ACCOUNT_TREE_DEPTH $ACCOUNT_TREE_DEPTH | ||
#ENV BALANCE_TREE_DEPTH $BALANCE_TREE_DEPTH | ||
#ENV PROVER_SERVER_URL $PROVER_SERVER_URL | ||
#ENV REQ_SERVER_TIMEOUT $REQ_SERVER_TIMEOUT | ||
#ENV RUST_BACKTRACE $RUST_BACKTRACE | ||
#ENV RUST_LOG $RUST_LOG | ||
COPY target/x86_64-unknown-linux-musl/release/plonk_step_by_step_prover /bin/ | ||
COPY docker/prover/prover-entry.sh /bin/ | ||
COPY bin/load_keys /bin/ | ||
COPY bin/plonk-setup /bin/ | ||
COPY bin/verify-keys /bin/ | ||
COPY keys/packed /keys/packed | ||
COPY contracts/build/ /contracts/build/ | ||
RUN apk add --no-cache axel | ||
RUN apk add --no-cache axel curl bash | ||
|
||
CMD ["prover-entry.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# remove quotes for docker-compose | ||
# export KEY_FILES=`echo $KEY_FILES | sed -e 's/"\(.*\)/\1/g' -e 's/"$//g'` | ||
export ZKSYNC_HOME="/" | ||
|
||
echo NODE_NAME=$NODE_NAME | ||
echo POD_NAME=$POD_NAME | ||
|
||
. /bin/load_keys | ||
echo SUPPORTED_BLOCK_CHUNKS_SIZES=$SUPPORTED_BLOCK_CHUNKS_SIZES | ||
echo SUPPORTED_BLOCK_CHUNKS_SIZES_SETUP_POWERS=$SUPPORTED_BLOCK_CHUNKS_SIZES_SETUP_POWERS | ||
echo BLOCK_CHUNK_SIZES=$BLOCK_CHUNK_SIZES | ||
|
||
|
||
# we donwload only keys used in node (defined by $BLOCK_CHUNK_SIZES) | ||
SUP_CHUNKS_ARR=($(echo $SUPPORTED_BLOCK_CHUNKS_SIZES | tr ',' "\n")) | ||
SUP_CHUNKS_POW=($(echo $SUPPORTED_BLOCK_CHUNKS_SIZES_SETUP_POWERS | tr ',' "\n")) | ||
|
||
REQUIRED_SETUP_POWS="" | ||
for index in ${!SUP_CHUNKS_ARR[*]}; do | ||
for my_size in ${BLOCK_CHUNK_SIZES//,/ }; do | ||
if [ $my_size == ${SUP_CHUNKS_ARR[$index]} ]; then | ||
REQUIRED_SETUP_POWS="$REQUIRED_SETUP_POS,${SUP_CHUNKS_POW[$index]}" | ||
fi | ||
done | ||
done | ||
|
||
echo Downloading setup powers $REQUIRED_SETUP_POWS | ||
|
||
/bin/plonk-setup download monomial $REQUIRED_SETUP_POWS | ||
/bin/verify-keys unpack | ||
|
||
echo key download complete, starting prover | ||
|
||
exec prover "$POD_NAME" 2>&1 | ||
exec plonk_step_by_step_prover "$POD_NAME" 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters