Skip to content

Commit 4226578

Browse files
committed
Merge branch 'shigoto/performance-regression-framework' into shigoto/performance-regression-migrate-tests
2 parents bcb41ef + fc0ec8f commit 4226578

36 files changed

+766
-442
lines changed

.github/workflows/checks.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
ref: ${{ inputs.target_ref || github.ref }}
6161
proof_systems_commit: ${{ inputs.proof_systems_commit }}
6262

63-
Lint-Format-and-TypoCheck:
63+
Lint-and-Format:
6464
strategy:
6565
matrix:
6666
node: [20]
@@ -108,16 +108,6 @@ jobs:
108108
- name: Run Markdown Format Check
109109
run: npm run format:md:check
110110

111-
- name: Run codespell
112-
if: steps.get_changed_files.outputs.files_changed == 'true' && github.event.pull_request.labels.*.name != 'no-typo-check'
113-
uses: codespell-project/actions-codespell@master
114-
with:
115-
check_filenames: true
116-
path: ${{ steps.get_changed_files.outputs.files }}
117-
skip: "*.json,./node_modules,./dist,./.husky,./.git,./src/mina/**/*,./src/bindings/compiled/**/*"
118-
check_hidden: false
119-
ignore_words_list: "tHi,modul,optin,deriver,PRing,toWords,iSelf"
120-
121111
Upload-bindings:
122112
name: upload bindings artifact
123113
if: ${{ inputs.proof_systems_commit == '' }}
@@ -161,6 +151,7 @@ jobs:
161151
'Verification Key Regression Check 1',
162152
'Verification Key Regression Check 2',
163153
'CommonJS test',
154+
'Cache Regression',
164155
]
165156
steps:
166157
- name: Checkout repository with submodules
@@ -176,6 +167,10 @@ jobs:
176167
repository: ${{ inputs.target_repo || github.repository }}
177168
ref: ${{ inputs.target_ref || github.ref }}
178169
proof_systems_commit: ${{ inputs.proof_systems_commit }}
170+
- uses: 'google-github-actions/auth@v3'
171+
name: Setup gcloud authentication
172+
with:
173+
credentials_json: '${{ secrets.GCP_O1JS_CI_BUCKET_SERVICE_ACCOUNT_KEY }}'
179174
- name: Prepare for tests
180175
run: touch profiling.md
181176
- name: Execute tests

.github/workflows/pull_requests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,42 @@ jobs:
3939
with:
4040
commit_message: "auto update npmDepsHash"
4141
file_pattern: "npmDepsHash"
42+
43+
44+
Lint-and-Format:
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
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/",

.prettierrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ module.exports = {
1313
},
1414
},
1515
],
16+
plugins: [require.resolve('prettier-plugin-organize-imports')],
1617
};

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ 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

25+
- Added a new internal framework for testing proving and compilation time
26+
regression. https://github.com/o1-labs/o1js/pull/2451
2327
- Internal o1js and protocol constants, hashes and prefixes are now exported via
2428
the `Core´ namespace. https://github.com/o1-labs/o1js/pull/2421
2529
- Support for string type input to `Transaction.fromJSON`
@@ -32,14 +36,17 @@ This project adheres to
3236
- Fixed a verification key regression that was caused by incorrectly enabling a
3337
proof system feature that wasn't needed.
3438
https://github.com/o1-labs/o1js/pull/2449
39+
- Fixed an edge case where not all the artefacts needed for the cache were
40+
stored properly, resulting in them being re-computed after loading the cache.
41+
https://github.com/o1-labs/o1js/pull/2460
3542

3643
### Deprecated
3744

3845
- Deprecate the `Gates.addRuntimeTableConfig` and `Gadgets.inTable` functions in
3946
favor of the `RuntimeTable` class API
4047
https://github.com/o1-labs/o1js/pull/2402
4148

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

4451
### Added
4552

npmDepsHash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sha256-x44xLfNO8RQpMnlWFlOk/cvWd7264mWxpbWQaTCaFms=
1+
sha256-ww0EdkEWiciR6XLTu2/lfqtDMbvIDBLj+gyPH+lpLTE=

package-lock.json

Lines changed: 28 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: 7 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,20 +94,21 @@
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",
107107
"minimist": "^1.2.7",
108108
"oxlint": "^1.0.0",
109109
"pkg-pr-new": "^0.0.9",
110110
"prettier": "^3.6.2",
111+
"prettier-plugin-organize-imports": "^4.3.0",
111112
"replace-in-file": "^6.3.5",
112113
"rimraf": "^3.0.2",
113114
"ts-jest": "^28.0.8",

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

0 commit comments

Comments
 (0)