Skip to content

Add cft#653

Draft
andrew-fleming wants to merge 25 commits into
OpenZeppelin:mainfrom
andrew-fleming:add-cft-2
Draft

Add cft#653
andrew-fleming wants to merge 25 commits into
OpenZeppelin:mainfrom
andrew-fleming:add-cft-2

Conversation

@andrew-fleming

Copy link
Copy Markdown
Contributor

No description provided.

andrew-fleming and others added 25 commits June 21, 2026 16:40
PR OpenZeppelin#620 moved every unit suite to the async, backend-aware
@openzeppelin/compact-simulator@0.2.0 API, but the ElGamal suite added
on this branch still used the synchronous createSimulator path. Against
0.2.0 the spec fails to load (TypeError: Cannot read properties of
undefined reading 'kind'), which is the only failing suite in the test
workflow on OpenZeppelin#617.

* ElGamalSimulator: drop the sync constructor for `static async create`,
  add `artifactName: 'MockElGamal'`, and return `Promise<R>` from every
  pure pass-through (the assert circuits return `Promise<[]>`).
* ElGamal.test.ts: build the simulator in `beforeAll`, derive the shared
  keys once, await every circuit call, and assert failure paths with
  `await expect(...).rejects.toThrow(...)`.

No behavioral change to the contract; the migration is mechanical and
mirrors the UtilsSimulator / utils.test.ts pattern from OpenZeppelin#620.
test(crypto): migrate ElGamal suite to async simulator
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2c5d2f5a-3817-4dd3-bceb-0f8280dc7c45

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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.

2 participants