Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuit harness/tests #5

Merged
merged 17 commits into from
Dec 18, 2023
Merged

Circuit harness/tests #5

merged 17 commits into from
Dec 18, 2023

Conversation

ytham
Copy link
Collaborator

@ytham ytham commented Dec 11, 2023

Usage

Install the circuit harness (private npmjs package) in some other nodejs project:

npm install @axiom-crypto/harness 

Run via:

npx harness run <path_to_js_circuit>

Running tests

cd harness
pnpm test

What's happening under the hood?

  • jest grabs all of the javascript circuits in harness/test/integration/input
  • we map the javascript circuits into a typescript circuit template file
  • all outputs go in the integration/output folder in the same shape as the integration/input folder

Big diff here! What are the main important files?

  • harness/src: harness source files
  • harness/src/template/template.circuit: circuit template
  • harness/src/template/buildCircuit.ts: handles mapping a js circuit to the circuit template
  • harness/test/integration/goerli.test.ts: jest test suite for Goerli
  • harness/test/integration/input/: input files from axiom-repl/testCircuits w/ minor modifications
  • .github/workflows/test.yml: builds client and harness before running integration tests

@ytham ytham requested a review from jonathanpwang December 11, 2023 18:59
ytham and others added 12 commits December 11, 2023 11:03
* Client harness

* Update package link

* Remove unused comments

* Add provider support

* Update version

* Remove exec

* Remove unused comments

* Add tsconfig for automation

* Update workflow

* Tweak harness deps

* Let harness use local client dependency

* Update package structure

* Update tests
@ytham ytham changed the title Circuit tests Circuit harness/tests Dec 14, 2023
@ytham
Copy link
Collaborator Author

ytham commented Dec 15, 2023

@jonathanpwang this is ready for review now

Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

jonathanpwang

This comment was marked as duplicate.

@jonathanpwang jonathanpwang merged commit 36ebe8e into main Dec 18, 2023
1 check passed
@jonathanpwang jonathanpwang deleted the feat/circuit_tests branch December 18, 2023 16:41
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