Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

QN: Validator profile #4823

Closed thesan closed 1 year ago

thesan commented 1 year ago

As described in https://github.com/Joystream/pioneer/issues/4330: validators should be given the ability to bind a membership profile to their validator accounts. This will be done by calling the members.updateProfile(memberId, handle, metadata) extrinsic with the validator account in the metadata.

The membership entity schema and mappings should be changed so that the validators profile can easily be accessed with one query e.g:

memberMetadata(where: {
  validatorAccount: {
    isVerified_eq: true
    address_in: [
      "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY",
      "5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc"
    ]
  }
}) {
  member { handle }
  validatorAccount { address  }
}

isVerified is always reset to false whenever a validator account is set (it will be set to true by a different extrinsic).

Also in order for members.updateProfile(memberId, handle, metadata) to pass a validator account: a field should be added to MembershipMetadata in metadata-protobuf/proto/Membership.proto.