Following are the reasons for disconnection, or increasing the banscore.
* Peers which provide a chain with less work than the minimum-chain-work during IBD are disconnected
* If the node is providing invalid data like mutated block or data not meeting consensus requirements
* If the compact block had a valid header, but contained invalid txs, the peer should not be punished
* Ban outbound (but not inbound) peers if on an invalid chain.
* Invalid header, invalid block checkpoint, and invalid previous block will result in outright ban
* If previous block is missing, the banscore is incremented by 10. This is done so as to prevent DoS attacks
* If the peer sends a getblocktxn with out-of-bounds tx indices it will result in a ban
* There are other items related to bloom version and bloom size which might result in ban
* First message should be a version message and each connection can send version message only once. If not, the banscore is incremented by 1
* If the node is sending addr messages with more than 1000 addresses, then banscore is incremented by 20
* Sending inv messages that exceeds the max size, then banscore is incremented by 20.
* Sending header messages with more than 2000 elements, resulting in incrementing banscore by 20.
* Nodes must NEVER send a data item > 520 bytes or misbehaving score is incremented by 100
Reasons for node to disconnect.
Reasons for node to disconnect.