-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test that incorrect proof returned from oracle is failing in na…
…rgo prove
- Loading branch information
1 parent
c660a24
commit 2829bc8
Showing
3 changed files
with
61 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: circuit failing proof test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: nargo test | ||
runs-on: ubuntu-latest | ||
environment: CI | ||
env: | ||
ETHEREUM_JSON_RPC_API_URL: ${{ secrets.ETHEREUM_JSON_RPC_API_URL }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nargo | ||
uses: noir-lang/noirup@v0.1.3 | ||
with: | ||
toolchain: 0.23.0 | ||
|
||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Enable Corepack and Install Yarn 4 | ||
run: | | ||
corepack enable | ||
yarn set version latest | ||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Start Faulty Oracle Server | ||
env: | ||
RETURN_INVALID_PROOF: true | ||
working-directory: packages/noir-ethereum-api | ||
run: | | ||
yarn oracle-server & | ||
ORACLE_SERVER_PID=$! | ||
echo "ORACLE_SERVER_PID=$ORACLE_SERVER_PID" >> $GITHUB_ENV | ||
- name: Generate Proof | ||
run: | | ||
! nargo prove --package main --oracle-resolver=http://localhost:5555 | ||
- name: Stop Faulty Oracle Server | ||
if: always() | ||
run: kill $ORACLE_SERVER_PID |
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
# noir-ethereum-api | ||
|
||
## Oracle server | ||
|
||
### Configuration | ||
|
||
Pass `RETURN_INVALID_PROOF=true` to return incorrect proofs. By default correct proofs are returned |
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