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

Implement ADR 034: Account Rekeying #7452

Closed
wants to merge 113 commits into from
Closed
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
4d91c5a
add pubkey proto
antstalepresh Sep 25, 2020
95f35b8
change proto description
antstalepresh Sep 25, 2020
93f453a
modify MsgChangePubKey proto
antstalepresh Sep 25, 2020
2fb8ce0
remove moretag
antstalepresh Sep 25, 2020
1700bcc
change proto package name
antstalepresh Sep 25, 2020
7fc644f
add PubKeyChangeCost to auth.Params
antstalepresh Sep 25, 2020
8a5b23e
add prototype codebase for pubkey
antstalepresh Sep 25, 2020
907b823
add files for pubkey types
antstalepresh Sep 25, 2020
71a6d95
account pubKey modification logic on pubkey handler
antstalepresh Sep 25, 2020
25a2e61
add gas logic prototype
antstalepresh Sep 25, 2020
1b9772e
modify change-pubkey cli command long description
Sep 28, 2020
9834f16
modify package import url and add example bech32 pubkey
Sep 28, 2020
c8b0f59
implement GetPubKeyFromBech32 and force conversion from crypto.PubKey…
Sep 28, 2020
dd65c64
Register pubkey module and pubkeycli command on simapp && Integrate s…
Sep 28, 2020
4247745
fix unnecessary conversion to uint64
Sep 28, 2020
8a2f38d
implement TestMsgChangePubKey && add correct pubKey for TestNewMsgCha…
antstalepresh Sep 29, 2020
4a44f5a
Add correct pubKey for TestNewMsgChangePubKeyCmd && Register codec an…
antstalepresh Sep 29, 2020
acb0862
Modify change pub key message type to use generalize pub key instead …
antstalepresh Sep 30, 2020
f28dd06
remove charging additional fees using bankkeeper.SendCoinsFromAccount…
antstalepresh Sep 30, 2020
eea5fd0
modify module name from pubkey to changepubkey
antstalepresh Sep 30, 2020
cf6dcc0
Modify package name from pubkey to changepubkey to eliminate confusing
antstalepresh Sep 30, 2020
ad82782
Modify MsgChangePubKey ValidateBasic function for pubkey validation
antstalepresh Sep 30, 2020
1a7df9d
create ADR 028: Change PubKey prototype
antstalepresh Sep 30, 2020
e85f705
Modify ADR paper from comment
antstalepresh Oct 1, 2020
ea1c9f5
Create params port for change pubkey and write utils / unit test && a…
antstalepresh Oct 1, 2020
dec7387
implement params inside changepubkey
antstalepresh Oct 2, 2020
f0122ad
update changepubkey params proto index to 1 and do part revert of aut…
antstalepresh Oct 2, 2020
42a4e14
revert auth param changes
antstalepresh Oct 2, 2020
30b6f8c
revert ante_test
antstalepresh Oct 2, 2020
916c3b8
modify pubkey to changepubkey term
antstalepresh Oct 2, 2020
36d5a23
fix lint issue
antstalepresh Oct 2, 2020
6f486a1
Merge pull request #17 from antstalepresh/sunny/change-pubkey
sunnya97 Oct 4, 2020
14d7b3a
update adr
sunnya97 Oct 4, 2020
04082ca
add genesis export comment to ADR
sunnya97 Oct 4, 2020
7e51ac3
update adr to 32
sunnya97 Oct 5, 2020
11b30b6
put PubKeyChangeCost param back to auth
antstalepresh Oct 7, 2020
156dfd4
remove changepubkey params keeper
antstalepresh Oct 7, 2020
7ee4ff8
Merge branch 'sunny/change-pubkey' of https://github.com/sikkatech/co…
antstalepresh Oct 7, 2020
71c832a
modify lint
antstalepresh Oct 7, 2020
b007867
fix unit test issue relate to length of address bytes
antstalepresh Oct 7, 2020
4988c64
add pubkey proto
antstalepresh Sep 25, 2020
ee8dbc5
change proto description
antstalepresh Sep 25, 2020
ab0be66
modify MsgChangePubKey proto
antstalepresh Sep 25, 2020
7f610c3
remove moretag
antstalepresh Sep 25, 2020
d3f9278
change proto package name
antstalepresh Sep 25, 2020
f0c2070
add PubKeyChangeCost to auth.Params
antstalepresh Sep 25, 2020
07a6791
add prototype codebase for pubkey
antstalepresh Sep 25, 2020
3864e4e
add files for pubkey types
antstalepresh Sep 25, 2020
960f591
account pubKey modification logic on pubkey handler
antstalepresh Sep 25, 2020
edc28b3
add gas logic prototype
antstalepresh Sep 25, 2020
21f6096
modify change-pubkey cli command long description
Sep 28, 2020
90ff4d7
modify package import url and add example bech32 pubkey
Sep 28, 2020
cc26891
implement GetPubKeyFromBech32 and force conversion from crypto.PubKey…
Sep 28, 2020
781fa0d
Register pubkey module and pubkeycli command on simapp && Integrate s…
Sep 28, 2020
1d8eb14
fix unnecessary conversion to uint64
Sep 28, 2020
1a0062e
implement TestMsgChangePubKey && add correct pubKey for TestNewMsgCha…
antstalepresh Sep 29, 2020
3944fed
Add correct pubKey for TestNewMsgChangePubKeyCmd && Register codec an…
antstalepresh Sep 29, 2020
1fa367e
Modify change pub key message type to use generalize pub key instead …
antstalepresh Sep 30, 2020
d805082
remove charging additional fees using bankkeeper.SendCoinsFromAccount…
antstalepresh Sep 30, 2020
a835761
modify module name from pubkey to changepubkey
antstalepresh Sep 30, 2020
eca3d87
Modify package name from pubkey to changepubkey to eliminate confusing
antstalepresh Sep 30, 2020
bc83bee
Modify MsgChangePubKey ValidateBasic function for pubkey validation
antstalepresh Sep 30, 2020
397b840
create ADR 028: Change PubKey prototype
antstalepresh Sep 30, 2020
b0ddbc0
Modify ADR paper from comment
antstalepresh Oct 1, 2020
48bd19e
Create params port for change pubkey and write utils / unit test && a…
antstalepresh Oct 1, 2020
c3fbb79
implement params inside changepubkey
antstalepresh Oct 2, 2020
9afe535
update changepubkey params proto index to 1 and do part revert of aut…
antstalepresh Oct 2, 2020
e898434
revert auth param changes
antstalepresh Oct 2, 2020
9434509
revert ante_test
antstalepresh Oct 2, 2020
d4cccae
modify pubkey to changepubkey term
antstalepresh Oct 2, 2020
0f576e9
fix lint issue
antstalepresh Oct 2, 2020
81986cf
update adr
sunnya97 Oct 4, 2020
beca5dd
add genesis export comment to ADR
sunnya97 Oct 4, 2020
4c72918
update adr to 32
sunnya97 Oct 5, 2020
5746180
put PubKeyChangeCost param back to auth
antstalepresh Oct 7, 2020
af85257
remove changepubkey params keeper
antstalepresh Oct 7, 2020
5a4911f
modify lint
antstalepresh Oct 7, 2020
cf9c859
fix unit test issue relate to length of address bytes
antstalepresh Oct 7, 2020
ce6d37b
fix TestMigrate
sunnya97 Oct 8, 2020
093d016
remove ADR
sunnya97 Oct 9, 2020
30e99a9
Merge branch 'sunny/change-pubkey' of https://github.com/sikkatech/co…
antstalepresh Oct 9, 2020
5725945
staking test gas limit issue fix
antstalepresh Oct 9, 2020
a26a629
remove ADR
antstalepresh Oct 9, 2020
5004aca
update gas limit for only staking test
antstalepresh Oct 13, 2020
944fd24
fix gofmted warning
antstalepresh Oct 13, 2020
5d4e3ac
remove unused validation code comment
antstalepresh Oct 13, 2020
c3c11cc
Merge pull request #25 from antstalepresh/sunny/change-pubkey
sunnya97 Oct 14, 2020
a532815
Merge branch 'master' into sunny/change-pubkey
sunnya97 Oct 14, 2020
0a97a8c
updated Module RegisterServices
sunnya97 Oct 14, 2020
873369c
update ante handler for changepubkey and write test
antstalepresh Oct 15, 2020
21325b0
Update x/auth/ante/sigverify.go
antstalepresh Oct 16, 2020
3570284
Update x/auth/ante/sigverify.go
antstalepresh Oct 16, 2020
d67e5b9
Update x/auth/ante/ante_test.go
antstalepresh Oct 16, 2020
48f9295
Update x/auth/ante/ante_test.go
antstalepresh Oct 16, 2020
814918c
fix go fmted lint
antstalepresh Oct 16, 2020
61d7642
Merge pull request #31 from antstalepresh/sunny/change-pubkey
sunnya97 Oct 16, 2020
253d999
add EnableChangePubKey param into 'x/auth' module
antstalepresh Nov 4, 2020
8a8046d
fix golint
antstalepresh Nov 4, 2020
5eb8d6c
add handler test for failure check on enableChangePubKey=false
antstalepresh Nov 5, 2020
fc353f0
Merge pull request #42 from antstalepresh/sunny/change-pubkey
sunnya97 Nov 5, 2020
30fc52e
Merge branch 'master' of github.com:sikkatech/cosmos-sdk into sunny/c…
antstalepresh Nov 5, 2020
e9a62cc
implement Msg service architecture for changepubkey
antstalepresh Nov 5, 2020
e4bbd7e
changepubkey RegisterMsgServer
antstalepresh Nov 5, 2020
e387940
create pubkey history proto and keeper prototype
antstalepresh Dec 30, 2020
8d57837
Create basic codebase for historical entries keeper functions
antstalepresh Jan 4, 2021
e247b5c
add keeper test and fix marshal issues
antstalepresh Jan 5, 2021
de2b4ea
add more test for pubkey history querying
antstalepresh Jan 6, 2021
ac22182
Register queries proto for pub key history, cli commands to connect t…
antstalepresh Jan 6, 2021
510c718
move msg_sever inside keeper, and add grpc_query functions for keeper
antstalepresh Jan 7, 2021
a218201
move msg_sever into keeper, implement grpc_query with testing
antstalepresh Jan 7, 2021
b4df8a7
add more keeper test with message server changepubkey
antstalepresh Jan 8, 2021
a6efb22
Fix specific time entry iteration and last entry iteration on test u…
antstalepresh Jan 8, 2021
d4a0ab4
marshalany -> mustmarshalbinarybare
sunnya97 Jan 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions docs/architecture/adr-032-change-pubkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# ADR 032: Change PubKey

## Changelog

- 30-09-2020: Initial Draft

## Status

Proposed

## Context

Currently, in the Cosmos SDK, the address of an auth account is always based on the hash of the public key. Once an account is created, the public key for the account is set in stone, and cannot be changed. This can be a problem for users, as key rotation is a useful security practice, but is not possible currently. Furthermore, as multisigs are a type of pubkey, once a multisig for an account is set, it can not be updated. This is problematic, as multisigs are often used by organizations or companies, who may need to change their set of multisig signers for internal reasons.

Transferring all the assets of an account to a new account with the updated pubkey is not sufficient, because some "engagements" of an account are not easily transferable. For example, in staking, to transfer bonded Atoms, an account would have to unbond all delegations and wait the three week unbonding period. Even more significantly, for validator operators, ownership over a validator is not transferrable at all, meaning that the operator key for a validator can never be updated, leading to poor operational security for validators.

## Decision

We propose the creation of a new standaonle module called `changepubkey` that is an extension to `auth` that allows accounts to update the public key associated with their account, while keeping the address the same.

This is possible because the Cosmos SDK `StdAccount` stores the public key for an account in state, instead of making the assumption that the public key is included in the transaction (whether explicitly or implicitly through the signature) as in other blockchains such as Bitcoin and Ethereum. Because the public key is stored on chain, it is okay for the public key to not hash to the address of an account, as the address is not pertinent to the signature checking process.

