Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Peer flooding block requests should get their reputation impacted #8257

Description

@crystalin

Currently we are facing a case where a node (probably panicking and trying to import blocks in a loop) is flooding the network with block request.

This generates a permanent high traffic (100Mb/s) between the nodes.
Our current solution is to use the iptable to ban the ip of that node but a proper solution should be used.

I'd suggest to have the peer reputation impacted by that kind of behavior to avoid having the peer connected forever.

Exemple of logs:

Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.371  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.397  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.551  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.599  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.796  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.811  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:28 localhost moonbase[1022024]: 2021-03-03 14:01:28.958  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:29 localhost moonbase[1022024]: 2021-03-03 14:01:29.193  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:29 localhost moonbase[1022024]: 2021-03-03 14:01:29.199  DEBUG tokio-runtime-worker block-request-handler: Handled block request from 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m.
Mar 03 14:01:29 localhost moonbase[1022024]: 2021-03-03 14:01:29.223  TRACE tokio-runtime-worker peerset: Fleeting 12D3KooWJ8Z1u8kgKCvCMxXZLbMf89bnTG82phhtun73YLux8x7m: 0 -> 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions