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

Move the current profile constants to chain parameters #171

Closed
RiccardoM opened this issue May 21, 2020 · 0 comments · Fixed by #191
Closed

Move the current profile constants to chain parameters #171

RiccardoM opened this issue May 21, 2020 · 0 comments · Fixed by #191
Assignees
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add x/profiles Module that allows to create and manage decentralized social profiles
Milestone

Comments

@RiccardoM
Copy link
Contributor

Context

Currently when checking the validity of the profiles when the user creates or edited one, there are the current checks that are performed:

  • the name and surname should have length between 2 and 500 characters
  • the moniker can be at most 30 characters
  • the bio can be at most 1000 characters

While all these values have currently worked out pretty good, having them hard coded creates two main problems:

  1. in order to know their value you need to check at the chain code;
  2. they are arbitrarily chosen by us and cannot be changed without a source code edit.

Solution

In order to solve both above mentioned problems, I think we should move them from being hard-coded inside the keys.go file to be on-chain parameters. This would allow:

  1. everyone to query those specifications (particularly useful for clients);
  2. changeable through governance proposals.

In order to do this we can do the same way that other modules do it. A reference can for example be the x/gov module of the Cosmos SDK. The references files should be (might not be a complete list):

Also the params registration should be done inside the app.go file as well (app.go registration for the gov params).

@RiccardoM RiccardoM added kind/enhancement Enhance an already existing feature; no "New feature" to add x/profiles Module that allows to create and manage decentralized social profiles labels May 21, 2020
@RiccardoM RiccardoM added this to the v0.8.0 milestone May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add x/profiles Module that allows to create and manage decentralized social profiles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants