• georgepisaltu's avatar
    Identity pallet improvements (#2048) · 21fbc00d
    georgepisaltu authored
    This PR is a follow up to #1661 
    
    - [x] rename the `simple` module to `legacy`
    - [x] fix benchmarks to disregard the number of additional fields
    - [x] change the storage deposits to charge per encoded byte of the
    identity information instance, removing the need for `fn
    additional(&self) -> usize` in `IdentityInformationProvider`
    - [x] ~add an extrinsic to rejig deposits to account for the change
    above~
    - [ ] ~ensure through proper configuration that the new byte-based
    deposit is always lower than whatever is reserved now~
    - [x] remove `IdentityFields` from the `set_fields` extrinsic signature,
    as per [this
    discussion](https://github.com/paritytech/polkadot-sdk/pull/1661#discussion_r1371703403)
    
    > ensure through proper configuration that the new byte-based deposit is
    always lower than whatever is reserved now
    
    Not sure this is needed anymore. If the new deposits are higher than
    what is currently on chain and users don't have enough funds to reserve
    what is needed, the extrinisc fails and they're basically grandfathered
    and frozen until they add more funds and/or make a change to their
    identity. This behavior seems fine to me. Original idea
    [here](https://github.com/paritytech/polkadot-sdk/pull/1661#issuecomment-1779606319).
    
    > add an extrinsic to rejig deposits to account for the change above
    
    This was initially implemented but now removed from this PR in favor of
    the implementation detailed
    [here](https://github.com/paritytech/polkadot-sdk/pull/2088
    
    ).
    
    ---------
    
    Signed-off-by: default avatargeorgepisaltu <[email protected]>
    Co-authored-by: default avatarjoepetrowski <[email protected]>
    21fbc00d