To build this system, we design a new Msg type as follows:

```protobuf
message MsgChangePubKey {
bytes address = 1 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
bytes pub_key = 2 [
(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""
];
}
```

As an example, account pubkey change message can be defined as follows.

```json
{
"type": "cosmos-sdk/StdTx",
"value": {
"address": "cosmos1wf5h7meplxu3sc6rk2agavkdsmlsen7rgsasxk",
"public_key": "cosmospub1addwnpepqdszcr95mrqqs8lw099aa9h8h906zmet22pmwe9vquzcgvnm93eqygufdlv"
},
"signature": "a9n7pIqCUuYJTCm7ZBv1cqqlM3uYyX/7SnaSXA8zrG0CBWP6p55pTFFHYn39tVvFtRbGE7gXF1qCiaOilJ8NtQ=="
}
```

Here, the signature is signed for the public key thats current in-state for account `cosmos1wf5h7meplxu3sc6rk2agavkdsmlsen7rgsasxk`, as normally done in the ante-handler.

Once, approved, the handler for this message type, which takes in the AccountKeeper, will update the in-state pubkey for the account and replace it with the pubkey from the Msg.

Because an account can no longer be pruned from state once its pubkey has changed, we can charge an additional gas fee for this operation to compensate for this this externality (this bound gas amount is configured as parameter `PubKeyChangeCost`). The bonus gas is charged inside handler, using the `ConsumeGas` function.

