lnd.xprv/chanfitness
carla 70bca1f350
chanfitness: add flap count based rate limiting
To prevent flapping peers from endlessly dos-ing us with online and
offline events, we rate limit the number of events we will store per
period using their flap rate to determine how often we will add their
events to our in memory list of online events.

Since we are tracking online events, we need to track the aggregate
change over the rate limited period, otherwise we will lose track of
a peer's current state. For example, if we store an online event, then
do not store the subsequent offline event, we will believe that the
peer is online when they actually aren't. To address this, we "stage"
a single event which keeps track of all the events that occurred while
we were rate limiting the peer. At the end of the rate limting period,
we will store the last state for that peer, thereby ensureing that
we maintain our record of their most recent state.
2020-09-08 13:47:20 +02:00
..
chanevent_test.go chanfitness: add flap count based rate limiting 2020-09-08 13:47:20 +02:00
chanevent.go chanfitness: add flap count based rate limiting 2020-09-08 13:47:20 +02:00
chaneventstore_test.go chanfitness: refactor to store channels by peer 2020-09-08 13:47:18 +02:00
chaneventstore_testctx_test.go chanfitness: pass clock in to chaneventstore for testing 2020-09-08 13:47:15 +02:00
chaneventstore.go chanfitness: refactor to store channels by peer 2020-09-08 13:47:18 +02:00
interface.go chanfitness: record timestamped flap count for peers 2020-09-08 13:47:19 +02:00
log.go chanfitness: Add channel event log structure 2019-10-25 09:51:07 +02:00
rate_limit_test.go chanfitness: add flap count based rate limiting 2020-09-08 13:47:20 +02:00
rate_limit.go chanfitness: add flap count based rate limiting 2020-09-08 13:47:20 +02:00