Skip to content

Conversation

@petertodd
Copy link
Contributor

No description provided.

@gmaxwell
Copy link
Contributor

gmaxwell commented Mar 2, 2014

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

@petertodd
Copy link
Contributor Author

@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)

@gavinandresen
Copy link
Contributor

ACK

gavinandresen added a commit that referenced this pull request Mar 18, 2014
…cript-limit

Document BIP16/P2SH 520 byte redeem script limit
@gavinandresen gavinandresen merged commit 89eec44 into bitcoin:master Mar 18, 2014
@petertodd petertodd deleted the document-bip16-520-byte-redeemScript-limit branch March 18, 2014 19:26
luke-jr pushed a commit to luke-jr/bips that referenced this pull request Jun 6, 2017
[RFC] BOLT 1, BOLT 2, BOLT 5: 2-byte lengths everywhere.
guggero pushed a commit to guggero/bips that referenced this pull request Jun 23, 2022
bip-taro-ms-smt: make node encoding and digest calculation more explicit
real-or-random pushed a commit to real-or-random/bips that referenced this pull request Aug 10, 2022
dplusplus1024 pushed a commit to dplusplus1024/bips that referenced this pull request Jul 20, 2025
notmike-5 pushed a commit to notmike-5/bips that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants