Author: Giacomo Caironi 2021-09-18 11:32:28
Published on: 2021-09-18T11:32:28+00:00
The sender created three test cases for the SigMsg function, which can be found at a provided link. The tests cover most of the function but do not include the ext_flag, so they are only applicable to taproot key paths. If one wants to test script paths, they would need to implement more than this function and use the official test vector. The sender requests that someone review the test cases. In a separate email, Giacomo Caironi complains about the lack of documentation for Taproot signature messages compared to Segwit signature messages in BIPs. The signature message function is defined in BIP 341, while the test vectors are in a different BIP 341, making it confusing. Pieter Wuille responds by clarifying that there is no separate BIP for the signature message function because it is different for BIP341 and BIP342. The common part could have been a separate BIP, but given the state of deployment, he does not support changing it at this point. He suggests improving existing documentation/vectors instead. Giacomo Caironi also notes that the test vectors for Taproot have no documentation and are not atomic, making it difficult to debug when something goes wrong. Pieter Wuille agrees and notes that the existing tests are intended for verifying an implementation against and ensuring future code changes don't break anything. While the existing tests have higher coverage than the Segwit tests, they are not useful as documentation. Pieter Wuille suggests writing test vectors aimed at helping debugging issues, such as the sighash code or P2TR scriptPubKeys derived from internal keys and script trees.
Updated on: 2023-06-15T02:22:40.216571+00:00