Statement Distribution Per Peer Rate Limit (#3444)
- [x] Drop requests from a PeerID that is already being served by us. - [x] Don't sent requests to a PeerID if we already are requesting something from them at that moment (prioritise other requests or wait). - [x] Tests - [ ] ~~Add a small rep update for unsolicited requests (same peer request)~~ not included in original PR due to potential issues with nodes slowly updating - [x] Add a metric to track the amount of dropped requests due to peer rate limiting - [x] Add a metric to track how many time a node reaches the max parallel requests limit in v2+ Helps with but does not close yet: https://github.com/paritytech-secops/srlabs_findings/issues/303
parent
c973fe86
Showing
- .gitlab/pipeline/zombienet/polkadot.yml 8 additions, 0 deletions.gitlab/pipeline/zombienet/polkadot.yml
- Cargo.lock 1 addition, 0 deletionsCargo.lock
- polkadot/node/malus/Cargo.toml 1 addition, 0 deletionspolkadot/node/malus/Cargo.toml
- polkadot/node/malus/src/malus.rs 7 additions, 0 deletionspolkadot/node/malus/src/malus.rs
- polkadot/node/malus/src/variants/mod.rs 2 additions, 0 deletionspolkadot/node/malus/src/variants/mod.rs
- polkadot/node/malus/src/variants/spam_statement_requests.rs 155 additions, 0 deletionspolkadot/node/malus/src/variants/spam_statement_requests.rs
- polkadot/node/network/statement-distribution/src/lib.rs 1 addition, 0 deletionspolkadot/node/network/statement-distribution/src/lib.rs
- polkadot/node/network/statement-distribution/src/metrics.rs 38 additions, 2 deletionspolkadot/node/network/statement-distribution/src/metrics.rs
- polkadot/node/network/statement-distribution/src/v2/mod.rs 52 additions, 23 deletionspolkadot/node/network/statement-distribution/src/v2/mod.rs
- polkadot/node/network/statement-distribution/src/v2/requests.rs 178 additions, 22 deletions...ot/node/network/statement-distribution/src/v2/requests.rs
- polkadot/node/network/statement-distribution/src/v2/tests/requests.rs 1 addition, 1 deletion...e/network/statement-distribution/src/v2/tests/requests.rs
- polkadot/zombienet_tests/functional/0012-spam-statement-distribution-requests.toml 43 additions, 0 deletions...functional/0012-spam-statement-distribution-requests.toml
- polkadot/zombienet_tests/functional/0012-spam-statement-distribution-requests.zndsl 27 additions, 0 deletions...unctional/0012-spam-statement-distribution-requests.zndsl
- prdoc/pr_3444.prdoc 25 additions, 0 deletionsprdoc/pr_3444.prdoc
Please register or sign in to comment