Skip to content

Clean up subnet identities unused storage #2211

@l0r1s

Description

@l0r1s

The subtensor pallet lib.rs contains no less than 5 identities storage items:

    /// --- MAP ( coldkey ) --> identity. (DEPRECATED for V2)
    #[pallet::storage]
    pub type Identities<T: Config> =
        StorageMap<_, Blake2_128Concat, T::AccountId, ChainIdentityOf, OptionQuery>;

    /// --- MAP ( coldkey ) --> identity
    #[pallet::storage]
    pub type IdentitiesV2<T: Config> =
        StorageMap<_, Blake2_128Concat, T::AccountId, ChainIdentityOfV2, OptionQuery>;

    /// --- MAP ( netuid ) --> identity. (DEPRECATED for V2)
    #[pallet::storage]
    pub type SubnetIdentities<T: Config> =
        StorageMap<_, Blake2_128Concat, NetUid, SubnetIdentityOf, OptionQuery>;

    /// --- MAP ( netuid ) --> identityV2 (DEPRECATED for V3)
    #[pallet::storage]
    pub type SubnetIdentitiesV2<T: Config> =
        StorageMap<_, Blake2_128Concat, NetUid, SubnetIdentityOfV2, OptionQuery>;

    /// --- MAP ( netuid ) --> SubnetIdentityOfV3
    #[pallet::storage]
    pub type SubnetIdentitiesV3<T: Config> =
        StorageMap<_, Blake2_128Concat, NetUid, SubnetIdentityOfV3, OptionQuery>;

This needs to be migrated if needed and cleaned up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions