consensus: Pay to Schnorr Key Hash (P2SKH) #34826

pull sashabeton wants to merge 1 commits into bitcoin:master from sashabeton:p2skh changing 22 files +961 −9
  1. sashabeton commented at 6:36 pm on March 15, 2026: none

    Summary

    This PR is a PoC of BIP: Pay to Schnorr Key Hash (P2SKH), a new native SegWit output type that combines the compact 20-byte program of P2WPKH with the Schnorr signature efficiency of P2TR key-path spending.

    Motivation

    Existing single-key output types present an unresolved trade-off:

    • P2WPKH achieves a 22-byte scriptPubKey by hashing the key, but uses ECDSA and requires the full 33-byte compressed pubkey in the witness (~108 witness bytes).
    • P2TR adopts Schnorr signatures (64-byte witness), but embeds the full 32-byte x-only pubkey in the scriptPubKey, producing a 34-byte output — 12 bytes larger than P2WPKH — and exposing the key in every unspent output.

    P2SKH closes this gap. The locking script commits to hash160(P.x) (20 bytes); spending requires a single 64-byte Schnorr signature. The verifier recovers the public key from the signature and checks its hash against the program — no key exposure in the UTXO set.

    Key properties:

    Property P2WPKH P2TR P2SKH
    scriptPubKey size 22 bytes 34 bytes 22 bytes
    Witness size (key spend) ~108 bytes 64 bytes 64 bytes
    Key in output yes (hash) yes (raw) no (hash)
    Signature scheme ECDSA Schnorr Schnorr

    P2SKH achieves the smallest combined on-chain footprint of any current single-key type, reducing output sizes and UTXO set pressure while retaining the full efficiency of Schnorr signing.

    Open Questions

    1. Witness version conflict with BIP360. BIP360 currently claims witness version 2. If both proposals advance, one must cede its version number. The authors consider version 3 (OP_3) a viable alternative for P2SKH; the tradeoffs (address prefix, deployment ordering) should be discussed here.

    2. Naming. “P2SKH” (Pay to Schnorr Key Hash) is the working name and follows the established P2*KH pattern. “P2TRKH” (Pay to Taproot Key Hash) has been suggested as an alternative to emphasise lineage from the Taproot family of Schnorr-based schemes. Other suggestions are welcome.

    Thanks for taking a look.

  2. consensus: Pay to Schnorr Key Hash (P2SKH) 9b218ad8b7
  3. DrahtBot added the label Consensus on Mar 15, 2026
  4. DrahtBot commented at 6:36 pm on March 15, 2026: contributor

    ♻️ Automatically closing for now based on heuristics. Please leave a comment, if this was erroneous. Generally, please focus on creating high-quality, original content that demonstrates a clear understanding of the project’s requirements and goals.

    📝 Moderators: If this is spam, please replace the title with ., so that the thread does not appear in search results.

  5. DrahtBot closed this on Mar 15, 2026

  6. DrahtBot commented at 6:37 pm on March 15, 2026: contributor

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

    Reviews

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

    LLM Linter (✨ experimental)

    Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):

    • [secp256k1_ge_set_xo_var(&r, &rx, 0)] in src/secp256k1/src/modules/p2skh/main_impl.h

    2026-03-15 18:37:44


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-03-16 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me