Motivation
GETMNLISTDIFF is unauthenticated, requires no proof of work, and is not currently rate limited. Even with bounded MN list caches (see #7485), a peer can still drive non-trivial CPU work by repeatedly requesting historical diffs.
#7485 adds hard caps and a stale LRU tier so memory and repeat stale access are bounded, but absolute request rate is still unconstrained at the P2P layer.
Proposal
Add per-peer rate limiting for GETMNLISTDIFF in net_processing.cpp, similar to other DoS-sensitive message handlers. Limits should be sized from honest traffic (masternode/wallet sync during chain catch-up) rather than attacker-only thresholds.
Related
Motivation
GETMNLISTDIFFis unauthenticated, requires no proof of work, and is not currently rate limited. Even with bounded MN list caches (see #7485), a peer can still drive non-trivial CPU work by repeatedly requesting historical diffs.#7485 adds hard caps and a stale LRU tier so memory and repeat stale access are bounded, but absolute request rate is still unconstrained at the P2P layer.
Proposal
Add per-peer rate limiting for
GETMNLISTDIFFinnet_processing.cpp, similar to other DoS-sensitive message handlers. Limits should be sized from honest traffic (masternode/wallet sync during chain catch-up) rather than attacker-only thresholds.Related