cmd, p2p: filter peers by regex on name#2404
Conversation
I may be wrong, but i think what you are fighting are "fake nodes" and they can easily bypass this "check". |
yes, it is just optional feature, can not solve the case you mentioned. But could be useful in some cases. |
|
Obsolete peers should be filtered based on the fork ID. This seems really useless. |
|
1.to filter out specified nodes that the name contains "alice" This will reject connection from client with name "alice*" 2.to filter out specified nodes that the name contains either "alice" or "bob" 3.Some Examples |
Description
This PR adds a new feature to filter peers by their names based on a set of customized regex patterns.
Rationale
Some outdated versions of nodes running on BSC may keep connecting to a healthy set of peers and only consume information, but not return any useful data. Such nodes should be filtered out to save network bandwidth.
Example
In the config file:
An example of a false regexp pattern error message: