From ddda11cb6a1909e68817c7e8e7db8c529e74902d Mon Sep 17 00:00:00 2001 From: Russell O'Connor Date: Wed, 23 Jul 2025 17:26:53 -0400 Subject: [PATCH] Unconditionally accept Simplicity spends in the mempool Taproot and other soft-forks historically in Bitcoin have not gated mempool access. --- src/policy/policy.h | 4 +++- src/validation.cpp | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index 944d65d0c50..0c48bad77c0 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -80,7 +80,9 @@ static constexpr unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VE SCRIPT_VERIFY_TAPROOT | SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION | SCRIPT_VERIFY_DISCOURAGE_OP_SUCCESS | - SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_PUBKEYTYPE; + SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_PUBKEYTYPE | + SCRIPT_VERIFY_SIMPLICITY; + /** For convenience, standard but not mandatory verify flags. */ static constexpr unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS; diff --git a/src/validation.cpp b/src/validation.cpp index d62f942720d..9bad35fcc7a 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1072,10 +1072,6 @@ bool MemPoolAccept::PolicyScriptChecks(const ATMPArgs& args, Workspace& ws) scriptVerifyFlags |= SCRIPT_SIGHASH_RANGEPROOF; } - if (DeploymentActiveAfter(m_active_chainstate.m_chain.Tip(), args.m_chainparams.GetConsensus(), Consensus::DEPLOYMENT_SIMPLICITY)) { - scriptVerifyFlags |= SCRIPT_VERIFY_SIMPLICITY; - } - // Check input scripts and signatures. // This is done last to help prevent CPU exhaustion denial-of-service attacks. if (!CheckInputScripts(tx, state, m_view, scriptVerifyFlags, true, false, ws.m_precomputed_txdata)) {