Skip to content

Commit 0328fc3

Browse files
committed
Merge branch 'main' into chore/rename-clarity-snarky
2 parents 425dbd3 + 4b73037 commit 0328fc3

File tree

20 files changed

+1501
-161
lines changed

20 files changed

+1501
-161
lines changed

.github/actions/build/action.yml

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,21 @@ permissions:
55
contents: write
66

77
inputs:
8-
cache_id:
9-
required: true
10-
nar_secret:
11-
required: true
12-
gcp_secret:
13-
required: true
8+
proof_systems_commit:
9+
description: 'proof_systems commit to use'
10+
required: false
11+
default: ''
1412

1513
runs:
1614
using: "composite"
1715
steps:
18-
- name: Install zstd if needed
19-
shell: bash
20-
run: command -v unzstd || (sudo apt-get update && sudo apt-get install -y zstd)
2116
- uses: nixbuild/nix-quick-install-action@v30
2217
continue-on-error: true
2318
with:
2419
nix_conf: |
2520
keep-env-derivations = true
2621
keep-outputs = true
27-
28-
- name: Fallback to persistant nix
29-
# only available on some runners
30-
shell: bash
31-
run: command -v nix || echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
32-
22+
require-sigs = false
3323
- name: Disable smudging
3424
shell: bash
3525
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV
@@ -38,32 +28,31 @@ runs:
3828
with:
3929
node-version: '20'
4030

