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

test(AztecNr): Write tests for the Noir-Lib, in .nr. #1642

Open
Tracked by #2783
iAmMichaelConnor opened this issue Aug 18, 2023 · 1 comment
Open
Tracked by #2783

test(AztecNr): Write tests for the Noir-Lib, in .nr. #1642

iAmMichaelConnor opened this issue Aug 18, 2023 · 1 comment
Assignees
Labels
C-aztec.nr Component: Aztec smart contract framework T-testing Type: Testing. More tests need to be added.

Comments

@iAmMichaelConnor
Copy link
Contributor

Write tests (in Noir) for the library. It's under-tested at the moment.

Note: we won't be able to test oracles, or functions which call oracles. But we should be able to test many things, rather than relying on the typescript tests.

@iAmMichaelConnor iAmMichaelConnor added the T-testing Type: Testing. More tests need to be added. label Aug 18, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 18, 2023
@charlielye
Copy link
Contributor

I started a conversation with Kev about this today.

This comment need not affect any work around just starting to write tests, but r.e. oracles we should be able to mock the oracle return value at the start of a test with something like (total pseudocode)

mock_oracle.time(123); // First call to time returns 123
mock_oracle.time(234); // Second call to time returns 234

And also when running test suites we could compile to brillig and run the logic to test through the brillig vm which should be faster.

@iAmMichaelConnor iAmMichaelConnor added the C-aztec.nr Component: Aztec smart contract framework label Aug 20, 2023
codygunton pushed a commit that referenced this issue Jan 23, 2024
* Attempt to fix production deployment (#1683)

* Add stefan to mainframe. Deployment publishes bb.js and blockchain to npm.

* Fix block scanning (#1692)

* Attempt to fix deploy.

* Fix dai-permit issues. Providers did not offset `v` properly (#1698)

* fix: perform offset to `sig.v if 0 or 1 for `signTypedData`

* fix: remove git-submodules

* Force to -O2 with binaryen installed to prevent aes bug.

* Updated fork block number (#1685)

* Updated fork block number

* Updated fork block and element test tranche

* Removed no longer used env variable

* Updated Faucet index page amounts

* [zk-money] Jcf/aave (#1642)

* Configure aave defi cards

* copy-paste error

* Increase test timeout

Co-authored-by: PhilWindle <[email protected]>

* fix aave token addresses (#1701)

* Fuzzer-found bugs that are not related to bigfield (#1605)

* Added a regression test to detect original parallelized asm bugs

* FIxed parallelized SQR asm bugs

* Added comment that Emerson wanted

* Fix for create_range_constraint in the constant case

* Various safe_uint bug fixes having to do with not handling constant cases

* Fixed the comparison issue for the point at infinity

* Added regression tests and fixed 3 more missing flags in optimized SQR

* Fixed tabulation in asm_macros.hpp

* Fixed Montgomery Issue that Adrian Found

* Fixed issue with negative zero found by Guido

* FIxed same self_neg bug found by Guido

* Renamed 1 test

* Fixed one more SQR bug

* Added extra regression tests

* Slightly moved one test

* Added TODO comments into field_impl for potential optimisations

* Addressed Zac's comments

Co-authored-by: zac-williamson <[email protected]>

* Fixing errors in addition and subtraction of field elements with moduli > 254 bits (#1702)

* Added test

* Added bugfixes

* Added comments

* Use 400k gas bridge for aave (#1705)

* Add versioning to falafel status endpoint. Refresh zk-money on version mismatch. (#1674)

* all get/post reqs from sdk to falafel now include  header

* falafel expects all endpoint requests to be given a 'version' header. SDK now gives all reqs a version. If falafel sees a req with version that does not match falafel version, it responds with error 402. ServerRollupProvider now emits versionMismatch whenever one occurs. zk-money promotes this event and forces refresh of browser.

* cleanup new FALAFEL_VERSION constant in falafel - using configurator everywhere instead of using constant directly

* fix prettier errors

* prettier server.ts

* sdk version to 0

* version is now a str like 2.1.0 in falafel and sdk. moved getRollupProviderStatus into SDK so that it doesn't need to accept sdk_version as arg

* prettier sdk index.ts

* zk-money alerts on version mismatch. Falafel allows requests without version header, but if version header is present it enforces a match.

* server rollup provider and block source shouldn't NEED a  to interact with falafel.

* prettier rollup provider ts

* block source / provider fix version default undefined changed to ''

Co-authored-by: joss-aztec <[email protected]>
Co-authored-by: Charlie Lye <[email protected]>
Co-authored-by: Lasse Herskind <[email protected]>
Co-authored-by: Innokentii Sennovskii <[email protected]>
Co-authored-by: zac-williamson <[email protected]>
Co-authored-by: David Banks <[email protected]>
@LHerskind LHerskind changed the title Write tests for the Noir-Lib, in .nr. test(AztecNr): Write tests for the Noir-Lib, in .nr. Mar 8, 2024
@sklppy88 sklppy88 self-assigned this Apr 5, 2024
@sklppy88 sklppy88 moved this from Todo to On Hold in A3 Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-aztec.nr Component: Aztec smart contract framework T-testing Type: Testing. More tests need to be added.
Projects
Status: No status
Development

No branches or pull requests

3 participants