encointer/pallets

Why is whitelist in faucet an option?

Closed this issue · 3 comments

It would be much easier to just have an empty array. Otherwise, I need to do some extra null handling on all frontends.

brenzi commented

the idea is that None means that every community can drip (unlike no one can).
I wanted this to be explicit, not implicit in an empty vec. But I admit that "explicit" would have been an enum like this:

WhitelistType::AnyCommunity
WhitelistType::Restricted(Vec)

We may want to diversify further due to BeeDance and LoCoFlex. I guess that due to the different security assumptions we may even want:

WhitelistType::AnyCommunity
WhitelistType::AnyCommunityWithRules(Vec)
WhitelistType::Restricted(Vec)

assuming that CommunityIdentifier is the overarching type for communities of all rule types

TBD further

Alright, this makes sense. I did not get that part of the logic, and I already saw your commit in the wallet fixing my misunderstanding that null == empty vec. ;)

As my question has been answered, I will close this issue and we can continue the discussion in #344