mirror of
https://github.com/bitcoin/bips.git
synced 2026-08-24 18:47:19 +00:00
bip383: specify more precise script size limit
The "15 compressed public keys" rule is not very precise and doesn't mention uncompressed ones. Core implements this differently as well: https://github.com/bitcoin/bitcoin/blob/master/src/script/descriptor.cpp#L2425 So we make the definition more precise.
This commit is contained in:
@@ -39,7 +39,11 @@ Depending on the higher level descriptors, there may be restrictions on the type
|
||||
|
||||
Depending on the higher level descriptors, there are also restrictions on the number of keys that can be present, i.e. the maximum value of <tt>n</tt>.
|
||||
When used at the top level, there can only be at most 3 keys.
|
||||
When used inside of a <tt>sh()</tt> expression, there can only be at most 15 compressed public keys (this is limited by the P2SH script limit).
|
||||
When used inside of a <tt>sh()</tt> expression, the output script produced is the redeem script,
|
||||
which is pushed as a single element in the spending scriptSig and must therefore not exceed the
|
||||
520 byte limit on the size of a script element.
|
||||
This allows at most 15 compressed public keys, or at most 7 uncompressed ones, as an uncompressed
|
||||
key takes 66 bytes of the script rather than 34.
|
||||
Otherwise the maximum number of keys is 20.
|
||||
|
||||
The output script produced will be
|
||||
|
||||
Reference in New Issue
Block a user