Concordium / Concordium/concordium-node
Improve awkward ban handling
- 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
Assessment
This issue has not been assessed yet.