BIP46 clarify witness #1651

pull michael1011 wants to merge 1 commits into bitcoin:master from michael1011:46-fix-pubkey changing 1 files +1 −1
  1. michael1011 commented at 11:47 am on July 22, 2024: contributor
    In BIP46, the witness in the address derivation section states <signature> <pubkey>, which is incorrect. It should say <signature> <witnessScript> as specified for P2WSH in BIP141.
  2. BIP46 clarify witness f1a5c71094
  3. in bip-0046.mediawiki:93 in f1a5c71094
    89@@ -90,7 +90,7 @@ month = 1 + index % 12
    90 To derive the address from the above calculated public key and timelock, we create a <tt>witness script</tt> which locks the funds until the <tt>timelock</tt>, and then checks the signature of the <tt>derived_key</tt>. The <tt>witness script</tt> is hashed with SHA256 to produce a 32-byte hash value that forms the <tt>witness program</tt> in the output script of the P2WSH address.
    91 
    92     witnessScript: <timelock> OP_CHECKLOCKTIMEVERIFY OP_DROP <derived_key> OP_CHECKSIG
    93-    witness:      <signature> <pubkey>
    94+    witness:      <signature> <witnessScript>
    


    murchandamus commented at 1:48 pm on July 22, 2024:
    This suggestion seems correct to me. @theborakompanioni, could you please take a look?

    theborakompanioni commented at 3:01 pm on July 22, 2024:
    Yes, that is correct. <pubkey> does not need to be provided as it is already in the witnessScript. I apologize, that looks like a copy-paste error. Thanks @michael1011 :pray:
  4. murchandamus approved
  5. murchandamus merged this on Jul 22, 2024
  6. murchandamus closed this on Jul 22, 2024

  7. michael1011 deleted the branch on Jul 22, 2024
  8. michael1011 restored the branch on Jul 22, 2024
  9. michael1011 deleted the branch on Jul 22, 2024

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: 2024-12-09 06:10 UTC

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