Skip to content

Commit 8143acb

Browse files
authored
Merge branch 'main' into 2025-10-rm-js-sha256
2 parents c57792c + b9fb71f commit 8143acb

Some content is hidden

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

69 files changed

+1959
-425
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
@@ -39,3 +39,56 @@ 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+
71+
- name: Run Prettier Check
72+
if: steps.changed_files.outputs.count > 0
73+
run: xargs npm run format:check < changed_files.txt
74+
continue-on-error: true
75+
76+
- name: Run Oxlint
77+
if: steps.changed_files.outputs.count > 0
78+
run: xargs npm run lint:strict < changed_files.txt
79+
continue-on-error: true
80+
81+
- name: Run Markdown Format Check
82+
run: npm run format:md:check
83+
continue-on-error: true
84+
85+
- name: Run cspell
86+
if: github.event.pull_request.labels.*.name != 'no-typo-check'
87+
uses: streetsidesoftware/cspell-action@v7
88+
continue-on-error: true
89+
with:
90+
config: .config/cspell.json
91+
92+
- name: Fail if any checks fail
93+
if: failure()
94+
run: echo "Some checks failed, failing" && exit 1

.github/workflows/push_main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ jobs:
8787
uses: ./.github/actions/build
8888
- name: Build o1js and mina-signer
8989
run: |
90-
npm run prepublishOnly
90+
npm run prepublish:full
9191
cd src/mina-signer
9292
npm ci
93-
npm run prepublishOnly
93+
npm run prepublish:full
9494
- name: Publish o1js and mina-signer on pkg-pr-new
9595
run: npx pkg-pr-new publish ./ ./src/mina-signer # Enable `--compact` once published to NPM with `repository` in package.json
9696

@@ -123,7 +123,7 @@ jobs:
123123
- name: Build o1js
124124
run: |
125125
npm ci
126-
npm run prepublishOnly
126+
npm run prepublish:full
127127
128128
- name: Publish to NPM if version has changed
129129
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: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,40 @@ 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

2325
- Internal o1js and protocol constants, hashes and prefixes are now exported via
2426
the `Core´ namespace. https://github.com/o1-labs/o1js/pull/2421
27+
- Support for string type input to `Transaction.fromJSON`
28+
https://github.com/o1-labs/o1js/pull/2436
29+
- Improved the runtime table API with a `RuntimeTable` class with better
30+
readability https://github.com/o1-labs/o1js/pull/2402
2531

26-
## [2.9.0](https://github.com/o1-labs/o1js/compare/4b1dccdd...114acff) - 2025-09-02
27-
28-
### Added
32+
### Fixed
2933

30-
- Support for `ForeignField.Unsafe.fromField` as an alternative constructor
31-
https://github.com/o1-labs/o1js/pull/2322
32-
33-
- Improved the runtime table API with a `RuntimeTable` class with better
34-
readability.
34+
- Fixed a verification key regression that was caused by incorrectly enabling a
35+
proof system feature that wasn't needed.
36+
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
39-
favor of the `RuntimeTable` class API.
44+
favor of the `RuntimeTable` class API
45+
https://github.com/o1-labs/o1js/pull/2402
46+
47+
## [2.9.0](https://github.com/o1-labs/o1js/compare/70bca22...2265adc) - 2025-09-02
48+
49+
### Added
50+
51+
- Support for `ForeignField.Unsafe.fromField` as an alternative constructor
52+
https://github.com/o1-labs/o1js/pull/2322
4053

4154
### Fixed
4255

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)