BIP48: Add p2tr script type derivation #1835

pull ben-kaufman wants to merge 1 commits into bitcoin:master from ben-kaufman:bip48-p2tr changing 1 files +13 −3
  1. ben-kaufman commented at 7:34 am on April 28, 2025: contributor

    BIP48 currently defines script types only for p2wsh and p2sh-p2wsh, but not for the newer p2tr.

    This PR proposes defining the the script_type for p2tr as 3, to provide a clear standard for the derivation to use in p2tr scripts.

  2. in bip-0048.mediawiki:203 in 95cb548d99 outdated
    196@@ -194,6 +197,13 @@ Public derivation is used at this level.
    197 |-
    198 |testnet
    199 |first
    200+|p2tr
    201+|external
    202+|first
    203+|m / 48' / 1' / 0' / 3' / 0 / 0
    


    jonatack commented at 3:12 pm on April 28, 2025:
    nit, maybe sort insertion of this entry by derivation numbers

    ben-kaufman commented at 4:18 pm on April 29, 2025:
    Moved to the end of the table
  3. in bip-0048.mediawiki:105 in 95cb548d99 outdated
     98@@ -99,10 +99,10 @@ Hardened derivation is used at this level.
     99 
    100 ===Script===
    101 
    102-This level splits the key space into two separate <code>script_type</code>(s). To provide
    103+This level splits the key space into three separate <code>script_type</code>(s). To provide
    104 forward compatibility for future script types this specification can be easily extended.
    105 
    106-Currently the only script types covered by this BIP are Native Segwit (p2wsh) and
    107+Currently the only script types covered by this BIP are Taproot (p2tr), Native Segwit (p2wsh) and
    


    jonatack commented at 3:14 pm on April 28, 2025:
    Maybe append p2tr at the end of this list rather than the start.

    ben-kaufman commented at 4:18 pm on April 29, 2025:
    Moved it to the end
  4. jonatack commented at 3:16 pm on April 28, 2025: member

    This would need sign-off by the BIP author (Fontaine dentondevelopment@protonmail.com).

    Pinging @Fonta1n3 for feedback or approval.

  5. jonatack added the label Proposed BIP modification on Apr 28, 2025
  6. jonatack added the label Pending acceptance on Apr 28, 2025
  7. BIP48: Add p2tr script type derivation e7cf2e9149
  8. ben-kaufman force-pushed on Apr 29, 2025
  9. Fonta1n3 commented at 2:10 pm on April 30, 2025: contributor

    This would need sign-off by the BIP author (Fontaine dentondevelopment@protonmail.com).

    Pinging @Fonta1n3 for feedback or approval.

    Thanks for the ping, appreciate it, will have a look this afternoon and revert back.

  10. Fonta1n3 commented at 2:30 am on May 1, 2025: contributor
    @jonatack @ben-kaufman Looks good to me!
  11. jonatack removed the label Pending acceptance on May 1, 2025
  12. jonatack commented at 3:07 am on May 1, 2025: member
    Thank you, @Fonta1n3. LGTM.
  13. jonatack merged this on May 1, 2025
  14. jonatack closed this on May 1, 2025

  15. in bip-0048.mediawiki:252 in e7cf2e9149
    247+|testnet
    248+|first
    249+|p2tr
    250+|external
    251+|first
    252+|m / 48' / 1' / 0' / 3' / 0 / 0
    


    jonatack commented at 5:15 am on May 1, 2025:
    @ben-kaufman @Fonta1n3 Should there be mainnet p2tr entry as well?

    ben-kaufman commented at 5:30 am on May 1, 2025:
    I didn’t add because there was none for p2sh-p2wsh, only testnet, but we could add for both I think.

    jonatack commented at 6:10 pm on May 3, 2025:

    I didn’t add because there was none for p2sh-p2wsh, only testnet, but we could add for both I think.

    Would you like to make a PR?


    ben-kaufman commented at 5:48 am on May 4, 2025:

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-05-07 16:10 UTC

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