Skip to content
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

Use apiSystemPeople for identities on {relay | system} chains, and keep compat for parachains #10598

Merged
merged 8 commits into from
May 21, 2024

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented May 20, 2024

Summary

The following PR ensures that all necessary chains will now query the people chain for any identity information. This PR also maintains support for any chain that does not use the people chain as their identity source of truth. All parachains and live networks should work as is.

For relay chains, set identity has now been disabled, with the exception of polkadot since it has not made the full migration yet.

Additions to apps config EndointOption and LinkOption

isPeople?: boolean;
isRelay?: boolean;
isPeopleForIdentity?: boolean;
relayName?: string;

Additions to ApiProps

apiIdentity: ApiPromise;
enableIdentity: boolean;
apiSystemPeople: ApiPromise | null;

Additional notes

  • I would like to write some inline comments explaining some of the new fields on the types within apps-config, and ApiProps.
  • Once Fix api.derive.accounts.{info && identity} api#5885 is included in the next api release it will also fix the derive issue for account info.

closes: #10588

@TarikGul
Copy link
Member Author

This is almost ready, I just need to also give support for systems using systemPeople and then some tests and the PR should be ready.

@TarikGul
Copy link
Member Author

TarikGul commented May 21, 2024

Last i need to ensure a safe way to disable all tx.identity calls for any chain but the people chain. While also keeping support for all parachains and other chains...

Also need to ensure the endpoint urls are populated for systemParachains

Also need to ensure useSystemApi is replaced in the proper places.

@TarikGul
Copy link
Member Author

Ready!

@TarikGul TarikGul changed the title Use apiSystemPeople for identities on relay chains Use apiSystemPeople for identities on {relay | system} chains, and keep compat for parachains May 21, 2024
@pandres95
Copy link
Contributor

@TarikGul does this change allows for other parachains to register people as their identity provider?

@TarikGul
Copy link
Member Author

@pandres95 Yes! For sure, there is one small edge case I would need to fix, but I designed it in a way where any chain can opt in.

@TarikGul
Copy link
Member Author

TarikGul commented May 21, 2024

@pandres95 For now though its just system chains, and relay chains that have support. With a follow up PR I will clean up one small piece of logic, then it should only take adding the following to apps config for the parachain you want to opt into the people chain for identities:

isPeopleForIdentity?: boolean;
relayName?: string;

Edit: That all being said I dont know how possible it is for a parachain to be able to use the people chain.

@pandres95
Copy link
Contributor

pandres95 commented May 21, 2024

@pandres95 Yes! For sure, there is one small edge case I would need to fix, but I designed it in a way where any chain can opt in.

Awesome @TarikGul! Is there a way I can propose that some parachains register themselves as compatible with the relay chain addresses?

We have this case where Kreivo (Kusama/2281) uses the same prefix as the relay, is using people chain as provider for identity, and for practical purposes, we expect users not to have to change their accounts in polkadot.js wallet to run on "Any Chain" instead of "Kusama Relay Chain" for their accounts being discoverable in Kreivo. I wanted to propose the concept of relay-compatible. And half of that proposal is included in this PR.

@TarikGul
Copy link
Member Author

@pandres95 Yes! For sure, there is one small edge case I would need to fix, but I designed it in a way where any chain can opt in.

Awesome @TarikGul! Is there a way I can propose that some parachains register themselves as compatible with the relay chain addresses?

As I added in an edit above, I actually don't know if a parachain would even be able to opt in to using the People chain as a source of identity. That being said I am definitely not the best person to give a great answer. cc: @joepetrowski

@TarikGul TarikGul added the -auto label May 21, 2024
@polkadot-js-bot polkadot-js-bot merged commit 478cd03 into master May 21, 2024
7 checks passed
@polkadot-js-bot polkadot-js-bot deleted the tg-add-people-api branch May 21, 2024 18:28
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Identity overhaul for relay to people chains
3 participants