From 8e44990ed463b0bf5a175049526d8f4d3f08b208 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sat, 20 Dec 2025 23:35:54 +0530 Subject: [PATCH] chore!: enforce ban for re-propagation of stale `QFCOMMIT`s --- src/llmq/blockprocessor.cpp | 5 +++-- src/version.h | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/llmq/blockprocessor.cpp b/src/llmq/blockprocessor.cpp index 5f9290850cac..791cd430115a 100644 --- a/src/llmq/blockprocessor.cpp +++ b/src/llmq/blockprocessor.cpp @@ -131,8 +131,9 @@ MessageProcessingResult CQuorumBlockProcessor::ProcessMessage(const CNode& peer, if (pQuorumBaseBlockIndex->nHeight < (m_chainstate.m_chain.Height() - llmq_params_opt->dkgInterval)) { LogPrint(BCLog::LLMQ, "CQuorumBlockProcessor::%s -- block %s is too old, peer=%d\n", __func__, qc.quorumHash.ToString(), peer.GetId()); - // TODO: enable punishment in some future version when all/most nodes are running with this fix - // ret.m_error = MisbehavingError{100}; + if (peer.GetCommonVersion() >= QFCOMMIT_STALE_REPROP_BAN_VERSION) { + ret.m_error = MisbehavingError{100}; + } return ret; } if (HasMinedCommitment(type, qc.quorumHash)) { diff --git a/src/version.h b/src/version.h index 6b5edffb7755..651bfc339153 100644 --- a/src/version.h +++ b/src/version.h @@ -10,8 +10,7 @@ * network protocol versioning */ - -static const int PROTOCOL_VERSION = 70238; +static const int PROTOCOL_VERSION = 70239; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; @@ -52,13 +51,15 @@ static const int INCREASE_MAX_HEADERS2_VERSION = 70235; //! Behavior of QRINFO is changed in this protocol version static const int EFFICIENT_QRINFO_VERSION = 70236; - //! cycleHash in isdlock message switched to using quorum's base block in this version static const int ISDLOCK_CYCLEHASH_UPDATE_VERSION = 70237; //! Introduced new p2p message platform pose BAN static const int PLATFORM_BAN_VERSION = 70238; +//! Ban of re-propagation of old QFCOMMIT enforcement +static const int QFCOMMIT_STALE_REPROP_BAN_VERSION = 70239; + // Make sure that none of the values above collide with `ADDRV2_FORMAT`. #endif // BITCOIN_VERSION_H