Commit b6894ff
feat: disable default dht discovery forwarding (#7128)
Description
---
- Disabled default forwarding of DHT discovery messages as this is not
required for the proper operation of the network. A config option has
been added to enable or disable this, but the default is false.
- Adjusted the DHT dedup cache default config to be a lot more
conservative before starting new dedup cycle - the amount of time an
identical inbound message will be ignored before being processed again.
Motivation and Context
---
Mainnet is being flooded with messages that do not contribute to the
blockchain.
How Has This Been Tested?
---
System-level testing shows markedly reduced overheads, inbound pipeline
finish times and overall memory usage. The dedup cache also does its job
much better now so the base node does not can ignore the endless round
robbin of the messages.
What process can a PR reviewer use to test or verify this change?
---
Code review.
System-level testing.
<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->
Breaking Changes
---
- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify
<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a new configuration option to enable or disable message
forwarding in the network's DHT. This option is disabled by default and
can be enabled for communication nodes.
- **Improvements**
- Increased the default cache capacity for deduplication and extended
the default cache trim interval, enhancing overall message handling
efficiency.
- **Documentation**
- Updated configuration files and documentation comments to reflect the
new forwarding option and revised cache settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: SW van Heerden <swvheerden@gmail.com>1 parent da7cd26 commit b6894ff
File tree
4 files changed
+16
-5
lines changed- common/config/presets
- comms/dht/src
4 files changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
372 | 374 | | |
373 | 375 | | |
374 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
171 | | - | |
172 | | - | |
| 175 | + | |
| 176 | + | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| |||
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
| 192 | + | |
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
532 | 533 | | |
533 | 534 | | |
534 | 535 | | |
| 536 | + | |
535 | 537 | | |
536 | 538 | | |
537 | 539 | | |
| |||
0 commit comments