Skip to content

Commit 8e44990

Browse files
committed
chore!: enforce ban for re-propagation of stale QFCOMMITs
1 parent 0455eb8 commit 8e44990

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/llmq/blockprocessor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ MessageProcessingResult CQuorumBlockProcessor::ProcessMessage(const CNode& peer,
131131
if (pQuorumBaseBlockIndex->nHeight < (m_chainstate.m_chain.Height() - llmq_params_opt->dkgInterval)) {
132132
LogPrint(BCLog::LLMQ, "CQuorumBlockProcessor::%s -- block %s is too old, peer=%d\n", __func__,
133133
qc.quorumHash.ToString(), peer.GetId());
134-
// TODO: enable punishment in some future version when all/most nodes are running with this fix
135-
// ret.m_error = MisbehavingError{100};
134+
if (peer.GetCommonVersion() >= QFCOMMIT_STALE_REPROP_BAN_VERSION) {
135+
ret.m_error = MisbehavingError{100};
136+
}
136137
return ret;
137138
}
138139
if (HasMinedCommitment(type, qc.quorumHash)) {

src/version.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
* network protocol versioning
1111
*/
1212

13-
14-
static const int PROTOCOL_VERSION = 70238;
13+
static const int PROTOCOL_VERSION = 70239;
1514

1615
//! initial proto version, to be increased after version/verack negotiation
1716
static const int INIT_PROTO_VERSION = 209;
@@ -52,13 +51,15 @@ static const int INCREASE_MAX_HEADERS2_VERSION = 70235;
5251
//! Behavior of QRINFO is changed in this protocol version
5352
static const int EFFICIENT_QRINFO_VERSION = 70236;
5453

55-
5654
//! cycleHash in isdlock message switched to using quorum's base block in this version
5755
static const int ISDLOCK_CYCLEHASH_UPDATE_VERSION = 70237;
5856

5957
//! Introduced new p2p message platform pose BAN
6058
static const int PLATFORM_BAN_VERSION = 70238;
6159

60+
//! Ban of re-propagation of old QFCOMMIT enforcement
61+
static const int QFCOMMIT_STALE_REPROP_BAN_VERSION = 70239;
62+
6263
// Make sure that none of the values above collide with `ADDRV2_FORMAT`.
6364

6465
#endif // BITCOIN_VERSION_H

0 commit comments

Comments
 (0)