Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: c75fea9c94ed90090b766514e4cd2abce2fb7ae7
      
https://github.com/btcsuite/btcd/commit/c75fea9c94ed90090b766514e4cd2abce2fb7ae7
  Author: Tibor Bősze <[email protected]>
  Date:   2016-02-16 (Tue, 16 Feb 2016)

  Changed paths:
    M config.go
    M doc.go
    A dynamicbanscore.go
    A dynamicbanscore_test.go
    M rpcserver.go
    M sample-btcd.conf
    M server.go

  Log Message:
  -----------
  Implement banning based on dynamic ban scores

Dynamic ban scores consist of a persistent and a decaying component. The
persistent score can be used to create simple additive banning policies
simlar to those found in other bitcoin node implementations. The
decaying score enables the creation of evasive logic which handles
misbehaving peers (especially application layer DoS attacks) gracefully
by disconnecting and banning peers attempting various kinds of flooding.
Dynamic ban scores allow these two approaches to be used in tandem.

This pull request includes the following:

 - Dynamic ban score type & functions, with tests for core functionality
 - Ban score of connected peers can be queried via rpc (getpeerinfo)
 - Example policy with decaying score increments on mempool and getdata
 - Logging of misbehavior once half of the ban threshold is reached
 - Banning logic can be disabled via configuration (enabled by default)
 - User defined ban threshold can be set via configuration


Reply via email to