Concordium / Concordium/concordium-node

Improve awkward ban handling

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
[Prio] Low [Type] Maintenance
Dominant language
Haskell
Stars
108
Forks
24
Avg merge
2d 4h
Merged PRs (30d)
9

Description

**Task description**

The ban handling is not entirely clean. There are two types BanId and PersistedBanId. The main use for BanId are soft bans, the main use for PersistedBanId are long-term bans. This latter is only supported by IP.

But then the BanId is repurposed as the type to use for bans supplied via the RPC interface, leading to awkward ad-hoc functions like `drop_and_maybe_ban`. We should improve this to remove this ad-hoc handling.

Either we should remove bans by node id completely, or introduce a new intermediate ban type

Unban is currently only possible by IP, but the protobuf definition is more liberal, leading to error cases that should be disallowed by typing. This should also be improved..

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.