-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: optimize message processor and tally
- [x] Remove sha256 hashing - [x] Support multiple params for verifier
- Loading branch information
Showing
40 changed files
with
456 additions
and
1,186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Integration tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
integration: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
command: ["test:integration"] | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
# Check for changes in the 'circuit' folder | ||
- name: Get changed files | ||
id: get-changed-files | ||
uses: jitterbit/get-changed-files@v1 | ||
with: | ||
format: "csv" | ||
|
||
- name: Check for changes in 'circuit' folder | ||
id: check_changes | ||
run: | | ||
CHANGED_FILES=${{ steps.get-changed-files.outputs.all }} | ||
if echo "$CHANGED_FILES" | grep -q "\.circom"; then | ||
echo "CHANGED=true" >> $GITHUB_ENV | ||
echo "Circuits have changes." | ||
else | ||
echo "CHANGED=false" >> $GITHUB_ENV | ||
echo "No changes on circuits." | ||
fi | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --yes \ | ||
build-essential \ | ||
libgmp-dev \ | ||
libsodium-dev \ | ||
nasm \ | ||
nlohmann-json3-dev | ||
- name: Install | ||
run: | | ||
pnpm install --frozen-lockfile --prefer-offline | ||
- name: Build | ||
run: | | ||
pnpm run build | ||
- name: Download rapidsnark (1c137) | ||
run: | | ||
mkdir -p ~/rapidsnark/build | ||
wget -qO ~/rapidsnark/build/prover https://maci-devops-zkeys.s3.ap-northeast-2.amazonaws.com/rapidsnark-linux-amd64-1c137 | ||
chmod +x ~/rapidsnark/build/prover | ||
- name: Download circom Binary v2.1.6 | ||
run: | | ||
wget -qO ${{ github.workspace }}/circom https://github.com/iden3/circom/releases/download/v2.1.6/circom-linux-amd64 | ||
chmod +x ${{ github.workspace }}/circom | ||
sudo mv ${{ github.workspace }}/circom /bin/circom | ||
- name: Compile Circuits And Generate zkeys | ||
if: ${{ env.CHANGED == 'true' }} | ||
run: | | ||
pnpm build:circuits-c -- --outPath ../cli/zkeys | ||
pnpm setup:zkeys -- --outPath ../cli/zkeys | ||
- name: Download zkeys | ||
if: ${{ env.CHANGED == 'false' }} | ||
run: | | ||
pnpm download-zkeys:test | ||
- name: Run hardhat fork | ||
run: | | ||
cd contracts | ||
pnpm run hardhat & | ||
sleep 5 | ||
- name: ${{ matrix.command }} | ||
run: pnpm run ${{ matrix.command }} | ||
|
||
- name: Stop Hardhat | ||
if: always() | ||
run: kill $(lsof -t -i:8545) |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ ptau | |
input.json | ||
circom/main | ||
circom/test | ||
zkeys/ | ||
|
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
Oops, something went wrong.