-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix(group): migrate group policy account to base accounts with credentials #13742
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #13742 +/- ##
==========================================
+ Coverage 56.26% 56.37% +0.11%
==========================================
Files 664 676 +12
Lines 56484 56989 +505
==========================================
+ Hits 31780 32129 +349
- Misses 22130 22243 +113
- Partials 2574 2617 +43
|
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.
I'm not sure this is my preferred direction for this PR.
My preference:
- Do the most correct way, i.e convert from ModuleAccount to GroupPolicyInfo
- A totally new PR, which simply removes these 3 lines. They are anyways wrong. And it solves group: validate genesis failing after creating group policy account #13445.
- Convert from ModuleAccount to BaseAccount, i.e. this PR.
If our immediate goal is to fix #13445, and 1 might delay v0.47 release, then I would actually prefer 2 over 3.
As discussed on Slack, I'll continue with 3, but set an unclaimable pubkey to the account. |
If we're going to the trouble of creating this unclaimable pubkey, why can't we just create something specific for groups, i.e. GroupAccountCredential as outlined in #13211? Since we're going to this much effort I'd rather move towards the right solution |
9960abc
to
97930f7
Compare
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.
nice work!
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.
Good work @julienrbrt. Generally LGTM. Left a few small comments for things I think should be addressed
return false | ||
} | ||
|
||
func (m *ModuleCredential) Type() string { |
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.
Unrelated to this PR, but is this method on PubKey
even used anymore? Maybe we should get rid of it
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.
After a brief look, it is used for comparison (easy to remove) and in keyring
cosmos-sdk/crypto/keyring/keyring.go
Line 270 in 4882f93
return crypto.ArmorPubKeyBytes(bz, key.Type()), nil |
[Cosmos SDK] SonarCloud Quality Gate failed. |
|
||
for i := range m.DerivationKeys { | ||
for j := range m.DerivationKeys[i] { | ||
if m.DerivationKeys[i][j] != om.DerivationKeys[i][j] { |
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.
you should use bytes.Compare
here
Description
Closes: #13445
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change