Page MenuHomePhabricator

Ban node using the wrong magic.
ClosedPublic

Authored by deadalnix on Apr 1 2018, 20:51.

Details

Summary

A few host on the network keep using the wrong magic. They try to connect again and again to ABC nodes, which is undesirable. Because the node is disconected immediately, the banscore is not tracked accross connexion attempt and the node never gets banned. The long term solution may be to add a banscore per IP or subnet, but in the meantime, we can simply ban nodes using the wrong magic.

The host 23.92.36.9 on mainnet and 72.36.89.11 on testnet are especially bad offenders. Because of their suspicious behavior, they got added it to the suspicious host list.

Test Plan

Run a node and monitor the logs. Make sure we now have many messages of the kind

connection from 23.92.36.9:23665 dropped (banned)

Instead of the usual INVALID MESSAGESTART error.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
banwrongmagic
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2221
Build 2585: Bitcoin ABC Buildbot (legacy)
Build 2584: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 1 2018, 21:06
This revision was automatically updated to reflect the committed changes.