```go
amount := pk.GetParams(ctx).PubKeyChangeCost
ctx.GasMeter().ConsumeGas(amount, "pubkey change fee")
```


## Consequences

### Positive

* Will allow users and validator operators to employ better operational security practices with key rotation.
* Will allow organizations or groups to easily change and add/remove multisig signers.

### Negative

Breaks the current assumed relationship between address and pubkeys as H(pubkey) = address. This has a couple of consequences.

* We cannot prune accounts with 0 balance that have had their pubkey changed (we currently do not currently do this anyways, but the reason we have account numbers is presumably for this purpose).
* This makes wallets that support this feature more complicated. For example, if an address on chain was updated, the corresponding key in the CLI wallet also needs to be updated.

### Neutral

* While the purpose of this is intended to allow the owner of an account to update to a new pubkey they own, this could technically also be used to transfer ownership of an account to a new owner. For example, this could be use used to sell a staked position without unbonding or an account that has vesting tokens. However, the friction of this is very high as this would essentially have to be done as a very specific OTC trade. Furthermore, additional constraints could be added to prevent accouns with Vesting tokens to use this feature.
* Will require that PubKeys for an account are included in the genesis exports.

## References

13 changes: 13 additions & 0 deletions proto/cosmos/changepubkey/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = "proto3";
package cosmos.changepubkey.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos/changepubkey/v1beta1/params.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/types";

// GenesisState defines the auth module's genesis state.
message GenesisState {
// params defines all the paramaters of the module.
Params params = 1 [(gogoproto.nullable) = false];
}
12 changes: 12 additions & 0 deletions proto/cosmos/changepubkey/v1beta1/params.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax = "proto3";
package cosmos.changepubkey.v1beta1;

import "gogoproto/gogo.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/types";

// Params defines the parameters for the changepubkey module.
message Params {
uint64 pubkey_change_cost = 1
[(gogoproto.customname) = "PubKeyChangeCost", (gogoproto.moretags) = "yaml:\"pubkey_change_cost\""];
}
25 changes: 25 additions & 0 deletions proto/cosmos/changepubkey/v1beta1/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";
package cosmos.changepubkey.v1beta1;

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/changepubkey/v1beta1/params.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/types";

// Query defines the gRPC querier service.
service Query {
// Params queries all parameters.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/changepubkey/v1beta1/params";
}
}

// QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {}

// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
}
17 changes: 17 additions & 0 deletions proto/cosmos/changepubkey/v1beta1/tx.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";
package cosmos.changepubkey.v1beta1;

import "gogoproto/gogo.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/types";

