Skip to content

Add a JubjubScalar type to the standard library#167

Open
kmillikin wants to merge 7 commits intomainfrom
kmillikin/jubjub-scalar
Open

Add a JubjubScalar type to the standard library#167
kmillikin wants to merge 7 commits intomainfrom
kmillikin/jubjub-scalar

Conversation

@kmillikin
Copy link
Copy Markdown
Contributor

JubjubScalar is a new type alias for a new Opaque<'JubjubScalar'> type. It's used in the signatures of ecMul and ecMulGenerator. It's represented as a native field element in JS (so there is no change there), and has "field" alignment in Impact (so there is no change there).

In the ZKIR v3 backend it shows up as a type Scalar<Jubjub> in type annotations.

JubjubScalar is a `new type` alias for a new `Opaque<'JubjubScalar'>` type.
It's used in the signatures of `ecMul` and `ecMulGenerator`.  It's represented
as a native field element in JS (so there is no change there), and has "field"
alignment in Impact (so there is no change there).

In the ZKIR v3 backend it shows up as a type `Scalar<Jubjub>` in type
annotations.

Signed-off-by: Kevin Millikin <kevin.millikin@shielded.io>
@kmillikin kmillikin requested review from a team as code owners February 25, 2026 00:20
@kmillikin
Copy link
Copy Markdown
Contributor Author

There is still some work remaining on this PR:

  • bump the compiler version
  • create a test that will fail due to missing support in ZKIR

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 25, 2026

Plugin Test Results

 1 files   3 suites   1s ⏱️
21 tests 21 ✅ 0 💤 0 ❌
23 runs  23 ✅ 0 💤 0 ❌

Results for commit d0100f0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 25, 2026

Compactc E2E Tests Results

2 825 tests   - 12 175   2 825 ✅  - 12 175   6m 29s ⏱️ - 23m 30s
    1 suites ±     0       0 💤 ±     0 
    1 files   ±     0       0 ❌ ±     0 

Results for commit d0100f0. ± Comparison against base commit fd5310c.

This pull request removes 15000 and adds 2825 tests. Note that renamed tests count towards both.
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_0.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_1.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_10.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_100.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_101.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_102.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_103.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_104.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_105.compact'
src/tests/fuzzer.e2e.test.ts ‑ [E2E] Fuzzer tests for compiler > should be able to compile synthetic contract: 'assert_contract_106.compact'
…
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_0.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_10.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_100.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1000.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1001.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1002.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1003.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1004.compact'
src/tests/extracted.e2e.test.ts ‑ [E2E] Extracted unit tests for compiler > should be able to compile extracted contract: '/home/runner/work/_temp/nix-shell.NGa5o8/temp-test-ugEW3n/contract_1005.compact'
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 25, 2026

Flaky Rate

Overall Flakiness 0.00%    ±0

No current tests have flaky rates to display ✨

Github Test Reporter by CTRF 💚


Flaky Rate

Overall Flakiness 0.00%    ±0

No current tests have flaky rates to display ✨

Github Test Reporter by CTRF 💚


Flaky Rate

Overall Flakiness 0.00%    ±0

No current tests have flaky rates to display ✨

Github Test Reporter by CTRF 💚


Flaky Rate

Overall Flakiness 0.00%    ±0

No current tests have flaky rates to display ✨

Github Test Reporter by CTRF 💚

@github-actions
Copy link
Copy Markdown

Plugin Test Summary

 1 files   3 suites   1s ⏱️
21 tests 21 ✅ 0 💤 0 ❌
23 runs  23 ✅ 0 💤 0 ❌

Results for commit 044f5e4.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Compactc E2E Test Summary

2 825 tests   2 825 ✅  5m 25s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit 044f5e4.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant