Commit b668f8d
committed
Merge #7004: refactor: enhance CSigSharesManager with multi-threaded worker pool and dispatcher
f033c54 fix: call join first (pasta)
cc70203 fix: 12 char thread name (PastaPastaPasta)
1c52425 refactor: streamline CSigSharesManager's message handling and improve thread safety (pasta)
e150738 refactor: enhance CSigSharesManager with multi-threaded worker pool and dispatcher (pasta)
Pull request description:
## Issue being fixed or feature implemented
I don't have good data as to if this results in improvement. However, when sigShare BLS signing (if ever) takes more than a full thread, we will be bottlenecked.
This PR addresses two concerns
1. Separate out cleanup and network sending logic into it's own thread
This should prevent the network sending or cleanup logic from slowing down the creation of sigShares
2. Use a thread pool and dispatch jobs to that pool
This should enable scaling sigShare creation past 1 full thread, and currently could use up to half of available cores for sigShare signing.
## How Has This Been Tested?
This hadn't been tested; please review, but I'll want to deploy this on testnet before merging I think.
## Breaking Changes
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
Top commit has no ACKs.
Tree-SHA512: 231f4910bc328a4b70ca3df6d758705699f29465f592d08a31c5ae6991db4928da0285412e1578c6ba55488d619374749f5ea857f471784f9f1937be8489fcd33 files changed
+129
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | | - | |
202 | | - | |
| 201 | + | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
207 | 218 | | |
208 | 219 | | |
209 | | - | |
| 220 | + | |
210 | 221 | | |
211 | 222 | | |
212 | 223 | | |
213 | 224 | | |
214 | 225 | | |
215 | 226 | | |
216 | | - | |
217 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
218 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
219 | 238 | | |
220 | 239 | | |
221 | 240 | | |
| |||
1611 | 1630 | | |
1612 | 1631 | | |
1613 | 1632 | | |
1614 | | - | |
| 1633 | + | |
1615 | 1634 | | |
1616 | | - | |
1617 | | - | |
1618 | 1635 | | |
1619 | 1636 | | |
| 1637 | + | |
| 1638 | + | |
1620 | 1639 | | |
1621 | | - | |
1622 | | - | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1623 | 1643 | | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
1628 | 1649 | | |
1629 | | - | |
| 1650 | + | |
| 1651 | + | |
1630 | 1652 | | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
1634 | | - | |
| 1653 | + | |
| 1654 | + | |
1635 | 1655 | | |
1636 | 1656 | | |
1637 | 1657 | | |
1638 | | - | |
| 1658 | + | |
1639 | 1659 | | |
1640 | | - | |
1641 | | - | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1642 | 1675 | | |
1643 | 1676 | | |
1644 | | - | |
| 1677 | + | |
1645 | 1678 | | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
1660 | | - | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
1664 | 1723 | | |
1665 | 1724 | | |
1666 | 1725 | | |
1667 | 1726 | | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1668 | 1733 | | |
1669 | 1734 | | |
1670 | 1735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
364 | | - | |
| 365 | + | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
| |||
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
383 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| |||
426 | 429 | | |
427 | 430 | | |
428 | 431 | | |
429 | | - | |
430 | | - | |
| 432 | + | |
| 433 | + | |
431 | 434 | | |
432 | 435 | | |
433 | 436 | | |
| |||
500 | 503 | | |
501 | 504 | | |
502 | 505 | | |
503 | | - | |
504 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
505 | 518 | | |
506 | 519 | | |
507 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
0 commit comments