Skip to content

Commit e7e5430

Browse files
committed
Merge branch 'shigoto/performance-regression-framework' into shigoto/performance-regression-migrate-tests
2 parents 9e2293b + 3f713c2 commit e7e5430

File tree

9 files changed

+258
-158
lines changed

9 files changed

+258
-158
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/pull_requests.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
file_pattern: "npmDepsHash"
4242

4343

44-
Lint-and-Format:
44+
Lint-Format-and-TypoCheck:
4545
if: github.event.pull_request.labels.*.name != 'skip-lint'
4646
runs-on: ubuntu-latest
4747

@@ -67,14 +67,28 @@ jobs:
6767
git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} > changed_files.txt
6868
TOTAL=$(wc -l < changed_files.txt)
6969
echo "count=$TOTAL" >> $GITHUB_OUTPUT
70-
echo "files=$(cat changed_files.txt | xargs)" >> $GITHUB_OUTPUT
70+
7171
- name: Run Prettier Check
7272
if: steps.changed_files.outputs.count > 0
7373
run: xargs npm run format:check < changed_files.txt
74+
continue-on-error: true
7475

7576
- name: Run Oxlint
7677
if: steps.changed_files.outputs.count > 0
7778
run: xargs npm run lint:strict < changed_files.txt
79+
continue-on-error: true
7880

7981
- name: Run Markdown Format Check
80-
run: npm run format:md: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

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ This project adheres to
2020

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

23+
### Internal
24+
25+
- Added a new internal framework for testing compilation, proving, and
26+
verification time regression. https://github.com/o1-labs/o1js/pull/2451
27+
2328
### Added
2429

25-
- Added a new internal framework for testing proving and compilation time
26-
regression. https://github.com/o1-labs/o1js/pull/2451
2730
- Internal o1js and protocol constants, hashes and prefixes are now exported via
2831
the `Core´ namespace. https://github.com/o1-labs/o1js/pull/2421
2932
- Support for string type input to `Transaction.fromJSON`

src/examples/crypto/blake2b/run.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ perfBlake2b.start('prove', 'blake2b');
1515
let { proof } = await BLAKE2BProgram.blake2b(preimage);
1616
perfBlake2b.end();
1717

18+
perfBlake2b.start('verify', 'blake2b');
1819
let isValid = await BLAKE2BProgram.verify(proof);
20+
perfBlake2b.end();
1921

2022
console.log('digest:', proof.publicOutput.toHex());
2123

src/examples/crypto/ecdsa/run.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ let { proof } = await keccakAndEcdsa.verifyEcdsa(message, signature, publicKey);
3535
perfKeccakEcdsa.end();
3636

3737
proof.publicOutput.assertTrue('signature verifies');
38-
assert(await keccakAndEcdsa.verify(proof), 'proof verifies');
38+
39+
perfKeccakEcdsa.start('verify', 'verifyEcdsa');
40+
const isValid = await keccakAndEcdsa.verify(proof);
41+
perfKeccakEcdsa.end();
42+
43+
assert(isValid, 'proof verifies');
3944

4045
// Hardcoded ethers.js signature and inputs for verification in o1js
4146

@@ -74,4 +79,9 @@ let { proof: proofE } = await ecdsaEthers.verifyEthers(msgBytes, signatureE, pub
7479
perfEcdsaEthers.end();
7580

7681
proofE.publicOutput.assertTrue('signature verifies');
77-
assert(await ecdsaEthers.verify(proofE), 'proof verifies');
82+
83+
perfEcdsaEthers.start('verify', 'verifyEthers');
84+
const isValidE = await ecdsaEthers.verify(proofE);
85+
perfEcdsaEthers.end();
86+
87+
assert(isValidE, 'proof verifies');

src/examples/crypto/rsa/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ perfRsa.start('prove', 'verifyRsa65537');
4141
let { proof } = await rsaZkProgram.verifyRsa65537(message, signature, modulus);
4242
perfRsa.end();
4343

44-
console.time('verify');
44+
perfRsa.start('verify', 'verifyRsa65537');
4545
await rsaZkProgram.verify(proof);
46-
console.timeEnd('verify');
46+
perfRsa.end();

src/examples/crypto/sha256/run.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ perfSha256.start('prove', 'sha256');
1616
let { proof } = await SHA256Program.sha256(preimage);
1717
perfSha256.end();
1818

19+
perfSha256.start('verify', 'sha256');
1920
let isValid = await SHA256Program.verify(proof);
21+
perfSha256.end();
2022

2123
console.log('digest:', proof.publicOutput.toHex());
2224

0 commit comments

Comments
 (0)