Skip to content

Commit 6428e5e

Browse files
Merge pull request #2544 from o1-labs/leon/develop-from-main
fix: merge conflict between develop and main
2 parents 26c9941 + 6f43672 commit 6428e5e

File tree

217 files changed

+7850
-4315
lines changed

Some content is hidden

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

217 files changed

+7850
-4315
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/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 10
9+
reviewers:
10+
- "o1-labs/o1js-admins"
11+
labels:
12+
- "dependencies"
13+
- "javascript"
14+
groups:
15+
production-dependencies:
16+
dependency-type: "production"
17+
development-dependencies:
18+
dependency-type: "development"
19+
commit-message:
20+
prefix: "npm"
21+
include: "scope"
22+
23+
# Enable version updates for GitHub Actions
24+
- package-ecosystem: "github-actions"
25+
directory: "/"
26+
schedule:
27+
interval: "weekly"
28+
open-pull-requests-limit: 5
29+
reviewers:
30+
- "o1-labs/o1js-admins"
31+
labels:
32+
- "dependencies"
33+
- "github-actions"
34+
commit-message:
35+
prefix: "github-actions"
36+
include: "scope"

.github/workflows/checks.yml

Lines changed: 26 additions & 10 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]
@@ -96,21 +105,23 @@ jobs:
96105
if: steps.get_changed_files.outputs.files_changed == 'true'
97106
run: xargs npm run lint:strict < changed_files.txt
98107

99-
- name: Run codespell
100-
if: steps.get_changed_files.outputs.files_changed == 'true' && github.event.pull_request.labels.*.name != 'no-typo-check'
101-
uses: codespell-project/actions-codespell@master
102-
with:
103-
check_filenames: true
104-
path: ${{ steps.get_changed_files.outputs.files }}
105-
skip: "*.json,./node_modules,./dist,./.husky,./.git,./src/mina/**/*,./src/bindings/compiled/**/*"
106-
check_hidden: false
107-
ignore_words_list: "tHi,modul,optin,deriver,PRing,toWords,iSelf"
108+
- name: Run Markdown Format Check
109+
run: npm run format:md:check
108110

109111
Upload-bindings:
110112
name: upload bindings artifact
111113
if: ${{ inputs.proof_systems_commit == '' }}
112114
runs-on: ubuntu-latest
113115
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
114125
- uses: actions/checkout@v4
115126
with:
116127
submodules: recursive
@@ -140,6 +151,7 @@ jobs:
140151
'Verification Key Regression Check 1',
141152
'Verification Key Regression Check 2',
142153
'CommonJS test',
154+
'Cache Regression',
143155
]
144156
steps:
145157
- name: Checkout repository with submodules
@@ -155,6 +167,10 @@ jobs:
155167
repository: ${{ inputs.target_repo || github.repository }}
156168
ref: ${{ inputs.target_ref || github.ref }}
157169
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 }}'
158174
- name: Prepare for tests
159175
run: touch profiling.md
160176
- 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

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ fi
99
echo "⚠️ Husky pre-commit hook enabled. Disable it with: git config --unset husky.optin"
1010

1111
# Filter for diffed (excluding deleted) js and ts files, and format them according to oxlint and prettier rules
12-
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js)$' | xargs npm run lint:fix
13-
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js)$' | xargs npm run format
12+
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js|md)$' | xargs npm run lint:fix
13+
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js|md)$' | xargs npm run format

.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/",

.prettierignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ benchmark/
44
dist/
55
node_modules/
66
o1js-reference/
7-
src/bindings/
7+
src/bindings/compiled/
88
src/mina/
99
**/*.d.ts
10+
# These files are generated by proof-systems
11+
# no need to run prettier on it
12+
src/bindings/crypto/test-vectors/poseidon-kimchi.ts
13+
src/bindings/crypto/test-vectors/poseidon-legacy.ts

.prettierrc.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@ module.exports = {
44
semi: true,
55
singleQuote: true,
66
printWidth: 100,
7+
overrides: [
8+
{
9+
files: '*.md',
10+
options: {
11+
printWidth: 80,
12+
proseWrap: 'always',
13+
},
14+
},
15+
],
16+
plugins: [require.resolve('prettier-plugin-organize-imports')],
717
};

0 commit comments

Comments
 (0)