Question about BIP 16 #10031

issue yxliang01 opened this issue on March 18, 2017
  1. yxliang01 commented at 10:31 PM on March 18, 2017: none
    [20-byte-hash-value] shall be the push-20-bytes-onto-the-stack opcode (0x14) followed by exactly 20 bytes.
    

    from https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki

    However, in the example on the same page

    scriptSig: [signature] {[pubkey] OP_CHECKSIG}
    scriptPubKey: OP_HASH160 [20-byte-hash of {[pubkey] OP_CHECKSIG} ] OP_EQUAL
    

    It didn't include the OP code 0x14.

    Therefore, what should a P2SH script look like?

    Besides, when the scriptSig contains {serialized script} and we hash it using HASH_160, will it really be executed?

    Thanks

  2. TheBlueMatt commented at 11:03 PM on March 18, 2017: member

    Generally nomenclature of pushes does not include the push byte, it is implied. This kind of question, however, is better suited for the Bitcoin stackexchange.

    On March 18, 2017 3:31:53 PM PDT, Xiao Liang notifications@github.com wrote:

    [20-byte-hash-value] shall be the push-20-bytes-onto-the-stack opcode
    (0x14) followed by exactly 20 bytes.
    

    from https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki

    However, in the example on the same page

    scriptSig: [signature] {[pubkey] OP_CHECKSIG}
    scriptPubKey: OP_HASH160 [20-byte-hash of {[pubkey] OP_CHECKSIG} ]
    OP_EQUAL
    

    It didn't include the OP code 0x14 - in fact, this OP code is not described in the bitcoin wiki.

    Therefore, what should a P2SH script look like?

    Besides, when the scriptSig contains {serialized script} and we hash it using HASH_160, will it really be executed?

    Thanks

    -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bitcoin/issues/10031

  3. fanquake added the label Questions and Help on Mar 19, 2017
  4. laanwj commented at 6:50 AM on March 20, 2017: member

    This is not the place for questions about BIPs, this is an issue tracker. As said, use the bitcoin stack exchange.

  5. laanwj closed this on Mar 20, 2017

  6. MarcoFalke locked this on Sep 8, 2021

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-04-26 06:15 UTC

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