diff options
author | sanket1729 <sanket1729@gmail.com> | 2020-11-25 13:49:50 -0600 |
---|---|---|
committer | sanket1729 <sanket1729@gmail.com> | 2020-11-25 14:04:39 -0600 |
commit | e416cfc92bf51f6fd088ab61c2306c5e73877dd0 (patch) | |
tree | 6ef36ea0f3fd3471df6b95530247e464b90acf35 /src/policy/policy.h | |
parent | 50091592dd875a1c94030dbed74112b003732d68 (diff) | |
download | bitcoin-e416cfc92bf51f6fd088ab61c2306c5e73877dd0.tar.xz |
Add MAX_STANDARD_SCRIPTSIG_SIZE to policy
Bitcoin core has a standardness rule for max satisfaction script sig size.
This PR adds to the policy header file so that it is documented along with
along policy rules. The initial reasoning that 1650 is an implicit
limit(would not reached assuming all other policy rules are being
followed) is outdated.
As we now know, bitcoin transactions can have spend conditions are more than
just signatures and there may exist p2sh transactions involving 100 byte
preimages that maybe non-standard because of this rule. Because this
rule is no longer implicit, we should explicitly document it in policy
header file
Diffstat (limited to 'src/policy/policy.h')
-rw-r--r-- | src/policy/policy.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/policy/policy.h b/src/policy/policy.h index 8090dff4c6..fdbf45a66c 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -44,6 +44,8 @@ static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80; static const unsigned int MAX_STANDARD_TAPSCRIPT_STACK_ITEM_SIZE = 80; /** The maximum size of a standard witnessScript */ static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600; +/** The maximum size of a standard ScriptSig */ +static const unsigned int MAX_STANDARD_SCRIPTSIG_SIZE = 1650; /** Min feerate for defining dust. Historically this has been based on the * minRelayTxFee, however changing the dust limit changes which transactions are * standard and should be done with care and ideally rarely. It makes sense to |