-
Notifications
You must be signed in to change notification settings - Fork 22
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
Various cleanups #91
base: master
Are you sure you want to change the base?
Various cleanups #91
Conversation
@@ -27,8 +29,16 @@ tv_scripts=( | |||
zip_0244 | |||
zip_0316) | |||
|
|||
formats="${1:-rust json zcash}" | |||
|
|||
for generator in "${tv_scripts[@]}" |
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.
While we're fixing this, something that I frequently find myself doing is just regenerating a single set of test vectors, instead of regenerating them all. Now that we no longer use $2
, maybe if that's present we could use that argument as the sole value in tv_scripts
instead of regenerating everything?
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.
The approach of using poetry run SCRIPT_NAME
directly doesn't put the files in the expected place by itself.
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.
The (corrected) script takes a list of formats, so there would be a conflict unless it implemented more complicated argument parsing. You can always write poetry run SCRIPT_NAME -t FORMAT >OUTPUT_FILE
, although I realize that's less convenient.
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 see. Hm. I guess I'll just have to keep commenting out bits of this script when I need to regenerate stuff.
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.
Now that this has a test runner, that should be added to the CI configuration. Otherwise LGTM; I have not inspected the ripemd160 implementation.
fea6e21
to
8a144f2
Compare
This broke the test vector regeneration test. Will fix. |
…st imports. Signed-off-by: Daira Hopwood <[email protected]>
https://github.com/bitcoin/bitcoin/blob/ad3e9e1f214d739e098c6ebbd300da5df1026a44/test/functional/test_framework/ripemd160.py and use it instead of hashlib (which might not have RIPEMD-160 due to openssl/openssl#16994). Signed-off-by: Daira Hopwood <[email protected]>
(This is currently only the RIPEMD-160 test.) Signed-off-by: Daira Hopwood <[email protected]>
Signed-off-by: Daira Hopwood <[email protected]>
orchard_vesta
tozcash_test_vectors.orchard.vesta
.regenerate.sh
and document it.