OpenZeppelin / OpenZeppelin/compact-contracts

dev: move the curve runtime tests under crypto/curves

Open Beginner friendly
#919 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
55
Forks
29
Avg merge
5d 7h
Merged PRs (30d)
25

Description

contracts/src/crypto/test/CurveRuntimeInvariants.test.ts and MockCurveOps are the only files left at the crypto/ root after #918 grouped the modules by scheme. They pin a property of the Jubjub runtime, that every point reaching ecMul / ecAdd is forced into the prime-order subgroup, not a property of any scheme. Left where they are, the root reads as one more scheme directory with no module in it.

Move them under crypto/curves/, beside the bls12_381 field utilities from #913, with the mock under test/mocks/ and the artifact import depth adjusted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with contracts/src/crypto/test/CurveRuntimeInvariants.test.ts and locate MockCurveOps. Move the runtime test under crypto/curves/ and the mock under test/mocks/, adjusting the artifact import depth. Done means the tests still verify the Jubjub subgroup property and pass from their new locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cryptography, testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.