The Taproot upgrade adds significant complexity to Bitcoin's script interpreter. Some of the changes for Taproot are covered by functional tests, but are not covered by granular unittests.
This bounty involves adding unittest coverage for this important code.
From the original issue:
The Taproot code in src/script/interpreter.cpp is covered by our functional tests (test/functional/feature_taproot.py and test/functional/wallet_taproot.py), but we don't have any unit test coverage for this code.
Unit test coverage for src/script/interpreter.cpp can be found here:
- https://marcofalke.github.io/btc_cov/test_bitcoin.coverage/src/script/interpreter.cpp.gcov.html
These functions in src/script/interpreter.cpp are currently not covered by our unit tests:
- EvalChecksigTapscript
- HandleMissingData
- SignatureHashSchnorr
- GenericTransactionSignatureChecker<T>::VerifySchnorrSignature
- GenericTransactionSignatureChecker<T>::CheckSchnorrSignature
- ComputeTaprootMerkleRoot
- SigVersion::TAPSCRIPT code paths in ExecuteWitnessScript
- Taproot code paths in VerifyWitnessProgram
It would be nice to have C++ unit tests covering this code in addition to the Python functional tests.
Get a PR merged that adds whole or partial coverage of src/script/interpreter.cpp for Taproot