-
Notifications
You must be signed in to change notification settings - Fork 767
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
Unique Usernames in Identity Pallet #2651
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joepetrowski
added
the
T2-pallets
This PR/Issue is related to a particular pallet.
label
Dec 7, 2023
ggwpez
approved these changes
Jan 3, 2024
gupnik
approved these changes
Jan 4, 2024
/// `username.suffix`. | ||
#[pallet::call_index(19)] | ||
#[pallet::weight(T::WeightInfo::remove_expired_approval())] | ||
pub fn remove_expired_approval( |
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.
Task API can be used for this.
seadanda
approved these changes
Jan 4, 2024
Co-authored-by: Dónal Murray <[email protected]>
bkontur
added a commit
to bkontur/runtimes
that referenced
this pull request
Jan 29, 2024
bkontur
added a commit
to bkontur/runtimes
that referenced
this pull request
Jan 29, 2024
bkontur
added a commit
to bkontur/runtimes
that referenced
this pull request
Jan 30, 2024
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/people-chain-launch-and-identity-migration-plan/5930/3 |
bkontur
added a commit
to bkontur/runtimes
that referenced
this pull request
Feb 3, 2024
bkontur
added a commit
to bkontur/runtimes
that referenced
this pull request
Feb 3, 2024
bkontur
added a commit
to bkontur/runtimes
that referenced
this pull request
Feb 6, 2024
11 tasks
This was referenced Mar 5, 2024
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this pull request
Mar 25, 2024
This PR allows _username authorities_ to issue unique usernames that correspond with an account. It also provides two-way lookup, that is from `AccountId` to a single, "primary" `Username` (alongside `Registration`) and multiple unique `Username`s to an `AccountId`. Key features: - Username Authorities added (and removed) via privileged origin. - Authorities have a `suffix` and an `allocation`. They can grant up to `allocation` usernames. Their `suffix` will be appended to the usernames that they issue. A suffix may be up to 7 characters long. - Users can ask an authority to grant them a username. This will take the form `myusername.suffix`. The entire name (including suffix) must be less than or equal to 32 alphanumeric characters. - Users can approve a username for themselves in one of two ways (that is, authorities cannot grant them arbitrarily): - Pre-sign the entire username (including suffix) with a secret key that corresponds to their `AccountId` (for keyed accounts, obviously); or - Accept the username after it has been granted by an authority (it will be queued until accepted) (for non-keyed accounts like pure proxies or multisigs). - The system does not require any funds or deposits. Users without an identity will be given a default one (presumably all fields set to `None`). If they update this info, they will need to place the normal storage deposit. - If a user does not have any username, their first one will be set as `Primary`, and their `AccountId` will map to that one. If they get subsequent usernames, they can choose which one to be their primary via `set_primary_username`. - There are some state cleanup functions to remove expired usernames that have not been accepted and dangling usernames whose owners have called `clear_identity`. TODO: - [x] Add migration to runtimes - [x] Probably do off-chain migration into People Chain genesis - [x] Address a few TODO questions in code (please review) --------- Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Gonçalo Pestana <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Dónal Murray <[email protected]>
bkchr
pushed a commit
that referenced
this pull request
Apr 10, 2024
This was referenced Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows username authorities to issue unique usernames that correspond with an account. It also provides two-way lookup, that is from
AccountId
to a single, "primary"Username
(alongsideRegistration
) and multiple uniqueUsername
s to anAccountId
.Key features:
suffix
and anallocation
. They can grant up toallocation
usernames. Theirsuffix
will be appended to the usernames that they issue. A suffix may be up to 7 characters long.myusername.suffix
. The entire name (including suffix) must be less than or equal to 32 alphanumeric characters.AccountId
(for keyed accounts, obviously); orNone
). If they update this info, they will need to place the normal storage deposit.Primary
, and theirAccountId
will map to that one. If they get subsequent usernames, they can choose which one to be their primary viaset_primary_username
.clear_identity
.TODO: