Skip to content

Commit f9416c9

Browse files
authored
Merge branch 'main' into 2025-10-pkg-pr-releases
2 parents 560a0a3 + 3756ff5 commit f9416c9

File tree

82 files changed

+2780
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2780
-482
lines changed

.config/cspell.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// Version of the setting file. Always 0.2
3+
"version": "0.2",
4+
// language - current active spelling language
5+
"language": "en",
6+
// words - list of words to be always considered correct
7+
"words": ["tarides", "nixbuild", "stefanzweifel", "ACMRT", "Oxlint"],
8+
// flagWords - list of words to be always considered incorrect
9+
// This is useful for offensive words and common spelling errors.
10+
// For example "hte" should be "the"
11+
"flagWords": []
12+
}

.github/workflows/checks.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ jobs:
3838
Prepare:
3939
runs-on: ubuntu-latest
4040
steps:
41+
- name: Free space on runner
42+
run: |
43+
df -h
44+
sudo rm -rf /usr/local/lib/android \
45+
/usr/share/dotnet \
46+
/opt/ghc \
47+
"$AGENT_TOOLSDIRECTORY" || true
48+
docker system prune -af --volumes || true
49+
df -h
4150
- name: Checkout repository with submodules
4251
uses: actions/checkout@v4
4352
with:
@@ -51,7 +60,7 @@ jobs:
5160
ref: ${{ inputs.target_ref || github.ref }}
5261
proof_systems_commit: ${{ inputs.proof_systems_commit }}
5362

54-
Lint-Format-and-TypoCheck:
63+
Lint-and-Format:
5564
strategy:
5665
matrix:
5766
node: [20]
@@ -99,21 +108,20 @@ jobs:
99108
- name: Run Markdown Format Check
100109
run: npm run format:md:check
101110

102-
- name: Run codespell
103-
if: steps.get_changed_files.outputs.files_changed == 'true' && github.event.pull_request.labels.*.name != 'no-typo-check'
104-
uses: codespell-project/actions-codespell@master
105-
with:
106-
check_filenames: true
107-
path: ${{ steps.get_changed_files.outputs.files }}
108-
skip: "*.json,./node_modules,./dist,./.husky,./.git,./src/mina/**/*,./src/bindings/compiled/**/*"
109-
check_hidden: false
110-
ignore_words_list: "tHi,modul,optin,deriver,PRing,toWords,iSelf"
111-
112111
Upload-bindings:
113112
name: upload bindings artifact
114113
if: ${{ inputs.proof_systems_commit == '' }}
115114
runs-on: ubuntu-latest
116115
steps:
116+
- name: Free space on runner
117+
run: |
118+
df -h
119+
sudo rm -rf /usr/local/lib/android \
120+
/usr/share/dotnet \
121+
/opt/ghc \
122+
"$AGENT_TOOLSDIRECTORY" || true
123+
docker system prune -af --volumes || true
124+
df -h
117125
- uses: actions/checkout@v4
118126
with:
119127
submodules: recursive
@@ -143,6 +151,7 @@ jobs:
143151
'Verification Key Regression Check 1',
144152
'Verification Key Regression Check 2',
145153
'CommonJS test',
154+
'Cache Regression',
146155
]
147156
steps:
148157
- name: Checkout repository with submodules
@@ -158,6 +167,10 @@ jobs:
158167
repository: ${{ inputs.target_repo || github.repository }}
159168
ref: ${{ inputs.target_ref || github.ref }}
160169
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 }}'
161174
- name: Prepare for tests
162175
run: touch profiling.md
163176
- name: Execute tests

.github/workflows/pull_requests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,56 @@ jobs:
4747
with:
4848
commit_message: "auto update npmDepsHash"
4949
file_pattern: "npmDepsHash"
50+
51+
52+
Lint-Format-and-TypoCheck:
53+
if: github.event.pull_request.labels.*.name != 'skip-lint'
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- name: Checkout Repository
58+
uses: actions/checkout@v4
59+
with:
60+
fetch-depth: 1
61+
62+
- name: Setup Node.JS
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: 22
66+
67+
- name: Install Dependencies
68+
run: npm ci
69+
70+
- name: Get changed files
71+
id: changed_files
72+
run: |
73+
git fetch --depth=1 origin ${{ github.event.pull_request.base.sha }}
74+
git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
75+
git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} > changed_files.txt
76+
TOTAL=$(wc -l < changed_files.txt)
77+
echo "count=$TOTAL" >> $GITHUB_OUTPUT
78+
79+
- name: Run Prettier Check
80+
if: steps.changed_files.outputs.count > 0
81+
run: xargs npm run format:check < changed_files.txt
82+
continue-on-error: true
83+
84+
- name: Run Oxlint
85+
if: steps.changed_files.outputs.count > 0
86+
run: xargs npm run lint:strict < changed_files.txt
87+
continue-on-error: true
88+
89+
- name: Run Markdown Format Check
90+
run: npm run format:md:check
91+
continue-on-error: true
92+
93+
- name: Run cspell
94+
if: github.event.pull_request.labels.*.name != 'no-typo-check'
95+
uses: streetsidesoftware/cspell-action@v7
96+
continue-on-error: true
97+
with:
98+
config: .config/cspell.json
99+
100+
- name: Fail if any checks fail
101+
if: failure()
102+
run: echo "Some checks failed, failing" && exit 1

.github/workflows/push_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Build o1js
9797
run: |
9898
npm ci
99-
npm run prepublishOnly
99+
npm run prepublish:full
100100
101101
- name: Publish to NPM if version has changed
102102
id: publish
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: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,45 @@ 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)
2020

21-
### Added
21+
## [2.10.0](https://github.com/o1-labs/o1js/compare/114acff...3453d1e53) - 2025-09-27
2222

23-
- Internal o1js and protocol constants, hashes and prefixes are now exported via
24-
the `Core´ namespace. https://github.com/o1-labs/o1js/pull/2421
23+
### Internal
2524

26-
## [2.9.0](https://github.com/o1-labs/o1js/compare/4b1dccdd...114acff) - 2025-09-02
25+
- Added a new internal framework for testing compilation, proving, and
26+
verification time regression. https://github.com/o1-labs/o1js/pull/2451
2727

2828
### Added
2929

30-
- Support for `ForeignField.Unsafe.fromField` as an alternative constructor
31-
https://github.com/o1-labs/o1js/pull/2322
32-
30+
- Internal o1js and protocol constants, hashes and prefixes are now exported via
31+
the `Core´ namespace. https://github.com/o1-labs/o1js/pull/2421
32+
- Support for string type input to `Transaction.fromJSON`
33+
https://github.com/o1-labs/o1js/pull/2436
3334
- Improved the runtime table API with a `RuntimeTable` class with better
34-
readability.
35+
readability https://github.com/o1-labs/o1js/pull/2402
36+
37+
### Fixed
38+
39+
- Fixed a verification key regression that was caused by incorrectly enabling a
40+
proof system feature that wasn't needed.
41+
https://github.com/o1-labs/o1js/pull/2449
42+
- Fixed an edge case where not all the artefacts needed for the cache were
43+
stored properly, resulting in them being re-computed after loading the cache.
44+
https://github.com/o1-labs/o1js/pull/2460
3545

3646
### Deprecated
3747

3848
- Deprecate the `Gates.addRuntimeTableConfig` and `Gadgets.inTable` functions in
39-
favor of the `RuntimeTable` class API.
49+
favor of the `RuntimeTable` class API
50+
https://github.com/o1-labs/o1js/pull/2402
51+
52+
## [2.9.0](https://github.com/o1-labs/o1js/compare/70bca22...2265adc) - 2025-09-02
53+
54+
### Added
55+
56+
- Support for `ForeignField.Unsafe.fromField` as an alternative constructor
57+
https://github.com/o1-labs/o1js/pull/2322
4058

4159
### Fixed
4260

README-dev.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Much like the mina repo, we use the nix registry to conveniently handle git
8383
submodules. You can enter the devshell with `./pin.sh` and
8484
`nix develop o1js#default` or by using direnv with the `.envrc` provided. This
8585
devshell provides all the dependencies required for npm scripts including
86-
`npm run build:update-bindings`.
86+
`npm run build:bindings-all`.
8787

8888
## Building Bindings
8989

@@ -112,7 +112,7 @@ for more information. After you have configured your environment to build mina,
112112
you can build the bindings:
113113

114114
```sh
115-
npm run build:update-bindings
115+
npm run build:bindings-all
116116
```
117117

118118
This command builds the OCaml and Rust artifacts and copies them to the
@@ -170,7 +170,8 @@ generated from the OCaml source files, and are located under
170170
`src/bindings/crypto/constants.ts` and `src/bindings/mina-transaction/gen`. When
171171
building the bindings, these constants are auto-generated by Dune. If you wish
172172
to add a new constant, you can edit the `src/bindings/ocaml/o1js_constants`
173-
file, and then run `npm run build:bindings` to regenerate the TypeScript files.
173+
file, and then run `npm run build:bindings-node` to regenerate the TypeScript
174+
files.
174175

175176
o1js uses these types to ensure that the constants used in the protocol are
176177
consistent with the OCaml source files.
@@ -419,7 +420,7 @@ npm link o1js
419420

420421
If you need to debug a call into the OCaml code, the process is a little more
421422
complicated. The OCaml is compiled into JavaScript with js_of_ocaml during
422-
`npm run build:update-bindings`, so you'll need to add your logs into the OCaml
423+
`npm run build:bindings-all`, so you'll need to add your logs into the OCaml
423424
code and rebuild the bindings to see them. Logging from OCaml in a way that will
424425
reflect as JS `console.log`s in the compiled code can be done like this:
425426

README-nix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ From within the shell, you can build o1js and update the bindings.
9797
9898
```console
9999
npm run build
100-
npm run build:update-bindings
100+
npm run build:bindings-all
101101
```
102102
103103
If you need to update the underlying `mina` code, you can also do so with Nix,

0 commit comments

Comments
 (0)