-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(registry): is_community_verified #73
base: master
Are you sure you want to change the base?
Conversation
fn _is_human(&self, account: &AccountId) -> SBTs { | ||
if self._is_banned(&account) { | ||
return vec![]; | ||
fn _is_human(&self, account: &AccountId, no_skip_ban: bool) -> SBTs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need no_skip_ban
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can put conditions in one if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to not repeat that check in case we are coming from is_community_verified
Are we going to update flag list to use |
/// If `is_human` is false, then the `is_human` check is skipped and empty list is | ||
/// returned. Otherwise `is_human` is assumed to be required and if the IAH check fails, | ||
/// the community verification is skipped (so two empty lists are returned). | ||
pub fn is_community_verified(&self, account: AccountId, is_human: bool) -> (SBTs, SBTs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need the is human here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid is_human
call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left few comments. I am not sure why do we return two proofs? Do we need the iah:bool? I think if we consider someone not gray listed then we assume hes a human. The only case is when someone is human, but not community verified. Could you explain it?
/// returned. Otherwise `is_human` is assumed to be required and if the IAH check fails, | ||
/// the community verification is skipped (so two empty lists are returned). | ||
/// returned. | ||
/// EXPERIMENTAL: the function API can change in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add here ? Maybe if first SBTs is empty that means it is not community verified
The graylist is not going to be explicit. Nobody is going to load users to flag them as graylist.
Instead, the definition of graylist is that it's an account without reputation. So we are proposing the following method, that resambles
is_human
:is_community_verified
which will return list of proofs that the account has been verified by a community. This is meant to be consistent withis_human
which has been proven to be useful.TODO: