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

Update verifier to Fork ID 6 #25

Merged
merged 2 commits into from
Dec 18, 2023
Merged
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
61 changes: 0 additions & 61 deletions .github/workflows/build-docker.yml

This file was deleted.

115 changes: 15 additions & 100 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,105 +8,20 @@ on:
branches: [main, develop]
pull_request:
branches: [main, develop]
repository_dispatch:
types: [ok-to-test-command]

jobs:
trusted-build:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set int-bot SSH key
run: |
touch /tmp/ssh-key
echo "${{ secrets.INT_BOT_SSH_KEY }}" > /tmp/ssh-key
chmod 400 /tmp/ssh-key
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
- name: Checkout code
uses: actions/checkout@v2
- name: setup
run: |
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
npm install -g npm@latest
npm i
- name: linter
run: npm run lint
- name: test
run: npm run test
from-fork-build:
if:
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set int-bot SSH key
run: |
touch /tmp/ssh-key
echo "${{ secrets.INT_BOT_SSH_KEY }}" > /tmp/ssh-key
chmod 400 /tmp/ssh-key
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: setup
run: |
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
npm install -g npm@latest
npm i
- name: linter
run: npm run lint
- name: test
run: npm run test
# Update check run
- uses: actions/github-script@v5
id: update-check-run
if: ${{ always() }}
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pull } = await github.rest.pulls.get({
...context.repo,
pull_number: process.env.number
});
const ref = pull.head.sha;
const { data: checks } = await github.rest.checks.listForRef({
...context.repo,
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return result;
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: setup
run: |
npm install -g npm@latest
npm i
- name: linter
run: npm run lint
- name: test
run: npm run test
22 changes: 0 additions & 22 deletions .github/workflows/ok-to-test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions compiled-contracts/FflonkVerifier.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/verifiers/FflonkVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ contract FflonkVerifier {
uint256 constant w8_7 = 8613538655231327379234925296132678673308827349856085326283699237864372525723;

// Verifier preprocessed input C_0(x)·[1]_1
uint256 constant C0x = 10330861150616913541207360924312278787207684679419670167996002791305440821704;
uint256 constant C0y = 14244524222232642134204580826860575549922689127759263461569792153452315036880;
uint256 constant C0x = 7436841426934271843999872946312645822871802402068881571108027575346498207286;
uint256 constant C0y = 18448034242258174646222819724328439025708531082946938915005051387020977719791;

// Verifier preprocessed input x·[1]_2
uint256 constant X2x1 = 21831381940315734285607113342023901060522397560371972897001948545212302161822;
Expand Down
4 changes: 2 additions & 2 deletions docker/scripts/deploy_parameters_docker.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"realVerifier": false,
"trustedSequencerURL": "http://cdk-validium-json-rpc:8123",
"trustedSequencerURL": "http://zkevm-json-rpc:8123",
"networkName": "cdk-validium",
"version":"0.0.1",
"trustedSequencer":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"chainID": 1001,
"trustedAggregator":"0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"trustedAggregatorTimeout": 604799,
"pendingStateTimeout": 604799,
"forkID": 5,
"forkID": 6,
"admin":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"cdkValidiumOwner": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"timelockAddress": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
Expand Down