31+
- name: use proof_systems_commit if provided
32+
if: ${{ inputs.proof_systems_commit != '' }}
33+
shell: bash
34+
run: |
35+
git -C src/mina/src/lib/crypto/proof-systems fetch origin ${{ inputs.proof_systems_commit }}
36+
git -C src/mina/src/lib/crypto/proof-systems clean -fdx
37+
git -C src/mina/src/lib/crypto/proof-systems checkout ${{ inputs.proof_systems_commit }}
38+
git -C src/mina/src/lib/crypto/proof-systems clean -fdx
39+
git -C src/mina add src/lib/crypto/proof-systems
40+
4141
- name: cache bindings
4242
uses: actions/cache@v4
4343
id: bindings-cache
4444
with:
4545
path: |
4646
src/bindings/compiled
4747
src/bindings/mina-transaction/gen
48-
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}
49-
48+
key: bindings-${{ github.event.pull_request.head.sha || github.sha }}-${{ inputs.proof_systems_commit }}
5049
- name: Build the o1js bindings
51-
if: steps.bindings-cache.outputs.cache-hit != 'true'
52-
env:
53-
AWS_ACCESS_KEY_ID: ${{ inputs.cache_id }}
54-
AWS_SECRET_ACCESS_KEY: ${{ inputs.gcp_secret }}
50+
if: ${{ steps.bindings-cache.outputs.cache-hit != 'true' }}
5551
shell: bash
5652
run: |
5753
set -Eeu
5854
./pin.sh
59-
nix build o1js#bindings --accept-flake-config
60-
temp_key=$(mktemp)
61-
echo ${{ inputs.nar_secret }} > "$temp_key"
62-
nix store sign --key-file "$temp_key" --recursive ./result
63-
nix copy --to "s3://mina-nix-cache?endpoint=https://storage.googleapis.com" $(nix path-info ./result)
6455
nix run o1js#generate-bindings --max-jobs auto
65-
rm "$temp_key"
66-
6756
- name: Cache dependencies and build
6857
uses: actions/cache@v4
6958
id: cache
@@ -73,15 +62,14 @@ runs:
7362
node_modules
7463
dist
7564
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.ts', '**/*.js') }}
76-
7765
- name: Build examples
78-
if: steps.cache.outputs.cache-hit != 'true'
66+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
7967
shell: bash
8068
run: |
8169
npm ci
8270
npm run build:examples
8371
- name: Build o1js clean
84-
if: steps.cache.outputs.cache-hit != 'true'
72+
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
8573
shell: bash
8674
run: |
8775
rm -fr dist

.github/actions/upload/action.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,22 @@ runs:
1616
steps:
1717
- name: Build
1818
uses: ./.github/actions/build
19-
with:
20-
cache_id: ${{ inputs.cache_id }}
21-
nar_secret: ${{ inputs.nar_secret }}
22-
gcp_secret: ${{ inputs.gcp_secret }}
23-
19+
- name: Build the o1js bindings
20+
if: steps.bindings-cache.outputs.cache-hit != 'true'
21+
env:
22+
AWS_ACCESS_KEY_ID: ${{ inputs.cache_id }}
23+
AWS_SECRET_ACCESS_KEY: ${{ inputs.gcp_secret }}
24+
shell: bash
25+
run: |
26+
set -Eeu
27+
./pin.sh
28+
nix build o1js#bindings --accept-flake-config
29+
temp_key=$(mktemp)
30+
echo ${{ inputs.nar_secret }} > "$temp_key"
31+
nix store sign --key-file "$temp_key" --recursive ./result
32+
outs=$(nix-store --query --requisites --include-outputs $(nix path-info --derivation ./result))
33+
nix copy --to "s3://mina-nix-cache?endpoint=https://storage.googleapis.com" $outs
34+
rm "$temp_key"
2435
- name: generate tar
2536
shell: bash
2637
run: |

.github/workflows/checks.yml

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,26 @@ on:
66
- develop
77
- v1
88
- v3
9-
pull_request:
10-
workflow_dispatch: {}
9+
pull_request: {}
10+
workflow_dispatch:
11+
inputs:
12+
proof_systems_commit:
13+
description: 'proof_systems commit to use'
14+
required: false
15+
default: ''
16+
workflow_call:
17+
inputs:
18+
proof_systems_commit:
19+
description: 'proof_systems commit to use'
20+
required: false
21+
type: string
22+
default: ''
23+
target_repo:
24+
required: false
25+
type: string
26+
target_ref:
27+
required: false
28+
type: string
1129

1230
concurrency:
1331
group: ${{ github.workflow }}-${{ github.ref }}
@@ -18,18 +36,20 @@ permissions:
1836

1937
jobs:
2038
Prepare:
21-
runs-on: self-hosted
39+
runs-on: ubuntu-latest
2240
steps:
2341
- name: Checkout repository with submodules
2442
uses: actions/checkout@v4
2543
with:
2644
submodules: recursive
45+
repository: ${{ inputs.target_repo || github.repository }}
46+
ref: ${{ inputs.target_ref || github.ref }}
2747
- name: Build
2848
uses: ./.github/actions/build
2949
with:
30-
cache_id: ${{ secrets.NIX_CACHE_GCP_ID }}
31-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
32-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
50+
repository: ${{ inputs.target_repo || github.repository }}
51+
ref: ${{ inputs.target_ref || github.ref }}
52+
proof_systems_commit: ${{ inputs.proof_systems_commit }}
3353

3454
Lint-Format-and-TypoCheck:
3555
strategy:
@@ -41,6 +61,9 @@ jobs:
4161
steps:
4262
- name: Checkout Repository
4363
uses: actions/checkout@v4
64+
with:
65+
repository: ${{ inputs.target_repo || github.repository }}
66+
ref: ${{ inputs.target_ref || github.ref }}
4467
- name: Setup Node.JS ${{ matrix.node }}
4568
uses: actions/setup-node@v4
4669
with:
@@ -85,16 +108,18 @@ jobs:
85108

86109
Upload-bindings:
87110
name: upload bindings artifact
88-
needs: [Prepare]
89-
runs-on: self-hosted
111+
if: ${{ inputs.proof_systems_commit == '' }}
112+
runs-on: ubuntu-latest
90113
steps:
91114
- uses: actions/checkout@v4
92115
with:
93116
submodules: recursive
117+
repository: ${{ inputs.target_repo || github.repository }}
118+
ref: ${{ inputs.target_ref || github.ref }}
94119
- name: upload
95120
uses: ./.github/actions/upload
96121
with:
97-
cache_id: ${{ secrets.NIX_CACHE_ID }}
122+
cache_id: ${{ secrets.NIX_CACHE_GCP_ID }}
98123
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
99124
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
100125

@@ -121,13 +146,15 @@ jobs:
121146
uses: actions/checkout@v4
122147
with:
123148
submodules: recursive
149+
repository: ${{ inputs.target_repo || github.repository }}
150+
ref: ${{ inputs.target_ref || github.ref }}
124151

125152
- name: build
126153
uses: ./.github/actions/build
127154
with:
128-
cache_id: ${{ secrets.NIX_CACHE_ID }}
129-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
130-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
155+
repository: ${{ inputs.target_repo || github.repository }}
156+
ref: ${{ inputs.target_ref || github.ref }}
157+
proof_systems_commit: ${{ inputs.proof_systems_commit }}
131158
- name: Prepare for tests
132159
run: touch profiling.md
133160
- name: Execute tests
@@ -154,12 +181,14 @@ jobs:
154181
uses: actions/checkout@v4
155182
with:
156183
submodules: recursive
184+
repository: ${{ inputs.target_repo || github.repository }}
185+
ref: ${{ inputs.target_ref || github.ref }}
157186
- name: build
158187
uses: ./.github/actions/build
159188
with:
160-
cache_id: ${{ secrets.NIX_CACHE_ID }}
161-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
162-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
189+
repository: ${{ inputs.target_repo || github.repository }}
190+
ref: ${{ inputs.target_ref || github.ref }}
191+
proof_systems_commit: ${{ inputs.proof_systems_commit }}
163192
- name: Count tests
164193
id: count_tests
165194
run: |
@@ -291,12 +320,15 @@ jobs:
291320
steps:
292321
- name: Checkout repository
293322
uses: actions/checkout@v4
323+
with:
324+
repository: ${{ inputs.target_repo || github.repository }}
325+
ref: ${{ inputs.target_ref || github.ref }}
294326
- name: build
295327
uses: ./.github/actions/build
296328
with:
297-
cache_id: ${{ secrets.NIX_CACHE_ID }}
298-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
299-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
329+
repository: ${{ inputs.target_repo || github.repository }}
330+
ref: ${{ inputs.target_ref || github.ref }}
331+
proof_systems_commit: ${{ inputs.proof_systems_commit }}
300332
- name: Use shared steps for live testing jobs
301333
uses: ./.github/actions/live-tests-shared
302334
with:
@@ -323,12 +355,15 @@ jobs:
323355
steps:
324356
- name: Checkout repository
325357
uses: actions/checkout@v4
358+
with:
359+
repository: ${{ inputs.target_repo || github.repository }}
360+
ref: ${{ inputs.target_ref || github.ref }}
326361
- name: build
327362
uses: ./.github/actions/build
328363
with:
329-
cache_id: ${{ secrets.NIX_CACHE_ID }}
330-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
331-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
364+
repository: ${{ inputs.target_repo || github.repository }}
365+
ref: ${{ inputs.target_ref || github.ref }}
366+
proof_systems_commit: ${{ inputs.proof_systems_commit }}
332367
- name: Use shared steps for live testing jobs
333368
uses: ./.github/actions/live-tests-shared
334369
with:

.github/workflows/nightly.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/pull_requests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ jobs:
1515

1616
Check-npm-deps:
1717
name: Check npmDepsHash is correct
18-
runs-on: [sdk-self-hosted-linux-amd64-build-system]
18+
runs-on: ubuntu-latest
1919
steps:
20-
- name: Set up Nix
21-
run: echo "PATH=$PATH:/nix/var/nix/profiles/default/bin" >> $GITHUB_ENV
2220
- name: Disable smudging
2321
run: echo "GIT_LFS_SKIP_SMUDGE=1" >> $GITHUB_ENV
2422
- uses: actions/checkout@v4
2523
with:
2624
submodules: recursive
25+
- uses: nixbuild/nix-quick-install-action@v30
26+
continue-on-error: true
27+
with:
28+
nix_conf: |
29+
keep-env-derivations = true
30+
keep-outputs = true
31+
require-sigs = false
2732
- name: fix npmDepsHash
2833
run: |
2934
set -Eeu

.github/workflows/push_main.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ jobs:
8585
node-version: ${{ matrix.node }}
8686
- name: build
8787
uses: ./.github/actions/build
88-
with:
89-
cache_id: ${{ secrets.NIX_CACHE_ID }}
90-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
91-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
9288
- name: Build o1js and mina-signer
9389
run: |
9490
npm run prepublishOnly
@@ -108,27 +104,6 @@ jobs:
108104
env:
109105
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
110106

111-
112-
Gc-root-bindings:
113-
name: add a gc root for the latest bindings build
114-
if: github.ref == 'refs/heads/main'
115-
runs-on: [sdk-self-hosted-linux-amd64-build-system]
116-
steps:
117-
- uses: actions/checkout@v4
118-
with:
119-
submodules: recursive
120-
121-
- name: build
122-
uses: ./.github/actions/build
123-
with:
124-
cache_id: ${{ secrets.NIX_CACHE_ID }}
125-
nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }}
126-
gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }}
127-
- name: add build to gc-root if on main
128-
run: |
129-
nix build o1js#o1js-bindings --out-link /home/app/actions-runner/nix-cache/main-bindings-gcroot
130-
131-
132107
Release-on-NPM:
133108
if: github.ref == 'refs/heads/main'
134109
timeout-minutes: 180

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1717

1818
## [Unreleased](https://github.com/o1-labs/o1js/compare/4e23a60...HEAD)
1919

20+
### Added
21+
22+
- [PR! 1905](https://github.com/o1-labs/o1js/pull/1905) API support for circuit chunking
23+
- still requires memory optimizations to be fully functional, and
24+
- proof-systems version still needs to be updated to include [this commit](https://github.com/o1-labs/proof-systems/pull/3222/commits/8c37c293f8159eed3676964ba47fc5dc0ae6ea1e)
25+
- that fixed the zero knowledge rows mismatch across Kimchi WASM bindings
26+
2027
## [2.5.0](https://github.com/o1-labs/o1js/compare/6ff7f8470a...4e23a60)
2128

2229
### Fixed
@@ -25,6 +32,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2532

2633
### Added
2734

35+
- [PR !1848](https://github.com/o1-labs/o1js/pull/1848) Dynamic array provable type
36+
2837
- [PR !2076](https://github.com/o1-labs/o1js/pull/2076)
2938
- o1js-bindings is no longer a submodule (same directory structure)
3039
- compiled artifacts are now gitignored

0 commit comments

Comments
 (0)