diff --git a/src/policy/policy.h b/src/policy/policy.h --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -94,7 +94,8 @@ SCRIPT_VERIFY_SIGPUSHONLY | SCRIPT_VERIFY_MINIMALDATA | SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | SCRIPT_VERIFY_CLEANSTACK | SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | SCRIPT_VERIFY_CHECKSEQUENCEVERIFY | - SCRIPT_VERIFY_CHECKDATASIG_SIGOPS | SCRIPT_DISALLOW_SEGWIT_RECOVERY; + SCRIPT_VERIFY_CHECKDATASIG_SIGOPS | SCRIPT_DISALLOW_SEGWIT_RECOVERY | + SCRIPT_VERIFY_INPUT_SIGCHECKS; /** * For convenience, standard but not mandatory verify flags. diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -477,6 +477,10 @@ const CBlockIndex *pindexTip) { uint32_t flags = STANDARD_SCRIPT_VERIFY_FLAGS; + // Disable input sigchecks limit for mempool admission, prior to its + // proper activation. + flags &= ~SCRIPT_VERIFY_INPUT_SIGCHECKS; + // We make sure this node will have replay protection during the next hard // fork. if (IsReplayProtectionEnabled(params, pindexTip)) { diff --git a/test/functional/abc-wallet-standardness.py b/test/functional/abc-wallet-standardness.py --- a/test/functional/abc-wallet-standardness.py +++ b/test/functional/abc-wallet-standardness.py @@ -166,9 +166,14 @@ fund_and_test_wallet( CScript([b'\x01', pubkey, OP_1, OP_CHECKMULTISIG]), False, False, sign_error='Data push larger than necessary') - # Note: 1-of-5 is nonstandard to fund but standard to spend. + # Note: 1-of-5 is nonstandard to fund yet is standard to spend. However, + # trying to spend it with our wallet in particular will generate + # too-dense sigchecks since our wallet currently only signs with ECDSA + # (Schnorr would not have this issue). fund_and_test_wallet( - CScript([OP_1, pubkey, pubkey, pubkey, pubkey, pubkey, OP_5, OP_CHECKMULTISIG]), False, False) + CScript([OP_1, pubkey, pubkey, pubkey, pubkey, pubkey, + OP_5, OP_CHECKMULTISIG]), False, False, + sign_error='Input SigChecks limit exceeded') fund_and_test_wallet( CScript([OP_1, pubkey, pubkey, pubkey, OP_PUSHDATA1, pubkey, pubkey, OP_5, OP_CHECKMULTISIG]), False, False,