Fantom-foundation / go-opera

Opera blockchain protocol secured by the Lachesis consensus algorithm
https://fantom.foundation/
GNU Lesser General Public License v3.0
283 stars 283 forks source link

Disconnect unwanted and inactive peers #430

Closed jmozah closed 1 year ago

jmozah commented 1 year ago

Describe the bug

1) Some clients that are not opera have the caps set to caps="[opera/62 opera/63]". Because of this, they slip through the discovery checks and occupy a peer slot in the application layer. Those are either bots or improperly set client names. These clients need to be kicked out to allow proper peers to connect.

2) Some bots connect by giving proper caps and client names and occupying peer slots. They need to be identified and kicked out too.

To Reproduce Steps to reproduce the behavior: 1) Run a normal mainnet client and you will see invalid client names (go-corex, Efireal, Geth all with caps=[opera/62]) connecting as valid peers.

Expected behavior Only valid opera clients with propers caps that contribute to the network should be allowed.