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

Add inline test for signature consistency #10650

Merged
merged 1 commit into from Mar 30, 2022

Conversation

mrmr1993
Copy link
Member

This PR adds a simple test to ensure that signing still works and is compatible with mainnet. This would have caught the Client SDK breakage if we had had it previously.

Checklist:

  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them

@mrmr1993 mrmr1993 added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Mar 29, 2022
@mrmr1993 mrmr1993 requested a review from a team as a code owner March 29, 2022 12:24
@@ -0,0 +1,39 @@
open Signature_lib
Copy link
Contributor

Choose a reason for hiding this comment

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

my understanding is that there is no global dune runtest running in CI, am I mistaken?

Copy link
Member Author

Choose a reason for hiding this comment

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

dune runtest src/lib/ is run, among others.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah I was wrong then

@@ -0,0 +1,12 @@
(library
(name signature_lib_tests)
Copy link
Contributor

Choose a reason for hiding this comment

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

why create a separate module for inline tests? Why not inline these in the library itself? (or the caller if we want to keep the library out of scope for this test)

Copy link
Member Author

Choose a reason for hiding this comment

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

Inline tests get compiled into the Mina binary. We've been starting to move them out, to avoid executable bloat.

Copy link
Contributor

Choose a reason for hiding this comment

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

Inline tests get compiled into the Mina binary

dang, that's a pretty good reason not to use inline tests at all :D

Copy link
Contributor

@jspada jspada left a comment

Choose a reason for hiding this comment

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

Approved with suggestion to adopt our standard set of signature test vectors.

@@ -0,0 +1,39 @@
open Signature_lib

let%test_module "Signatures are unchanged test" =
Copy link
Contributor

@jspada jspada Mar 30, 2022

Choose a reason for hiding this comment

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

This is a great test to add!

Would it be possible to quickly make it use our standard set of signature test vectors?

https://github.com/o1-labs/proof-systems/blob/bbc4c77382507c3a0c66f9fda1a7499a5d547b7a/signer/tests/signer.rs#L125

@mrmr1993 mrmr1993 merged commit 29e5654 into compatible Mar 30, 2022
@mrmr1993 mrmr1993 deleted the feature/add-signature-test branch March 30, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants