OpenZeppelin / OpenZeppelin/compact-contracts

Revisit testing non-exported circuits

Open
#151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There doesn't seem to be a good way to test module-scoped circuits that are not exported. The two initial ideas are:

  1. Rewrite the code in a testing module and export everything
  2. Create a wrapper circuit with a very explicit name i.e. doNotUse_foo_forTesting

(see convo)

Neither of them are maintainable as patterns and they create a greater surface area for other issues to arise

When better tooling becomes available, testing non-exported circuits should be revisited

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 by reading the linked discussion in PR #125, especially the conversation about testing module-scoped circuits. Clarify the requirements for a maintainable testing approach, with completion defined as testing non-exported circuits without rewriting the code or adding exported testing wrappers.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.