upfate prod setup

This commit is contained in:
Alexey 2021-10-18 12:26:37 +03:00
parent fb624e57c9
commit 76cf0e9502
No known key found for this signature in database
GPG Key ID: C77958099D784E76
3 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,8 @@
}, },
"scripts": { "scripts": {
"circuit": "./scripts/buildCircuit.sh 2 && ./scripts/buildCircuit.sh 16", "circuit": "./scripts/buildCircuit.sh 2 && ./scripts/buildCircuit.sh 16",
"circuit_prod": "rm -rf ./artifacts/circuits && ./scripts/buildCircuit_prod.sh 2 && ./scripts/buildCircuit_prod.sh 16 && tar -czvf artifacts/circuits.tar.gz artifacts/circuits", "circuit_prod": "rm -rf ./artifacts/circuits && yarn changeTreeHeight 23 && ./scripts/buildCircuit_prod.sh 2 && ./scripts/buildCircuit_prod.sh 16 && tar -czvf artifacts/circuits.tar.gz artifacts/circuits",
"changeTreeHeight": "./scripts/changeTreeHeight.sh",
"compile": "npx hardhat compile", "compile": "npx hardhat compile",
"build": "npm run circuit && npm run compile", "build": "npm run circuit && npm run compile",
"deploy": "npx hardhat run scripts/deploy.js --network optimism", "deploy": "npx hardhat run scripts/deploy.js --network optimism",

View File

@ -1,5 +1,5 @@
#!/bin/bash -e #!/bin/bash -e
POWERS_OF_TAU=15 # circuit will support max 2^POWERS_OF_TAU constraints POWERS_OF_TAU=18 # circuit will support max 2^POWERS_OF_TAU constraints
mkdir -p artifacts/circuits mkdir -p artifacts/circuits
if [ ! -f artifacts/circuits/ptau$POWERS_OF_TAU ]; then if [ ! -f artifacts/circuits/ptau$POWERS_OF_TAU ]; then
echo "Downloading powers of tau file" echo "Downloading powers of tau file"

6
scripts/changeTreeHeight.sh Executable file
View File

@ -0,0 +1,6 @@
case $(sed --help 2>&1) in
*GNU*) sed_i () { xargs sed -i "$@"; };;
*) sed_i () { xargs sed -i '' "$@"; };;
esac
grep -l --exclude-dir={.git,node_modules,artifacts,contracts} -r "component main = Transaction([0-9]*," . | sed_i "s/component main = Transaction([0-9]*,/component main = Transaction(${1},/g"