Test/fix signature hashes using sighash.json from zcashd #2215
Labels
A-consensus
Area: Consensus rule updates
A-script
Area: Script handling
C-testing
Category: These are tests
Is your feature request related to a problem? Please describe.
We could test signature hashes using the test vectors from sighash.json in the zcashd repository.
I wrote the test (see linked draft PR) but it's failing when parsing the transactions from that file. Part of that is due to #2207 , part of that is due to the test vectors being randomly generated which zebra does not accept (e.g. random hash_type value), and there are also some issues I haven't investigated.
(Edited later: str4d mentioned that they had the same issue and they regenerated the test vectors to be valid. We need to re-check this)
Describe the solution you'd like
Fix related issues until the test passes.
Describe alternatives you've considered
We could not do the test. We already have some assurance that zebra sighash is correct with the tests from #2165.
Additional context
Here is some information printed in that test: the transaction and the error raised when parsing it. At the end it eventually successfully parses the transaction but the resulting sighash does not match, but could be a bug in the test too.
The text was updated successfully, but these errors were encountered: