lighthouse/beacon_node
divma 4d77784bb8 Rate limit RPC requests (#1402)
## Issue Addressed
#1056 

## Proposed Changes
- Add a rate limiter to the RPC behaviour. This also means the rate limiting occurs just before the door to the application level, so the number of connections a peer opens does not affect this (this would happen in the future if put on the handler)
- The algorithm used is the leaky bucket as a meter / token bucket implemented the GCRA way
- Each protocol has its own limit. Due to the way the algorithm works, the "small" protocols have a hard limit, while bbrange and bbroot allow [burstiness](https://www.wikiwand.com/en/Burstiness). This is so that a peer can't request hundreds of individual requests expecting only one block in a short period of time, it also allows a peer to send two half size requests instead of one with max if they want to without getting limited, and.. it also allows a peer to request a batch of the maximum size and then send _appropriately spaced_ requests of really small sizes. From what I've seen in sync this is plausible when reaching the target slot.

## Additional Info
Needs to be heavily tested
2020-07-31 05:47:09 +00:00
..
beacon_chain Add info about peer scoring to block/attestation errors (#1393) 2020-07-26 13:16:49 +10:00
client Add support for multiple testnet flags (#1396) 2020-07-29 06:39:29 +00:00
eth1 Add info about valid deposit count to logs (#1391) 2020-07-25 04:44:10 +00:00
eth2_libp2p Rate limit RPC requests (#1402) 2020-07-31 05:47:09 +00:00
genesis Add info about valid deposit count to logs (#1391) 2020-07-25 04:44:10 +00:00
network Downgrade sync and rpc warn logs (#1417) 2020-07-30 13:52:44 +10:00
operation_pool Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
rest_api Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
src Add support for multiple testnet flags (#1396) 2020-07-29 06:39:29 +00:00
store Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
tests Improve tokio task execution (#1181) 2020-06-04 21:48:05 +10:00
timer Update deps (#1322) 2020-07-06 11:55:56 +10:00
version v0.1.2 (#1155) 2020-05-18 15:05:23 +10:00
websocket_server Improve tokio task execution (#1181) 2020-06-04 21:48:05 +10:00
Cargo.toml Add ability to configure CORS header (#1345) 2020-07-16 07:23:14 +00:00