Skip to content

Commit 9b08ff2

Browse files
feat: enhance recovered signature propagation by leveraging full-mesh connections for all members
1 parent 3bdb9ce commit 9b08ff2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/llmq/utils.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,19 @@ bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, CConnman&
862862
if (isMember) {
863863
connections = GetQuorumConnections(llmqParams, dmnman, qsnapman, sporkman, pQuorumBaseBlockIndex, myProTxHash,
864864
true);
865-
relayMembers = GetQuorumRelayMembers(llmqParams, dmnman, qsnapman, pQuorumBaseBlockIndex, myProTxHash, true);
865+
// If all-members-connected is enabled for this quorum type, leverage the full-mesh
866+
// connections for low-latency recovered sig propagation by treating all members as
867+
// relay members (instead of the ring-based subset). This ensures peers will send
868+
// QSENDRECSIGS to each other across the full mesh and set m_wants_recsigs widely.
869+
if (IsAllMembersConnectedEnabled(llmqParams.type, sporkman)) {
870+
for (const auto& dmn : members) {
871+
if (dmn->proTxHash != myProTxHash) {
872+
relayMembers.emplace(dmn->proTxHash);
873+
}
874+
}
875+
} else {
876+
relayMembers = GetQuorumRelayMembers(llmqParams, dmnman, qsnapman, pQuorumBaseBlockIndex, myProTxHash, true);
877+
}
866878
} else {
867879
auto cindexes = CalcDeterministicWatchConnections(llmqParams.type, pQuorumBaseBlockIndex, members.size(), 1);
868880
for (auto idx : cindexes) {

0 commit comments

Comments
 (0)