test: fix TaprootSignatureMsg default codeseparator_pos #36184

pull fametrano wants to merge 1 commits into bitcoin:master from fametrano:test-tapsig-codesep-default changing 1 files +1 −1
  1. fametrano commented at 6:06 PM on September 7, 2026: contributor

    TaprootSignatureMsg defaults codeseparator_pos to -1 and serializes it with .to_bytes(4, "little", signed=False), so any scriptpath=True call that relies on the default raises OverflowError.

    The unsigned encoding was added so callers could pass 0xfffffffe/0xffffffff, and the call sites in feature_taproot.py were updated to default to 0xffffffff; this default was left at -1. The only in-tree scriptpath caller passes codeseparator_pos explicitly, so CI does not hit it.

    Set the default to 0xFFFFFFFF: the value feature_taproot.py uses for "no codeseparator", and the bytes the previous signed encoding produced for -1.

  2. test: fix TaprootSignatureMsg default codeseparator_pos
    TaprootSignatureMsg defaults codeseparator_pos to -1 and serializes it
    with .to_bytes(4, "little", signed=False), so any scriptpath=True call
    that relies on the default raises OverflowError.
    
    The unsigned encoding was added so callers could pass 0xfffffffe and
    0xffffffff, and the call sites in feature_taproot.py were updated to
    default to 0xffffffff, but this default was left at -1. Set it to
    0xFFFFFFFF: the same value feature_taproot.py uses for "no
    codeseparator", and the bytes the previous signed encoding produced.
    c27297a094
  3. DrahtBot added the label Tests on Sep 7, 2026
  4. DrahtBot commented at 6:06 PM on September 7, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36184.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. DrahtBot added the label CI failed on Sep 7, 2026
Contributors

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-09-09 07:56 UTC