Skip to content

Commit ba9e665

Browse files
committed
Merge branch 'main' into shigoto/performance-regression-framework
2 parents 30b46a3 + 8f3edef commit ba9e665

26 files changed

+523
-144
lines changed

.github/workflows/checks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ jobs:
161161
'Verification Key Regression Check 1',
162162
'Verification Key Regression Check 2',
163163
'CommonJS test',
164+
'Cache Regression',
164165
]
165166
steps:
166167
- name: Checkout repository with submodules
@@ -176,6 +177,10 @@ jobs:
176177
repository: ${{ inputs.target_repo || github.repository }}
177178
ref: ${{ inputs.target_ref || github.ref }}
178179
proof_systems_commit: ${{ inputs.proof_systems_commit }}
180+
- uses: 'google-github-actions/auth@v3'
181+
name: Setup gcloud authentication
182+
with:
183+
credentials_json: '${{ secrets.GCP_O1JS_CI_BUCKET_SERVICE_ACCOUNT_KEY }}'
179184
- name: Prepare for tests
180185
run: touch profiling.md
181186
- name: Execute tests

.github/workflows/pull_requests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,52 @@ jobs:
3939
with:
4040
commit_message: "auto update npmDepsHash"
4141
file_pattern: "npmDepsHash"
42+
43+
44+
Lint-Format-and-TypoCheck:
45+
if: github.event.pull_request.labels.*.name != 'skip-lint'
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- name: Checkout Repository
50+
uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 1
53+
54+
- name: Setup Node.JS
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: 22
58+
59+
- name: Install Dependencies
60+
run: npm ci
61+
62+
- name: Get changed files
63+
id: changed_files
64+
run: |
65+
git fetch --depth=1 origin ${{ github.event.pull_request.base.sha }}
66+
git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
67+
git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} > changed_files.txt
68+
TOTAL=$(wc -l < changed_files.txt)
69+
echo "count=$TOTAL" >> $GITHUB_OUTPUT
70+
echo "files=$(cat changed_files.txt | xargs)" >> $GITHUB_OUTPUT
71+
- name: Run Prettier Check
72+
if: steps.changed_files.outputs.count > 0
73+
run: xargs npm run format:check < changed_files.txt
74+
75+
- name: Run Oxlint
76+
if: steps.changed_files.outputs.count > 0
77+
run: xargs npm run lint:strict < changed_files.txt
78+
79+
- name: Run Markdown Format Check
80+
run: npm run format:md:check
81+
82+
- name: Run codespell
83+
if: github.event.pull_request.labels.*.name != 'no-typo-check'
84+
uses: codespell-project/actions-codespell@v2
85+
with:
86+
check_filenames: true
87+
path: ${{ steps.changed_files.outputs.files }}
88+
skip: "*.json,./node_modules,./dist,./.husky,./.git,./src/mina/**/*,./src/bindings/compiled/**/*"
89+
check_hidden: false
90+
ignore_words_list: "tHi,modul,optin,deriver,PRing,toWords,iSelf"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Upload Cache Regressions Artifacts
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
upload-artifacts:
7+
name: Upload Cache Regressions Artifacts
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository with submodules
11+
uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
- name: Build
15+
uses: ./.github/actions/build
16+
- uses: 'google-github-actions/auth@v3'
17+
name: Setup gcloud authentication
18+
with:
19+
credentials_json: '${{ secrets.GCP_O1JS_CI_BUCKET_SERVICE_ACCOUNT_KEY }}'
20+
- name: Generate artifacts and upload to GS
21+
run: ./scripts/tests/dump-cache-regressions.sh

.oxlintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"extends": "oxlint/recommended",
2+
"extends": ["oxlint/recommended"],
33
"rules": {
44
"erasing-op": "off",
55
"no-new-array": "off",
66
"no-this-alias": "off",
77
"no-unsafe-finally": "off",
88
"no-unused-labels": "off",
99
"no-useless-escape": "off",
10-
"no-wrapper-object-types": "off"
10+
"no-wrapper-object-types": "off",
11+
"no-unused-vars": "off"
1112
},
1213
"ignorePatterns": [
1314
"_build/",

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ This project adheres to
1616
_Security_ in case of vulnerabilities.
1717
-->
1818

19-
## [Unreleased](https://github.com/o1-labs/o1js/compare/114acff...HEAD)
19+
## [Unreleased](https://github.com/o1-labs/o1js/compare/3453d1e53...HEAD)
20+
21+
## [2.10.0](https://github.com/o1-labs/o1js/compare/114acff...3453d1e53) - 2025-09-27
2022

2123
### Added
2224

@@ -32,14 +34,17 @@ This project adheres to
3234
- Fixed a verification key regression that was caused by incorrectly enabling a
3335
proof system feature that wasn't needed.
3436
https://github.com/o1-labs/o1js/pull/2449
37+
- Fixed an edge case where not all the artefacts needed for the cache were
38+
stored properly, resulting in them being re-computed after loading the cache.
39+
https://github.com/o1-labs/o1js/pull/2460
3540

3641
### Deprecated
3742

3843
- Deprecate the `Gates.addRuntimeTableConfig` and `Gadgets.inTable` functions in
3944
favor of the `RuntimeTable` class API
4045
https://github.com/o1-labs/o1js/pull/2402
4146

42-
## [2.9.0](https://github.com/o1-labs/o1js/compare/4b1dccdd...114acff) - 2025-09-02
47+
## [2.9.0](https://github.com/o1-labs/o1js/compare/70bca22...2265adc) - 2025-09-02
4348

4449
### Added
4550

npmDepsHash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sha256-x44xLfNO8RQpMnlWFlOk/cvWd7264mWxpbWQaTCaFms=
1+
sha256-hvRlb/ZgfEnSW+OJG4UibamdL5UzygQQthMpUqh2W0w=

package-lock.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "o1js",
33
"description": "TypeScript framework for zk-SNARKs and zkApps",
4-
"version": "2.9.0",
4+
"version": "2.10.0",
55
"license": "Apache-2.0",
66
"homepage": "https://github.com/o1-labs/o1js/",
77
"repository": {
@@ -57,7 +57,7 @@
5757
"build:web": "./scripts/build/build-web.sh",
5858
"build:examples": "./scripts/build/build-examples.sh",
5959
"check:bindings": "./scripts/build/check-for-bindings.sh",
60-
"build:docs": "npx typedoc",
60+
"build:docs": "typedoc",
6161
"prepublish:web": "./scripts/prepublish/prepublish-web.sh",
6262
"prepublish:node": "./scripts/prepublish/prepublish-node.sh",
6363
"prepublish:full": "./scripts/prepublish/prepublish-full.sh",
@@ -71,9 +71,9 @@
7171
"format:md:check": "prettier --config .prettierrc.md.cjs --check '**/*.md'",
7272
"clean": "./scripts/clean/clean.sh",
7373
"clean:all": "./scripts/clean/clean-all.sh",
74-
"lint": "npx oxlint",
75-
"lint:fix": "npx oxlint --fix --fix-suggestions",
76-
"lint:strict": "npx oxlint --max-warnings 0",
74+
"lint": "oxlint",
75+
"lint:fix": "oxlint --fix --fix-suggestions",
76+
"lint:strict": "oxlint --max-warnings 0",
7777
"test": "./run-jest-tests.sh",
7878
"test:integration": "./run-integration-tests.sh",
7979
"test:unit": "./run-unit-tests.sh",
@@ -94,13 +94,13 @@
9494
"@playwright/test": "^1.48.0",
9595
"@types/jest": "^27.0.0",
9696
"@types/libsodium-wrappers-sumo": "^0.7.8",
97+
"@types/minimist": "^1.2.5",
9798
"@types/node": "^18.14.2",
9899
"esbuild": "^0.25.5",
99100
"expect": "^29.0.1",
100101
"fs-extra": "^10.0.0",
101102
"glob": "^8.0.3",
102103
"graphql": "^16.10.0",
103-
"howslow": "^0.1.0",
104104
"husky": "^9.1.7",
105105
"jest": "^28.1.3",
106106
"jstat": "^1.9.6",

run-ci-tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ case $TEST_TYPE in
4949
node src/examples/commonjs.cjs
5050
;;
5151

52+
"Cache Regression")
53+
echo "Cache Regression"
54+
./scripts/tests/check-cache-regressions.sh
55+
;;
5256
*)
5357
echo "ERROR: Invalid environment variable, not clear what tests to run! $CI_NODE_INDEX"
5458
exit 1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -Eeuxo pipefail
3+
4+
source ./scripts/lib/ux.sh
5+
6+
# test cache regression packaging and unpackaging primitives here
7+
./run ./src/tests/cache/simple-regression.ts --bundle --mode dump --tarball ./tests/test-artifacts/cache/simple-regression.tar.gz
8+
9+
./run ./src/tests/cache/simple-regression.ts --bundle --mode check --tarball ./tests/test-artifacts/cache/simple-regression.tar.gz
10+
11+
# This pin is generated in ./dump-cache-regressions.sh
12+
ARTIFACT_PIN=2025-10-02T13:36:52-04:00
13+
14+
WORKDIR=tests/test-artifacts/cache/
15+
mkdir -p $WORKDIR
16+
17+
# Download all the artifacts into the workdir
18+
gcloud storage cp --recursive gs://o1js-ci/tests/cache/fixtures/$ARTIFACT_PIN/ $WORKDIR
19+
20+
WORKDIR=tests/test-artifacts/cache/$ARTIFACT_PIN
21+
22+
# Regression checks
23+
./run ./src/tests/cache/simple-regression.ts --bundle --mode check --tarball $WORKDIR/simple-regression.tar.gz
24+
./run ./src/tests/cache/complex-regression.ts --bundle --mode check --tarball $WORKDIR/complex-regression.tar.gz
25+
26+
echo "Artifacts checked successfully!"

0 commit comments

Comments
 (0)