-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(net): bound QGETDATA request tracking #7519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -938,7 +938,7 @@ static RPCHelpMan quorum_getdata() | |
| if (!quorum->m_quorum_base_block_index) return false; | ||
| const llmq::CQuorumDataRequest request(llmqType, quorum->qc->quorumHash, nDataMask, proTxHash); | ||
| const llmq::CQuorumDataRequestKey key(pNode->GetVerifiedProRegTxHash(), true, quorum->qc->quorumHash, llmqType); | ||
| if (!llmq_ctx.qman->RegisterDataRequest(key, request)) return false; | ||
| if (llmq_ctx.qman->RegisterDataRequest(key, request) != llmq::DataRequestRegistration::Accepted) return false; | ||
| connman.PushMessage(pNode, CNetMsgMaker(pNode->GetCommonVersion()).Make(NetMsgType::QGETDATA, request)); | ||
|
Comment on lines
+941
to
942
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When AGENTS.md reference: AGENTS.md:L169-L180 Useful? React with 👍 / 👎. |
||
| return true; | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because every unauthenticated qwatch connection has a null
proRegTx, one remote peer can submit 64 distinct valid active-chain requests and exhaust this shared bucket. Subsequent requests from every other qwatch client then returnCapacityExhausted, whichNetQuorum::ProcessMessagesilently drops, and disconnecting the attacker does not release the entries, so the outage lasts until expiry/cleanup. Track unauthenticated requests by connection (and purge them on disconnect) rather than using the shared null identity.Useful? React with 👍 / 👎.