Add unit tests for Taproot interpreter code

Add granular unittests for Taproot script interpreter code.
Not Available
Check Out Task
Task Bounty Details


Bitcoin Issue


Estimated Effort

Not Available

Current Status


Paid in USD or equivalent BTC upon acceptance

Bitcoin Issue

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/ and test/functional/, but we don't have any unit test coverage for this code.

Unit test coverage for src/script/interpreter.cpp can be found here:


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.

Prerequisite Skills

C++, Bitcoin Script

Code Guidelines

Repository Code Guidelines Page

Definition of Done

Get a PR merged that adds whole or partial coverage of src/script/interpreter.cpp for Taproot

Check Out Task