-
Notifications
You must be signed in to change notification settings - Fork 46
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
Change how profiles are stored #385
Conversation
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #385 +/- ##
==========================================
- Coverage 71.50% 70.50% -1.00%
==========================================
Files 89 90 +1
Lines 3636 3696 +60
==========================================
+ Hits 2600 2606 +6
- Misses 972 1005 +33
- Partials 64 85 +21
Continue to review full report at Codecov.
|
Changed how the profiles are implemented, by including an *Any inside the Profile object, and making it implement the AccountI interface Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
…thod execute faster Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
…profiles-changes � Conflicts: � Makefile � go.mod � go.sum � x/profiles/keeper/types.pb.go � x/profiles/types/models.pb.go
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
# Conflicts: # app/app.go # app/sim_test.go # proto/desmos/profiles/v1beta1/models.proto # x/profiles/keeper/msgs_server_test.go # x/profiles/types/models.pb.go # x/staging/fees/ante/ante_test.go # x/staging/fees/ante/common_test.go # x/staging/fees/simulation/genesis.go # x/staging/reports/types/models.go
…ests type Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
…profiles-changes � Conflicts: � go.mod
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
x/profiles/types/account_test.go
Outdated
expProfile *types.Profile | ||
}{ | ||
{ | ||
name: "DoNotModify and empty fields do not update original values", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why empty fields don't update the original values here? A test below say a different thing. Can we remove it?
name: "DoNotModify and empty fields do not update original values", | |
name: "DoNotModify do not update original values", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've cleared up the test name and also the test making sure that empty values effectively update the original ones
Also, it looks like there's an error inside profiles CLI tests |
Signed-off-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to ship! 🚀
Description
This PR changes how the profiles are implemented, making them implement the
authtypes.AccountI
interface and allowing them to be stored inside thex/auth
keeper.Closes #261
Notes
Currently, the only unit test failing should be
TestCmdQueryProfile/existing_profile_is_returned_properly
. This is due to the fact that right now the Cosmos SDK does not allow to specify custom accounts inside the in-memory network that is used when testing the CLI commands. I've opened cosmos/cosmos-sdk#8936 to fix this, so we will have to wait until that is merged and put inside a release to make this test work properly.Also, currently the simulation tests fail because it appear that the
RandomGenesisAccount
method that is present inside the sim package does not initialize accounts with a public key. This leads to a bug that makes it impossible to sign message with any of those accounts. I've written this also inside the #v0.41-stargate Discord channel. I hope to get a PR accepted and merged the next week to fix this as well.Update 16/03/2021
I've opened a PR for the second error as well: cosmos/cosmos-sdk#8957
Update 14/04/2021
I've forked the Cosmos SDK
v0.42.4
code and added some commits that allow to fix the above problems. The code is available here and it includes the changes from the following PRs:Checklist
CHANGELOG.md
file.Files changed
in the Github PR explorer.