-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Prefix Account store key by type #6407
Comments
I can work on this if there's consensus about the feature |
I think this is reasonable, but note, you may be able to just use the bech32 HRP instead of introducing |
+1 to this idea - we created a keeper in validator vesting that just stores the addresses of these accounts to avoid iterating over everything - would be nice to be able to do it directly. |
@fedekunze go for it, although I would check if there are more pressing items in the 0.39 board of higher priority before taking this on. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@fedekunze This is marked for v0.42, do you still want this for the next release? Do you have bandwidth to work on it? |
Ideally we should include it for the next release. If someone could pick this that would be awesome 🙂 |
Hmm... I don't really want to add this sort of complexity to address keys. What you're asking for is basically a secondary index. So why not create a secondary index instead of trying to overload address keys with a secondary index function? Also, I would just note that with ADR 028 there might be different ways we think about module accounts... |
Is there an example on how to implement a secondary index for a given key on the SDK? |
closing this as it can already be done via indexes |
Summary
Add the account type to the Account key bytes to ease iteration over custom account types.
Problem Definition
Some apps implement a custom
auth.Account
(eg: ethermint'sEthAccount
or Kava'sValidatorVestingAccount
). These apps usually have iteration logic over these accounts, but sinceAccount
s are stored by their address onauth
'sAccountKeeper
, they have to iterate over all of the accounts and cast the type to the concrete type in order to perform the logic.Proposal
Type() string
function to theAccountI
interfaceIterator
for a given account typecc: @karzak @alexanderbez
For Admin Use
The text was updated successfully, but these errors were encountered: