Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix packages for Circom Circuits #142

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ env:
ETHERSCAN_API_KEY: '${{ secrets.ETHERSCAN_API_KEY }}'

jobs:
Circom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build Nix dev shell
run: nix build '.#packages.x86_64-linux.compress'
Tests:
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
CIRCUITS = aggregate_bitmask compress compute_domain compute_signing_root expand_message hash_to_field hash_tree_root hash_tree_root_beacon_header is_supermajority is_valid_merkle_branch light_client light_client_recursive
SUFFIXES = _cpp _build _zkey_0 _phase_2_ceremony _zkey _vkey _full
yarn-check:
yarn install --immutable --immutable-cache --silent || { \
echo "Please run yarn install"; exit 1; \
}

.PHONY: build-relay-image
build-relay-image:
nix run '.#docker-image-yarn.copyToDockerDaemon'
nix run '.?submodules=1#docker-image-all.copyToDockerDaemon'
nix run --builders '$(BUILDERS)' '.#docker-image-yarn.copyToDockerDaemon'
nix run --builders '$(BUILDERS)' '.?submodules=1#docker-image-all.copyToDockerDaemon'

docker build -t relayimage -f Dockerfile.relay .

Expand All @@ -28,3 +30,8 @@ test-solidity-beacon-light-client-verifier:
test-circom-circuits:
cd beacon-light-client/circom && \
./test/run_snarkit2_tests.sh

$(foreach s, $(SUFFIXES), $(addsuffix $s, $(CIRCUITS))) cosmos-verifier-parse-data cosmos-verifier-contract cosmos-light-client-contract cosmos-groth16-verifier beacon-light-client-wasm beacon-light-client-emmc-wasm: %: #yarn-check
nix build --builders '$(BUILDERS)' -L '.#packages.x86_64-linux.'$@


68 changes: 0 additions & 68 deletions beacon-light-client/circom/scripts/proof_efficient/build_proof.sh

This file was deleted.

140 changes: 0 additions & 140 deletions beacon-light-client/circom/scripts/proof_efficient/get-proof-input.ts

This file was deleted.

This file was deleted.

This file was deleted.

Loading