BIP443: stack order fixup #1859

pull halseth wants to merge 1 commits into bitcoin:master from halseth:patch-2 changing 1 files +2 −2
  1. halseth commented at 10:58 am on May 29, 2025: none
  2. Update bip-0443.mediawiki ace86581b2
  3. jonatack added the label Proposed BIP modification on May 29, 2025
  4. jonatack added the label Pending acceptance on May 29, 2025
  5. in bip-0443.mediawiki:138 in ace86581b2
    134@@ -135,7 +135,7 @@ The tapscript opcode <code>OP_SUCCESS187</code> (<code>0xbb</code>) is constrain
    135 <code>OP_CHECKCONTRACTVERIFY</code>.
    136 
    137 When evaluating <code>OP_CHECKCONTRACTVERIFY</code> (<code>OP_SUCCESS187</code>,
    138-<code>0xbb</code>), the expected format of the stack, shown bottom to top, is:
    139+<code>0xbb</code>), the expected format of the stack, shown top to bottom, is:
    


    murchandamus commented at 1:54 pm on May 29, 2025:

    @halseth: Are you surprised that the order used to present the stack is top to bottom, or did you notice a mismatch between the description and the spec?

    If it’s the former, the presentation of stacks bottom to top seems to be the established order, see e.g., https://en.bitcoin.it/wiki/Script


    halseth commented at 1:58 pm on May 29, 2025:

    Ah, that might well be it, in such a case the order of the elements in the code block should be reversed.

    I’ll let @bigspider comment.


    halseth commented at 1:59 pm on May 29, 2025:
    @murchandamus to answer your question, I believe it is a mismatch between the wording and the order of elements (mode should be the top element).

    bigspider commented at 3:02 pm on May 29, 2025:

    Thanks @halseth - indeed it appears I messed up, as <mode> is the top element (it would basically always be pushed right before CCV, and never come from the witness - as in the Script examples below).

    I think my confusion comes from looking at the description in BIP-0345 where the arguments are presented indeed presented top to bottom.

    I’ll let @murchandamus advise whether this PR should be merged, or the order of the parameters should be reversed to actually be bottom to top - I don’t have strong feelings either way.

  6. jonatack renamed this:
    Update bip-0443.mediawiki
    BIP443: stack order fixup
    on May 29, 2025
  7. jonatack removed the label Pending acceptance on May 29, 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-30 14:10 UTC

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