Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 42 additions & 14 deletions .github/workflows/foundry-voting.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# a github workflow that runs curl -L https://foundry.paradigm.xyz | bash then nargo codegen-verifier then nargo prove p
name: Run Foundry-Voting Tests

name: Run fourndry-voting Tests on PR
on:
pull_request:
paths:
- 'foundry-voting/**'
workflow_dispatch:

jobs:
test:
Expand All @@ -14,26 +14,54 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: stable

- name: Install bb
run: |
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash
echo "PATH=$PATH:/home/runner/.bb" >> $GITHUB_ENV
shell: bash

- name: Use bbup
run: |
bbup
shell: bash

- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Generate verifier contract
run: |
nargo codegen-verifier
working-directory: foundry-voting/circuits
- name: Run Circuit Tests
run: bun run circuits:test

- name: Generate proof
run: |
nargo prove
working-directory: foundry-voting/circuits
- name: Execute Circuits
run: bun run circuits:execute

- name: Test with Foundry
run: |
forge test --optimize --optimizer-runs 5000 --evm-version london
- name: Generate UltraPlonk Proof
run: bun run circuits:ultraplonk:generate-proof

- name: Generate Verification Key
run: bun run circuits:ultraplonk:generate-vk

- name: Generate Circuit Contract
run: bun run circuits:contract

- name: Clean UltraPlonk Proof
run: bun run ultraplonk:clean-proof

- name: Run Forge Tests
run: forge test
183 changes: 169 additions & 14 deletions foundry-voting/.gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,175 @@
# Compiler files
cache/
out/
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
# Logs

# Docs
docs/
logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Caches

cache
.cache

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

# Dotenv file
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

node_modules
crs
# IntelliJ based IDEs
.idea

circuits/contract
circuits/proofs
# Finder (MacOS) folder config
.DS_Store
3 changes: 0 additions & 3 deletions foundry-voting/.gitmodules

This file was deleted.

Loading
Loading