Commit 354378d
fix: enforce maxRequestsPerPeer on direct SeenTx path in CAT mempool (#2880)
## Summary
- Enforce `maxRequestsPerPeer` check before calling `requestTx` on the
direct SeenTx handler path (when signer/sequence info is missing)
- Previously a single peer could bypass the intended 30-request per-peer
cap by sending SeenTx messages with nil signer and zero sequence
- Add regression test `TestSeenTxDirectPathEnforcesPerPeerRequestLimit`
## Test plan
- [x] New test `TestSeenTxDirectPathEnforcesPerPeerRequestLimit` fails
before fix (120 requests) and passes after (capped at 30)
- [x] All existing `mempool/cat` tests pass
Closes
https://dashboard.hackenproof.com/manager/companies/celestia/celestia/reports/CELESTIA-235
Closes
https://linear.app/celestia/issue/PROTOCO-1295/triage-celestia-235-should-be-treated-as-main
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a
href="https://app.devin.ai/review/celestiaorg/celestia-core/pull/2880"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
(cherry picked from commit 88d3c08)1 parent 252b1bd commit 354378d
3 files changed
Lines changed: 59 additions & 1 deletion
File tree
- .changelog/unreleased/bug-fixes
- mempool/cat
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
426 | 436 | | |
427 | 437 | | |
428 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1516 | 1516 | | |
1517 | 1517 | | |
1518 | 1518 | | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
0 commit comments