Document BIP16/P2SH 520 byte redeem script limit #24

pull petertodd wants to merge 2 commits into bitcoin:master from petertodd:document-bip16-520-byte-redeemScript-limit changing 1 files +6 −1
  1. petertodd commented at 4:14 AM on March 1, 2014: contributor

    No description provided.

  2. Make reference to the redeemScript terminology e077915561
  3. Document 520-byte serialized script limit e5d0289c3e
  4. gmaxwell commented at 3:20 AM on March 2, 2014: contributor

    This should probably go in, though I'm not sure if this alone is visible enough.

  5. petertodd commented at 8:32 PM on March 2, 2014: contributor

    @gmaxwell I checked and bitcoinj and libbitcoin don't have specific code to take a redeemScript and product a P2SH address/scriptPubKey. bitcoin-ruby and bitcoin-js do, but do not warn about the pushdata limit. (bitcoin-js's implementation is particularly nuts, and treats any unknown script as a P2SH) My python-bitcoinlib does, and is the only one that checks for excess length.

    So yeah, I wouldn't be at all surprised if someone gets caught up by this eventually and loses some funds due to poorly tested code. Might be worth it to re-write the BIP so that it first describes the point of P2SH, followed by the implementation details implementors need to know. Similarly we should also mention how the coinbase "voting" code is now obsolete, and that P2SH checks are simply applied after a specific time. (or better yet, just point implementors to the Satoshi codebase for details on this rather than giving the wrong impression that the BIP document is the standard)

  6. petertodd cross-referenced this on Mar 11, 2014 from issue Fix CHECKMULTISIG mutability and remove P2SH CHECKMULTISIG # of signatures limit by petertodd
  7. gavinandresen commented at 5:23 PM on March 18, 2014: contributor

    ACK

  8. gavinandresen referenced this in commit 89eec44226 on Mar 18, 2014
  9. gavinandresen merged this on Mar 18, 2014
  10. gavinandresen closed this on Mar 18, 2014

  11. petertodd deleted the branch on Mar 18, 2014
  12. luke-jr referenced this in commit 351e0deda2 on Jun 6, 2017
  13. guggero referenced this in commit 970b508a72 on Jun 23, 2022
  14. real-or-random referenced this in commit ce97b2f522 on Aug 10, 2022

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: 2026-04-14 15:10 UTC

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