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
Conversation
@@ -0,0 +1,39 @@ | |||
open Signature_lib |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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" = |
There was a problem hiding this comment.
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?
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: