Skip to content

Bug: valid 32-byte x-only tr() internal key is rejected #58

Description

@Nuhiat-Arefin

Summary

tinyminiscript rejects a valid taproot descriptor whose internal key is given as a standard 32-byte x-only pubkey.

Minimal repro

tr(a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)

Observed behavior

The parser rejects with:

InvalidXOnlyKeyLength { key: "a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd", position: 4, found: 64 }

Cross-check

The same descriptor is accepted by:

  • rust-miniscript
  • bitcoin/bitcoin
  • embit
  • bitcoinerlab/descriptors
  • NBitcoin

Why this looks like a real bug

The taproot key parser currently requires 66 or 130 hex chars, which means it accepts compressed pubkeys and converts them to x-only form, but rejects the standard 64-hex x-only encoding used directly in tr(...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions