test: cover Taproot standardness rules in mempool_accept #35882

pull jeanpablojp wants to merge 1 commits into bitcoin:master from jeanpablojp:test-taproot-standardness changing 1 files +17 −0
  1. jeanpablojp commented at 2:06 PM on August 4, 2026: contributor

    IsWitnessStandard rejects tapscript stack items over 80 bytes and an empty control block, and no test asserts bad-witness-nonstandard for either. With the 80-byte check removed, feature_taproot.py failed on only 6 of the ten seeds I tried, and with the empty control block check removed it can't fail at all, since none of its spenders has an empty control block. Without that check the node segfaults reading control_block[0].

    This adds a case for each to mempool_accept.py, by mutating the witness of the P2TR script-path spend the file already builds. Each case fails with its policy.cpp branch disabled and passes with it restored.

  2. DrahtBot added the label Tests on Aug 4, 2026
  3. DrahtBot commented at 2:07 PM on August 4, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. sedited commented at 5:33 PM on September 20, 2026: contributor

    These mutants already seem to be killed by feature_taproot.py. Why add these here?

  5. test: cover Taproot standardness rules in mempool_accept b46c4baefa
  6. jeanpablojp force-pushed on Oct 27, 2026
  7. jeanpablojp commented at 9:02 PM on October 27, 2026: contributor

    You're right about the annex. feature_taproot.py kills that mutant on all ten seeds I tried, but the 80-byte one on only 6, since tapscript/input81limit isn't in spenders_taproot_nonstandard().

    None of its spenders has an empty control block, and without the control_block.empty() check testmempoolaccept on the new case segfaults the node. Dropped the annex case.

Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-30 09:40 UTC