Commit bef9917
committed
Merge bitcoin/bitcoin#27114: p2p: Allow whitelisting manual connections
0a53361 docs: add release notes for #27114 (brunoerg)
e6b8f19 test: add coverage for whitelisting manual connections (brunoerg)
c985eb8 test: add option to speed up tx relay/mempool sync (brunoerg)
66bc6e2 Accept "in" and "out" flags to -whitelist to allow whitelisting manual connections (Luke Dashjr)
8e06be3 net_processing: Move extra service flag into InitializeNode (Luke Dashjr)
9133fd6 net: Move `NetPermissionFlags::Implicit` verification to `AddWhitelistPermissionFlags` (Luke Dashjr)
2863d7d net: store `-whitelist{force}relay` values in `CConnman` (brunoerg)
Pull request description:
Revives #17167. It allows whitelisting manual connections. Fixes #9923
Since there are some PRs/issues around this topic, I'll list some motivations/comments for whitelisting outbound connections from them:
- Speed-up tx relay/mempool sync for testing purposes (my personal motivation for this) - In #26970, theStack pointed out that we whitelist peers to speed up tx relay for fast mempool synchronization, however, since it applies only for inbound connections and considering the topology `node0 <--- node1 <---- node2 <--- ... <-- nodeN`, if a tx is submitted from any node other than node0, the mempool synchronization can take quite long.
- bitcoin/bitcoin#29058 (comment) - "Before enabling -v2transport by default (which I'd image may happen after bitcoin/bitcoin#24748) we could consider a way to force manual connections to be only-v1 or even only-v2 (disabling reconnect-with-v1). A possibility could be through a net permission flag, if bitcoin/bitcoin#27114 makes it in."
- bitcoin/bitcoin#17167 (comment) - "This would allow us to use bitcoin/bitcoin#25355 when making outgoing connections to all nodes, except to whitelisted ones for which we would use our persistent I2P address."
- Force-relay/mempool permissions for a node you intentionally connected to.
ACKs for top commit:
achow101:
ACK 0a53361
sr-gi:
re-ACK [0a53361](bitcoin/bitcoin@0a53361)
pinheadmz:
ACK 0a53361
Tree-SHA512: 97a79bb854110da04540897d2619eda409d829016aafdf1825ab5515334b0b42ef82f33cd41587af235b3af6ddcec3f2905ca038b5ab22e4c8a03d34f27aebe1File tree
41 files changed
+199
-108
lines changed- doc
- src
- test
- fuzz
- test/functional
- test_framework
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+199
-108
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
577 | 579 | | |
578 | 580 | | |
579 | 581 | | |
| |||
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
646 | | - | |
647 | | - | |
| 648 | + | |
| 649 | + | |
648 | 650 | | |
649 | 651 | | |
650 | 652 | | |
| |||
1800 | 1802 | | |
1801 | 1803 | | |
1802 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
1803 | 1807 | | |
1804 | 1808 | | |
1805 | 1809 | | |
| |||
1884 | 1888 | | |
1885 | 1889 | | |
1886 | 1890 | | |
| 1891 | + | |
1887 | 1892 | | |
1888 | | - | |
1889 | | - | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1890 | 1900 | | |
1891 | 1901 | | |
1892 | 1902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
517 | 521 | | |
518 | 522 | | |
519 | 523 | | |
| |||
530 | 534 | | |
531 | 535 | | |
532 | 536 | | |
| 537 | + | |
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
| |||
553 | 558 | | |
554 | 559 | | |
555 | 560 | | |
556 | | - | |
557 | | - | |
558 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
559 | 573 | | |
560 | 574 | | |
561 | 575 | | |
| |||
1721 | 1735 | | |
1722 | 1736 | | |
1723 | 1737 | | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
| 1738 | + | |
1732 | 1739 | | |
1733 | 1740 | | |
1734 | 1741 | | |
| |||
1783 | 1790 | | |
1784 | 1791 | | |
1785 | 1792 | | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
1791 | 1793 | | |
1792 | 1794 | | |
1793 | 1795 | | |
1794 | | - | |
| 1796 | + | |
1795 | 1797 | | |
1796 | 1798 | | |
1797 | 1799 | | |
| |||
1809 | 1811 | | |
1810 | 1812 | | |
1811 | 1813 | | |
1812 | | - | |
| 1814 | + | |
1813 | 1815 | | |
1814 | 1816 | | |
1815 | 1817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 56 | | |
62 | 57 | | |
63 | 58 | | |
| |||
1053 | 1048 | | |
1054 | 1049 | | |
1055 | 1050 | | |
1056 | | - | |
| 1051 | + | |
| 1052 | + | |
1057 | 1053 | | |
1058 | 1054 | | |
1059 | 1055 | | |
| |||
1064 | 1060 | | |
1065 | 1061 | | |
1066 | 1062 | | |
| 1063 | + | |
| 1064 | + | |
1067 | 1065 | | |
1068 | 1066 | | |
1069 | 1067 | | |
| |||
1087 | 1085 | | |
1088 | 1086 | | |
1089 | 1087 | | |
1090 | | - | |
| 1088 | + | |
| 1089 | + | |
1091 | 1090 | | |
1092 | 1091 | | |
1093 | 1092 | | |
| |||
1098 | 1097 | | |
1099 | 1098 | | |
1100 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
1101 | 1102 | | |
1102 | 1103 | | |
1103 | 1104 | | |
| |||
1339 | 1340 | | |
1340 | 1341 | | |
1341 | 1342 | | |
1342 | | - | |
| 1343 | + | |
1343 | 1344 | | |
1344 | 1345 | | |
1345 | 1346 | | |
| |||
1398 | 1399 | | |
1399 | 1400 | | |
1400 | 1401 | | |
1401 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1402 | 1405 | | |
1403 | 1406 | | |
1404 | 1407 | | |
| |||
1551 | 1554 | | |
1552 | 1555 | | |
1553 | 1556 | | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1554 | 1569 | | |
1555 | 1570 | | |
1556 | 1571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
| |||
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
64 | 82 | | |
| 83 | + | |
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
| |||
85 | 104 | | |
86 | 105 | | |
87 | 106 | | |
88 | | - | |
| 107 | + | |
89 | 108 | | |
90 | 109 | | |
91 | 110 | | |
| |||
104 | 123 | | |
105 | 124 | | |
106 | 125 | | |
107 | | - | |
| 126 | + | |
108 | 127 | | |
109 | 128 | | |
110 | 129 | | |
111 | | - | |
| 130 | + | |
| 131 | + | |
112 | 132 | | |
113 | 133 | | |
114 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
86 | | - | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1591 | 1596 | | |
1592 | 1597 | | |
1593 | 1598 | | |
| |||
0 commit comments