// MsgChangePubKey defines a message that enables changing a pubkey
// of an account.
message MsgChangePubKey {
bytes address = 1 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
bytes pub_key = 2 [
(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""
];
}
13 changes: 13 additions & 0 deletions simapp/_localsetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

rm -rf $HOME/.simd/

cd $HOME

simd init --chain-id=testing testing --home=$HOME/.simd
simd keys add validator --keyring-backend=test --home=$HOME/.simd
simd add-genesis-account $(simd keys show validator -a --keyring-backend=test --home=$HOME/.simd) 1000000000validatortoken,1000000000stake --home=$HOME/.simd
simd gentx validator --keyring-backend=test --home=$HOME/.simd --chain-id testing
simd collect-gentxs --home=$HOME/.simd

simd start --home=$HOME/.simd
41 changes: 26 additions & 15 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ import (
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/changepubkey"
changepubkeykeeper "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/keeper"
changepubkeytypes "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/types"
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
Expand Down Expand Up @@ -97,6 +100,7 @@ var (
// and genesis verification.
ModuleBasics = module.NewBasicManager(
auth.AppModuleBasic{},
changepubkey.AppModuleBasic{},
genutil.AppModuleBasic{},
bank.AppModuleBasic{},
capability.AppModuleBasic{},
Expand Down Expand Up @@ -151,20 +155,21 @@ type SimApp struct {
memKeys map[string]*sdk.MemoryStoreKey

// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
CrisisKeeper crisiskeeper.Keeper
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
AccountKeeper authkeeper.AccountKeeper
ChangePubKeyKeeper changepubkeykeeper.ChangePubKeyKeeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
CrisisKeeper crisiskeeper.Keeper
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
Expand Down Expand Up @@ -209,6 +214,7 @@ func NewSimApp(
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
changepubkeytypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
Expand Down Expand Up @@ -241,6 +247,9 @@ func NewSimApp(
app.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms,
)
app.ChangePubKeyKeeper = changepubkeykeeper.NewChangePubKeyKeeper(
appCodec, keys[changepubkeytypes.StoreKey], app.GetSubspace(changepubkeytypes.ModuleName),
)
app.BankKeeper = bankkeeper.NewBaseKeeper(
appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.BlockedAddrs(),
)
Expand Down Expand Up @@ -320,6 +329,7 @@ func NewSimApp(
),
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
changepubkey.NewAppModule(app.AccountKeeper, app.ChangePubKeyKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
crisis.NewAppModule(&app.CrisisKeeper),
Expand Down Expand Up @@ -351,7 +361,7 @@ func NewSimApp(
// so that other modules that want to create or claim capabilities afterwards in InitChain
// can do so safely.
app.mm.SetOrderInitGenesis(
capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName,
capabilitytypes.ModuleName, authtypes.ModuleName, changepubkeytypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName,
slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName,
ibchost.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName,
)
Expand Down Expand Up @@ -576,6 +586,7 @@ func initParamsKeeper(appCodec codec.BinaryMarshaler, legacyAmino *codec.LegacyA
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)

paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(changepubkeytypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
paramsKeeper.Subspace(stakingtypes.ModuleName)
paramsKeeper.Subspace(minttypes.ModuleName)
Expand Down
3 changes: 3 additions & 0 deletions simapp/simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
changepubkeycmd "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/client/cli"
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/auth/types"
Expand Down Expand Up @@ -124,6 +125,7 @@ func queryCommand() *cobra.Command {
rpc.BlockCommand(),
authcmd.QueryTxsByEventsCmd(),
authcmd.QueryTxCmd(),
changepubkeycmd.GetQueryCmd(),
)

simapp.ModuleBasics.AddQueryCommands(cmd)
Expand Down Expand Up @@ -152,6 +154,7 @@ func txCommand() *cobra.Command {
authcmd.GetDecodeCommand(),
flags.LineBreak,
vestingcli.GetTxCmd(),
changepubkeycmd.GetTxCmd(),
)

simapp.ModuleBasics.AddTxCommands(cmd)
Expand Down
2 changes: 2 additions & 0 deletions std/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
txtypes "github.com/cosmos/cosmos-sdk/types/tx"
changepubkey "github.com/cosmos/cosmos-sdk/x/auth/changepubkey/types"
vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
)

Expand All @@ -22,4 +23,5 @@ func RegisterInterfaces(interfaceRegistry types.InterfaceRegistry) {
txtypes.RegisterInterfaces(interfaceRegistry)
cryptocodec.RegisterInterfaces(interfaceRegistry)
vesting.RegisterInterfaces(interfaceRegistry)
changepubkey.RegisterInterfaces(interfaceRegistry)
}
Loading