Skip to content

Commit

Permalink
Merge pull request bitcoin#251 from dionyziz/patch-1
Browse files Browse the repository at this point in the history
Fix small typo in BIP 0016
  • Loading branch information
gavinandresen committed Jan 8, 2016
2 parents ba88bec + 7abd750 commit 6d5b31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bip-0016.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ If a majority of hashing power does not support the new validation rules, then r

===520-byte limitation on serialized script size===

As a consequence of the requirement for backwards compatiblity the serialized script is itself subject to the same rules as any other PUSHDATA operation, including the rule that no data greater than 520 bytes may be pushed to the stack. Thus is it not possible to spend a P2SH output if the redemption script it refers to is >520 bytes in length. For instance while the OP_CHECKMULTISIG opcode can itself accept up to 20 pubkeys, with 33-byte compressed pubkeys it is only possible to spend a P2SH output requiring a maximum of 15 pubkeys to redeem: 3 bytes + 15 pubkeys * 34 bytes/pubkey = 513 bytes.
As a consequence of the requirement for backwards compatiblity the serialized script is itself subject to the same rules as any other PUSHDATA operation, including the rule that no data greater than 520 bytes may be pushed to the stack. Thus it is not possible to spend a P2SH output if the redemption script it refers to is >520 bytes in length. For instance while the OP_CHECKMULTISIG opcode can itself accept up to 20 pubkeys, with 33-byte compressed pubkeys it is only possible to spend a P2SH output requiring a maximum of 15 pubkeys to redeem: 3 bytes + 15 pubkeys * 34 bytes/pubkey = 513 bytes.


==Reference Implementation==
Expand Down

0 comments on commit 6d5b31a

Please sign in to comment.