Skip to content

Commit d181a34

Browse files
authored
feat: v1.0.1 verifier (#2)
* feat: v1.0.1 verifier * test: add tests * chore: remove solady * feat: add consistency check workflow
1 parent e5d4eee commit d181a34

11 files changed

+3892
-2221
lines changed

.github/workflows/consistency.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: OpenVM Repo Consistency Check
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
checks:
12+
runs-on:
13+
- runs-on=${{ github.run_id }}
14+
- family=m7a.24xlarge
15+
- disk=large
16+
17+
steps:
18+
- name: Checkout current repo
19+
uses: actions/checkout@v4
20+
21+
- name: Install solc # svm should support arm64 linux
22+
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.19 && solc --version
23+
24+
- name: Clone openvm at tag
25+
run: |
26+
git clone https://github.com/openvm-org/openvm.git
27+
cd openvm
28+
git checkout feat/format-verifier
29+
30+
- name: Run openvm setup
31+
run: |
32+
cd openvm/crates
33+
cargo run --bin cargo-openvm openvm setup
34+
35+
- name: Install Foundry
36+
uses: foundry-rs/foundry-toolchain@v1
37+
38+
- name: Compare output to version folder
39+
run: |
40+
diff -r ~/.openvm/halo2/src/v1.0.1-rc.0 src/v1.0.1-rc.0 --exclude=verifier.bytecode.json
41+
42+
- name: Compare compiled bytecode in repo to verifier.bytecode.json
43+
run: |
44+
forge build --force
45+
diff <(jq -r '.bytecode.object | ltrimstr("0x")' out/OpenVmHalo2Verifier.sol/OpenVmHalo2Verifier.json) <(jq -r '.bytecode | ltrimstr("0x")' ~/.openvm/halo2/src/v1.0.1-rc.0/verifier.bytecode.json)

foundry.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ verbosity = 2
66
solc = "0.8.19"
77
optimizer = true
88
optimizer_runs = 100000
9-
evm_version = "cancun"
9+
evm_version = "paris"
1010
show_progress = true
11+
fs_permissions = [{ access = "read", path = "./test/v1.0.1/evm.proof"}]
1112

1213
[profile.default.optimizer_details]
1314
constantOptimizer = false
1415
yul = false
1516

1617
[fuzz]
17-
runs = 1000
18+
runs = 256
1819

1920
[fmt]
21+
sort_imports = true
2022
bracket_spacing = true
2123
int_types = "long"
2224
line_length = 120

remappings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
forge-std/=lib/forge-std/src/

0 commit comments

Comments
 (0)