You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when checking the validity of the posts when the user creates or edited one, there are the current checks that are performed:
a post cannot be over 500 character long
the maximum number of optional fields is 10
each optional field value can be at most 200 characters long
While all these values have currently worked out pretty good, having them hard coded creates two main problems:
in order to know their value you need to check at the chain code;
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:
everyone to query those specifications (particularly useful for clients);
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):
Context
Currently when checking the validity of the posts when the user creates or edited one, there are the current checks that are performed:
500
character long10
200
characters longWhile all these values have currently worked out pretty good, having them hard coded creates two main problems:
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: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):keeper/params.go
types/params.go
Also the params registration should be done inside the
app.go
file as well (app.go
registration for thegov
params).The text was updated successfully, but these errors were encountered: