Commit ecf2382
committed
Merge #7415: fix: bound pending sig share queue
bdca48c refactor: use CountedBucketMap for counting total amount of pending sigs (Konstantin Akimov)
355da45 fix: cap sig-share verification batch by share count (PastaClaw)
08d9533 fix: cap amount of unverified batches by 4 (Konstantin Akimov)
e2862fe fix: the actual cap enforcement for pending signatures (Konstantin Akimov)
4666ef3 test: add regression tests for CountedBucketMap (Konstantin Akimov)
ec15f90 refactor: use dedicated util structure to count internal objects in signing-shares (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
Pending incoming LLMQ sig shares are admitted cheaply and verified later by worker threads. Direct and batched share traffic could grow retained pending verification work without per-node/global backpressure.
This replaces closed PR #7413 and keeps the same scope: resource/backpressure hardening for LLMQ signing, with no consensus or user-facing behavior change.
## What was done?
- Add per-node and global caps for pending incoming sig shares.
- Track pending counts explicitly so cap checks do not require repeated scans.
- Gate `QSIGSHARE` and `QBSIGSHARES` pending admission; over-cap shares are dropped without misbehavior scoring.
- Clear pending incoming shares when a peer is banned and skip banned node states during collection.
- Refuse new pending work for already-banned node states.
- Add unit coverage for cap/drop/count cleanup behavior.
## How Has This Been Tested?
- `./autogen.sh`
- `./configure --without-gui --disable-bench --disable-fuzz-binary`
- `make -C src test/test_dash -j$(sysctl -n hw.ncpu)`
- `src/test/test_dash --run_test=llmq_utils_tests`
- `git diff --check upstream/develop..HEAD`
- `COMMIT_RANGE=upstream/develop..HEAD test/lint/lint-whitespace.py`
## Breaking Changes
None.
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
kwvg:
utACK bdca48c
Tree-SHA512: e2403635a608aab5488dbf10b481a778e735a6e5b065eec5a4cc444818f61e89b3a688f82c14aaceae07fd714432d39c013769a54aa66e31bb8abddb3531aaf35 files changed
Lines changed: 244 additions & 60 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
325 | 332 | | |
326 | 333 | | |
327 | 334 | | |
328 | | - | |
329 | | - | |
| 335 | + | |
330 | 336 | | |
331 | 337 | | |
332 | 338 | | |
333 | 339 | | |
334 | 340 | | |
| 341 | + | |
335 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
336 | 348 | | |
337 | 349 | | |
338 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
422 | 427 | | |
423 | 428 | | |
424 | 429 | | |
425 | | - | |
| 430 | + | |
426 | 431 | | |
427 | 432 | | |
428 | 433 | | |
| |||
467 | 472 | | |
468 | 473 | | |
469 | 474 | | |
470 | | - | |
| 475 | + | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
474 | 479 | | |
475 | 480 | | |
476 | 481 | | |
477 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
478 | 510 | | |
479 | | - | |
| 511 | + | |
480 | 512 | | |
481 | 513 | | |
482 | 514 | | |
| |||
487 | 519 | | |
488 | 520 | | |
489 | 521 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
496 | 531 | | |
497 | 532 | | |
498 | 533 | | |
499 | | - | |
| 534 | + | |
500 | 535 | | |
501 | 536 | | |
502 | 537 | | |
| |||
508 | 543 | | |
509 | 544 | | |
510 | 545 | | |
511 | | - | |
512 | 546 | | |
| 547 | + | |
513 | 548 | | |
514 | 549 | | |
515 | 550 | | |
| |||
1426 | 1461 | | |
1427 | 1462 | | |
1428 | 1463 | | |
| 1464 | + | |
1429 | 1465 | | |
1430 | 1466 | | |
1431 | 1467 | | |
| |||
0 commit comments