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

feat: add GenesisConfig to identity pallet #1210

Closed

Conversation

grw-ms
Copy link

@grw-ms grw-ms commented Aug 28, 2023

This change adds a GenesisConfig to the identity pallet, allowing downstream users to automatically seed Registrars and Identities via chainspec config.

previous discussion: paritytech/substrate#14774

@@ -201,6 +202,55 @@ pub mod pallet {
ValueQuery,
>;

#[pallet::genesis_config]
pub struct GenesisConfig<T: Config> {
pub registrars: Vec<(T::AccountId, Vec<(T::AccountId, BoundedVec<u8, ConstU32<32>>)>)>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub registrars: Vec<(T::AccountId, Vec<(T::AccountId, BoundedVec<u8, ConstU32<32>>)>)>,
pub registrars: Vec<T::AccountId>,
pub identities: Vec<(T::AccountId, BoundedVec<u8, ConstU32<32>>)>,

#[pallet::genesis_build]
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) {
for (registrar, identities) in &self.registrars {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genesis config should just include identities in this case

@joepetrowski joepetrowski requested review from a team October 17, 2023 05:47
@bkchr
Copy link
Member

bkchr commented Nov 8, 2023

Stale

@bkchr bkchr closed this Nov 8, 2023
bkchr pushed a commit that referenced this pull request Apr 10, 2024
* Decouple the PoA bridge code from Rialto
* Remove Rialto PoA bridge code
* Remove relays/bin-ethereum code
* Remove relays/client-ethereum code
* Remove modules/ethereum code
* Remove modules/ethereum-contract-builtin code
* Remove PoA bridge documentation
* Remove primitives/ethereum-poa code
* Decouple Rialto from currency-exchange
* Fix building with runtime-benchmarks
* Fix should_encode_bridge_send_message_call test
    Because we removed some runtime modules/pallets, the
    substrate2substrate bridge pallet has a different index within
    the runtime so its calls have a different encoding.
    Update the test to use the new encoding.
* Update readme - no more PoA bridge
* Remove deployments/bridges/poa-rialto
    Also removes:
    - deployments/networks/eth-poa.yml
    - deployments/networks/OpenEthereum.Dockerfile
* Remove deployments/dev/poa-config
* Update deployments readme - no more PoA bridge
* Remove eth-related scripts
    Deletes:
    - deployments/networks/eth-poa.yml
    - scripts/run-openethereum-node.sh
* Remove poa-relay from gitlab-ci
* Dockerfiles to use substrate-relay as default
* Remove modules/currency-exchange code
* Remove primitives/currency-exchange code

Signed-off-by: acatangiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants