ZhePang / Python_Specification_for_Schnorr_Adaptor

5 stars 4 forks source link

Split test vectors into three csv files + Add new vectors #13

Closed siv2r closed 3 months ago

siv2r commented 6 months ago

Fixes #9 Addresses #10

Currently, test vectors for all the APIs are present in a single CSV file. This PR splits them into two CSV files.

  1. presig_vectors.csv: contains the test vectors for the schnorr_presig_signand schnorr_extract_adaptor APIs
  2. adapt_secadaptor_vectors.csv: contains the test vectors for the schnorr_adaptand schnorr_extract_secadaptor APIs

Todo List:

siv2r commented 4 months ago

This pull request is ready for review. I tried to split this into multiple PRs, but the changes depended on each other, so I kept them together.

Currently, the test_pre_sign_generation(), test_pre_sign_nonce(), and test_pre_sign_nonce_without_auxrand() tests (in reference.py) throw mypy errors because I introduced the PlainPk and XonlyPk types.

Should we move these tests into a new file or remove them altogether? These tests are incomplete, and I don’t see such tests in other BIP reference codes (except here).

ZhePang commented 3 months ago

Great Job! Will add more test vectors to increase the test coverage.