443: Fix some mistakes, and add paragraph on fees #1876

pull bigspider wants to merge 2 commits into bitcoin:master from Merkleize:ccv-fixes changing 1 files +21 −5
  1. bigspider commented at 6:42 pm on June 22, 2025: contributor

    This fixes some mistakes in the python pseudocode (that described an older version that is not aligned to the draft implementation in core), and fixes some minor other details.

    Commit e4e2b7ccd10af0ad0fdab6358461567326ee21e8 also adds a paragraph to clarify that fees are expected to be paid exogenously. While not specific to CCV and rather common to most/all covenant proposals, it was suggested in the comments of the previous PR to have an explainer (cc @Sjors).

  2. 443: fix some errors in the python pseudocode and a wrong reference. ff5703c755
  3. 443: add paragraph on fee management e4e2b7ccd1
  4. bigspider force-pushed on Jun 22, 2025
  5. jonatack added the label Proposed BIP modification on Jun 22, 2025
  6. jonatack added the label Bug fix on Jun 22, 2025
  7. Sjors commented at 10:08 am on June 23, 2025: member
    ACK on the fees explaination in e4e2b7ccd10af0ad0fdab6358461567326ee21e8, I didn’t review the other changes. The ignore footgun warning is especially useful.
  8. murchandamus commented at 5:57 pm on June 23, 2025: contributor
    LGTM
  9. in bip-0443.mediawiki:179 in ff5703c755 outdated
    175@@ -176,7 +176,7 @@ would always be hard-coded via a push in the script, the risk of mistakes seems
    176 
    177 The following values of the other parameters have special meanings:
    178 * If the <code><taptree></code> is -1, it is replaced with the Merkle root of the current input's tapscript tree. If the taptree is the empty buffer, then the taptweak is skipped.
    179-* If the <code><pk></code> is 0, it is replaced with the NUMS x-only pubkey <code>0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0</code> defined in [[bip-0340.mediawiki|BIP-340]]. If the <code><pk></code> is -1, it is replaced with the taproot internal key of the current input.
    180+* If the <code><pk></code> is 0, it is replaced with the NUMS x-only pubkey <code>0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0</code> defined in [[bip-0341.mediawiki|BIP-341]]. If the <code><pk></code> is -1, it is replaced with the taproot internal key of the current input.
    


    jonatack commented at 5:50 pm on June 25, 2025:
    With this change, are you referring to line 157 in BIP-341?

    bigspider commented at 2:07 am on June 26, 2025:
    Yes, that’s correct.
  10. in bip-0443.mediawiki:228 in e4e2b7ccd1
    224@@ -209,7 +225,7 @@ def tweak_embed_data(pubkey, data):
    225     return 0 if has_even_y(Q) else 1, bytes_from_int(x(Q))
    226 </source>
    227 
    228-The <code>taproot_tweak_pubkey</code> from [[bip-0341.mediawiki|BIP-341]] is also used as a helper function.
    229+The <code>taproot_tweak_pubkey</code> function is also used as a helper in the pseudocode below.
    


    jonatack commented at 6:00 pm on June 25, 2025:

    Anti-footgun: perhaps add for clarity something like this?

    0The <code>taproot_tweak_pubkey</code> function (the variant specified in this BIP, as opposed to the one in BIP-341) is also used as a helper in the pseudocode below.
    

    bigspider commented at 2:16 am on June 26, 2025:

    taproot_tweak_pubkey is used verbatim as defined in BIP-341 in the following line of the pseudocode: _, final_key = taproot_tweak_pubkey(internal_key, taptree)

    tweak_embed_data is its variant defined in this BIP.

    In other words, CCV applies (up to) two tweaks; the first one is the tweak_embed_data variant for data embedding, while the second tweak is identical to BIP-341 – which is necessary, or it would be incompatible with P2TR.


    jonatack commented at 10:34 pm on June 26, 2025:
    Got it, thanks for clarifying my confusion.
  11. jonatack commented at 10:35 pm on June 26, 2025: member
    ACK
  12. jonatack merged this on Jun 26, 2025
  13. jonatack closed this on Jun 26, 2025

  14. bigspider deleted the branch on Jun 28, 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-07-02 14:10 UTC

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