11name : Circuits E2E Tests
22
33on :
4- workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
58jobs :
69 test :
710 name : Circuits E2E Tests
8- runs-on :
9- group : Default Larger Runners
11+ runs-on : ubuntu-latest
1012 environment : CI
1113 env :
1214 ETHEREUM_JSON_RPC_API_URL : ${{ secrets.ETHEREUM_JSON_RPC_API_URL }}
@@ -29,25 +31,30 @@ jobs:
2931 run : yarn install
3032
3133 - name : Install Nargo
32- uses :
noir-lang/[email protected] .3 34+ uses :
noir-lang/[email protected] .4 3335 with :
34- toolchain : nightly-2024-05-22
36+ toolchain : 1.0.0-beta.18
3537
38+ - name : Install Barretenberg
39+ run : |
40+ curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/next/barretenberg/bbup/install | bash
41+ ~/.bb/bbup -nv 1.0.0-beta.18
42+ sudo apt install libc++-dev
3643 - name : Compile Circuit
3744 run : |
38- nargo compile --package get_header --deny-warnings
39- nargo compile --package get_account --deny-warnings
40- nargo compile --package get_storage --deny-warnings
41- nargo compile --package get_storage_recursive --deny-warnings
42- nargo compile --package get_receipt --deny-warnings
43- nargo compile --package get_transaction --deny-warnings
44- nargo compile --package get_log --deny-warnings
45- nargo compile --package is_dao_worthy --deny-warnings
46- nargo compile --package is_ape_owner --deny-warnings
47-
48- # We cannot use the `--deny-warnings` option in `is_dao_worthy_recursive` because the `verify_proof` method generates warnings
45+ nargo compile --package get_header --deny-warnings --skip-brillig-constraints-check
46+ nargo compile --package get_account --deny-warnings --skip-brillig-constraints-check
47+ nargo compile --package get_storage --deny-warnings --skip-brillig-constraints-check
48+ nargo compile --package get_storage_recursive --deny-warnings --skip-brillig-constraints-check
49+ nargo compile --package get_receipt --deny-warnings --skip-brillig-constraints-check
50+ nargo compile --package get_transaction --deny-warnings --skip-brillig-constraints-check
51+ nargo compile --package get_log --deny-warnings --skip-brillig-constraints-check
52+ nargo compile --package is_dao_worthy --deny-warnings --skip-brillig-constraints-check
53+ nargo compile --package is_ape_owner --deny-warnings --skip-brillig-constraints-check
54+
55+ # We cannot use the `--deny-warnings` option in `is_dao_worthy_recursive` because the `verify_proof` method generates warnings
4956 # that are actually informational messages from the compiler and cannot be ignored.
50- nargo compile --package is_dao_worthy_recursive
57+ nargo compile --package is_dao_worthy_recursive --skip-brillig-constraints-check
5158
5259 - name : Start Oracle Server
5360 working-directory : ethereum/oracles
@@ -56,39 +63,65 @@ jobs:
5663 ORACLE_SERVER_PID=$!
5764 echo "ORACLE_SERVER_PID=$ORACLE_SERVER_PID" >> $GITHUB_ENV
5865
59- - name : Generate Proof
66+ - name : Generate Witnesses
6067 run : |
61- nargo prove --package get_header --oracle-resolver=http://localhost:5555
62- nargo prove --package get_account --oracle-resolver=http://localhost:5555
63- nargo prove --package get_storage --oracle-resolver=http://localhost:5555
64- nargo prove --package get_receipt --oracle-resolver=http://localhost:5555
65- nargo prove --package get_transaction --oracle-resolver=http://localhost:5555
66- nargo prove --package get_log --oracle-resolver=http://localhost:5555
67- nargo prove --package is_dao_worthy --oracle-resolver=http://localhost:5555
68- nargo prove --package is_ape_owner --oracle-resolver=http://localhost:5555
69-
70- - name : Generate verification key for recursive proof
71- working-directory : ethereum/oracles
68+ nargo execute --package get_header --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
69+ nargo execute --package get_account --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
70+ nargo execute --package get_storage --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
71+ nargo execute --package get_receipt --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
72+ nargo execute --package get_transaction --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
73+ nargo execute --package get_log --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
74+ nargo execute --package is_dao_worthy --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
75+ nargo execute --package is_ape_owner --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
76+
77+ - name : Generate Proofs and Verification Keys
7278 run : |
73- # Verification key generation uses Barretenberg backend located at ~/.nargo/backends/acvm-backend-barretenberg/backend_binary.
74- # It is automatically installed during the execution of the `nargo prove` command in previous step.
75- yarn generate-get-storage-vk
79+ export PATH="$HOME/.bb:$PATH"
80+ bb prove -b ./target/get_header.json -w ./target/get_header.gz -o ./target/get_header --write_vk
81+ bb prove -b ./target/get_account.json -w ./target/get_account.gz -o ./target/get_account --write_vk
82+ bb prove -b ./target/get_storage.json -w ./target/get_storage.gz -o ./target/get_storage --write_vk
83+ bb prove -b ./target/get_receipt.json -w ./target/get_receipt.gz -o ./target/get_receipt --write_vk
84+ bb prove -b ./target/get_transaction.json -w ./target/get_transaction.gz -o ./target/get_transaction --write_vk
85+ bb prove -b ./target/get_log.json -w ./target/get_log.gz -o ./target/get_log --write_vk
86+ bb prove -b ./target/is_dao_worthy.json -w ./target/is_dao_worthy.gz -o ./target/is_dao_worthy --write_vk
87+ bb prove -b ./target/is_ape_owner.json -w ./target/is_ape_owner.gz -o ./target/is_ape_owner --write_vk
7688
77- - name : Generate Recursive Proof
89+ - name : Debug - List generated files
7890 run : |
79- export NARGO_FOREIGN_CALL_TIMEOUT=100000 # miliseconds
80- nargo prove --package is_dao_worthy_recursive --oracle-resolver=http://localhost:5555
91+ echo "=== Contents of target directory ==="
92+ ls -la ./target/ | head -30
93+ echo "=== Looking for VK directories ==="
94+ find ./target -name "*vk*" -type d | head -10
95+ echo "=== Looking for proof files ==="
96+ ls -la ./target/get_header* || true
97+
98+ # - name: Generate verification key for recursive proof
99+ # working-directory: ethereum/oracles
100+ # run: |
101+ # # Verification key generation uses the TypeScript bindings to generate the VK needed for recursive proofs.
102+ # yarn generate-get-storage-vk
103+
104+ # - name: Generate Recursive Witness
105+ # run: |
106+ # export NARGO_FOREIGN_CALL_TIMEOUT=100000 # miliseconds
107+ # nargo execute --package is_dao_worthy_recursive --oracle-resolver=http://localhost:5555
108+
109+ # - name: Generate Recursive Proof
110+ # run: |
111+ # export PATH="$HOME/.bb:$PATH"
112+ # bb prove -b ./target/is_dao_worthy_recursive.json -w ./target/is_dao_worthy_recursive.gz -o ./target/is_dao_worthy_recursive --write_vk
81113
82- - name : Verify Proof
114+ - name : Verify Proofs
83115 run : |
84- nargo verify --package get_header
85- nargo verify --package get_account
86- nargo verify --package get_storage
87- nargo verify --package get_receipt
88- nargo verify --package get_transaction
89- nargo verify --package get_log
90- nargo verify --package is_dao_worthy
91- nargo verify --package is_ape_owner
116+ export PATH="$HOME/.bb:$PATH"
117+ bb verify -k ./target/get_header/vk -p ./target/get_header/proof -i ./target/get_header/public_inputs
118+ bb verify -k ./target/get_account/vk -p ./target/get_account/proof -i ./target/get_account/public_inputs
119+ bb verify -k ./target/get_storage/vk -p ./target/get_storage/proof -i ./target/get_storage/public_inputs
120+ bb verify -k ./target/get_receipt/vk -p ./target/get_receipt/proof -i ./target/get_receipt/public_inputs
121+ bb verify -k ./target/get_transaction/vk -p ./target/get_transaction/proof -i ./target/get_transaction/public_inputs
122+ bb verify -k ./target/get_log/vk -p ./target/get_log/proof -i ./target/get_log/public_inputs
123+ bb verify -k ./target/is_dao_worthy/vk -p ./target/is_dao_worthy/proof -i ./target/is_dao_worthy/public_inputs
124+ bb verify -k ./target/is_ape_owner/vk -p ./target/is_ape_owner/proof -i ./target/is_ape_owner/public_inputs
92125
93126 - name : Stop Oracle Server
94127 if : always()
0 commit comments