1 Star 0 Fork 0

liusen/snarkOS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run-prover.sh 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
raychu86 提交于 2022-11-07 19:02 . Update run-prover.sh script
#!/bin/bash
# USAGE examples:
# CLI with env vars: PROVER_PRIVATE_KEY=APrivateKey1... ./run-prover.sh
# CLI with prompts for vars: ./run-prover.sh
# If the env var PROVER_PRIVATE_KEY is not set, prompt for it
if [ -z "${PROVER_PRIVATE_KEY}" ]
then
read -r -p "Enter the Aleo Prover account private key: "
PROVER_PRIVATE_KEY=$REPLY
fi
if [ "${PROVER_PRIVATE_KEY}" == "" ]
then
PROVER_PRIVATE_KEY="APrivateKey1zkp8cC4jgHEBnbtu3xxs1Ndja2EMizcvTRDq5Nikdkukg1p"
fi
COMMAND="cargo run --release -- start --nodisplay --prover ${PROVER_PRIVATE_KEY}"
for word in $*;
do
COMMAND="${COMMAND} ${word}"
done
function exit_node()
{
echo "Exiting..."
kill $!
exit
}
trap exit_node SIGINT
echo "Running an Aleo Prover node..."
$COMMAND &
while :
do
echo "Checking for updates..."
git stash
rm Cargo.lock
STATUS=$(git pull)
if [ "$STATUS" != "Already up to date." ]; then
echo "Updated code found, rebuilding and relaunching prover"
cargo clean
kill -INT $!; sleep 2; $COMMAND &
fi
sleep 1800;
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liusen_n/snarkOS.git
[email protected]:liusen_n/snarkOS.git
liusen_n
snarkOS
snarkOS
sen-dev

搜索帮助