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

Protobuf: x/auth & x/supply #5533

Merged
merged 70 commits into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
adfae21
Migrate types to use proto
alexanderbez Jan 7, 2020
72f70c0
Add newline
alexanderbez Jan 7, 2020
80ab9d6
Fix rand_util
alexanderbez Jan 7, 2020
bf49ef2
Add nolint
alexanderbez Jan 7, 2020
d9c08cf
Implement amino marshal interface for int, uint, and dec
alexanderbez Jan 7, 2020
c5e5c6b
Update encoding doc
alexanderbez Jan 8, 2020
c1b17a5
Update CircleCI config
alexanderbez Jan 8, 2020
28b2da6
Remove tools target from proto job
alexanderbez Jan 8, 2020
f039b99
Rename to CustomProtobufType
alexanderbez Jan 8, 2020
49aa60d
Merge branch 'master' into bez/5444-types-proto-enc
alexanderbez Jan 8, 2020
cd092c0
Merge branch 'master' into bez/5444-types-proto-enc
alexanderbez Jan 8, 2020
b3463f7
changed proto docker image
Jan 8, 2020
f05929c
changed proto job to skip the binary installs
Jan 8, 2020
52e0a49
removed extra files and update proto CI
Jan 8, 2020
161f23b
Use third_party over vendor
alexanderbez Jan 9, 2020
5098419
Merge branch 'master' into bez/5444-types-proto-enc
alexanderbez Jan 9, 2020
7501af3
Merge PR #5505: Convert Int and Dec to string's on Coin and DecCoin p…
aaronc Jan 13, 2020
5c6c08c
Update go.sum
alexanderbez Jan 13, 2020
2e80b77
Fix protoc-gen-gocosmos target by allowing versioning
alexanderbez Jan 13, 2020
9e6a906
Lint
alexanderbez Jan 13, 2020
33400ef
Update go.{mod, sum} and install
alexanderbez Jan 13, 2020
241eafb
wildcard import
alexanderbez Jan 13, 2020
489d5e0
Merge branch 'master' into bez/5444-types-proto-enc
alexanderbez Jan 13, 2020
01f7766
go mod tidy
alexanderbez Jan 13, 2020
bb4ae4e
Bump cosmos-proto to v0.1.0
alexanderbez Jan 13, 2020
d6182fb
Update go.{mod, sum}
alexanderbez Jan 13, 2020
ba12a87
Update third party proto deps
alexanderbez Jan 15, 2020
153dadd
Define Marshaler and ProtoMarshaler interfaces along with BaseCodec type
alexanderbez Jan 16, 2020
94ca99c
Initial commit/demo
alexanderbez Jan 16, 2020
4113099
Fix MarshalAccount
alexanderbez Jan 17, 2020
7fd26dd
Prep merge from master
alexanderbez Feb 11, 2020
b268466
Merge branch 'master' into bez/5444-auth-proto-enc
alexanderbez Feb 11, 2020
fb6fc91
Update codec pkg
alexanderbez Feb 11, 2020
2d7e8a8
Fix GetAccountWithHeight
alexanderbez Feb 11, 2020
f8c4632
Use codec json over json pkg
alexanderbez Feb 11, 2020
aaeaf2e
Update auth types
alexanderbez Feb 11, 2020
305db41
Update account marshal tests
alexanderbez Feb 11, 2020
31af710
Update vesting types
alexanderbez Feb 11, 2020
c21d5fe
Update module APIs
alexanderbez Feb 11, 2020
769e57f
Update client logic to use pkg-level codec
alexanderbez Feb 11, 2020
c242f1c
Proto
alexanderbez Feb 11, 2020
41773be
Update vesting (remove codec)
alexanderbez Feb 13, 2020
b218b1e
Update auth types
alexanderbez Feb 13, 2020
56f824b
Update proto
alexanderbez Feb 13, 2020
38338fd
Undo account interface naming
alexanderbez Feb 13, 2020
df62b47
Update APIs
alexanderbez Feb 13, 2020
d9dbdd6
Update alias
alexanderbez Feb 13, 2020
6849bcb
Update simapp codec
alexanderbez Feb 13, 2020
e2fccc0
Add missing UnmarshalAccountJSON
alexanderbez Feb 13, 2020
66c8beb
Update simapp
alexanderbez Feb 13, 2020
96e36b4
Migrate x/supply to proto and update Supply interface
alexanderbez Feb 13, 2020
4d49c14
cleanup module codecs
alexanderbez Feb 13, 2020
4b1b6bb
Define SupplyCodec
alexanderbez Feb 13, 2020
f0aab9f
Restructure x/supply
alexanderbez Feb 13, 2020
fd1758f
Supply proto updates
alexanderbez Feb 14, 2020
98de856
Merge branch 'master' into bez/5444-auth-proto-enc
alexanderbez Feb 14, 2020
eebcba3
Refactor Module Manager to use codec
alexanderbez Feb 14, 2020
348a7e1
Update genutil
alexanderbez Feb 14, 2020
c52731d
Fix cal to DefaultGenesis
alexanderbez Feb 14, 2020
0dfd3ef
Lint
alexanderbez Feb 14, 2020
e9d161c
Fix supply tests
alexanderbez Feb 14, 2020
098e3a9
Update changelog
alexanderbez Feb 14, 2020
2c721af
Update changelog
alexanderbez Feb 14, 2020
2482e86
Add error checking
alexanderbez Feb 15, 2020
08502d6
Remove x/auth Account test type and codec
alexanderbez Feb 15, 2020
fe2c0a8
Lint
alexanderbez Feb 18, 2020
85ebbda
Use a single reference to the auth account codec
alexanderbez Feb 18, 2020
9480f1e
Merge branch 'master' into bez/5444-auth-proto-enc
alexanderbez Feb 18, 2020
cb22da9
Rename vesting proto message
alexanderbez Feb 18, 2020
af00a40
Remove vesting codec
alexanderbez Feb 18, 2020
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
Prev Previous commit
Next Next commit
Undo account interface naming
  • Loading branch information
alexanderbez committed Feb 13, 2020
commit 38338fdeabc94cba902056b3419e0e4df6b4ba7d
2 changes: 1 addition & 1 deletion x/auth/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo
}

// DeductFees deducts fees from the given account.
func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Context, acc exported.AccountI, fees sdk.Coins) error {
func DeductFees(supplyKeeper types.SupplyKeeper, ctx sdk.Context, acc exported.Account, fees sdk.Coins) error {
if !fees.IsValid() {
return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "invalid fee amount: %s", fees)
}
Expand Down
6 changes: 3 additions & 3 deletions x/auth/ante/sigverify.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type SigVerifiableTx interface {
GetSignatures() [][]byte
GetSigners() []sdk.AccAddress
GetPubKeys() []crypto.PubKey // If signer already has pubkey in context, this list will have nil in its place
GetSignBytes(ctx sdk.Context, acc exported.AccountI) []byte
GetSignBytes(ctx sdk.Context, acc exported.Account) []byte
}

// SetPubKeyDecorator sets PubKeys in context for any signer which does not already have pubkey set
Expand Down Expand Up @@ -185,7 +185,7 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul
// stdSigs contains the sequence number, account number, and signatures.
// When simulating, this would just be a 0-length slice.
signerAddrs := sigTx.GetSigners()
signerAccs := make([]exported.AccountI, len(signerAddrs))
signerAccs := make([]exported.Account, len(signerAddrs))

// check that signer length and signature length are the same
if len(sigs) != len(signerAddrs) {
Expand Down Expand Up @@ -339,7 +339,7 @@ func ConsumeMultisignatureVerificationGas(

// GetSignerAcc returns an account for a given address that is expected to sign
// a transaction.
func GetSignerAcc(ctx sdk.Context, ak keeper.AccountKeeper, addr sdk.AccAddress) (exported.AccountI, error) {
func GetSignerAcc(ctx sdk.Context, ak keeper.AccountKeeper, addr sdk.AccAddress) (exported.Account, error) {
if acc := ak.GetAccount(ctx, addr); acc != nil {
return acc, nil
}
Expand Down
6 changes: 3 additions & 3 deletions x/auth/exported/exported.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// AccountI is an interface used to store coins at a given address within state.
// Account is an interface used to store coins at a given address within state.
// It presumes a notion of sequence numbers for replay protection,
// a notion of account numbers for replay protection for previously pruned accounts,
// and a pubkey for authentication purposes.
//
// Many complex conditions can be used in the concrete struct which implements Account.
type AccountI interface {
type Account interface {
GetAddress() sdk.AccAddress
SetAddress(sdk.AccAddress) error // errors if already set.

Expand Down Expand Up @@ -46,7 +46,7 @@ func (ga GenesisAccounts) Contains(addr sdk.Address) bool {

// GenesisAccount defines a genesis account that embeds an Account with validation capabilities.
type GenesisAccount interface {
AccountI
Account

Validate() error
}
2 changes: 1 addition & 1 deletion x/auth/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func ExportGenesis(ctx sdk.Context, ak AccountKeeper) GenesisState {
params := ak.GetParams(ctx)

var genAccounts exported.GenesisAccounts
ak.IterateAccounts(ctx, func(account exported.AccountI) bool {
ak.IterateAccounts(ctx, func(account exported.Account) bool {
genAccount := account.(exported.GenesisAccount)
genAccounts = append(genAccounts, genAccount)
return false
Expand Down
18 changes: 10 additions & 8 deletions x/auth/keeper/account.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package keeper

import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/exported"
"github.com/cosmos/cosmos-sdk/x/auth/types"
)

// NewAccountWithAddress implements sdk.AccountKeeper.
func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) exported.AccountI {
func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) exported.Account {
acc := ak.proto()
err := acc.SetAddress(addr)
if err != nil {
Expand All @@ -18,7 +20,7 @@ func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddre
}

// NewAccount sets the next account number to a given account interface
func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc exported.AccountI) exported.AccountI {
func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc exported.Account) exported.Account {
if err := acc.SetAccountNumber(ak.GetNextAccountNumber(ctx)); err != nil {
panic(err)
}
Expand All @@ -27,7 +29,7 @@ func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc exported.AccountI) expor
}

// GetAccount implements sdk.AccountKeeper.
func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) exported.AccountI {
func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) exported.Account {
store := ctx.KVStore(ak.key)
bz := store.Get(types.AddressStoreKey(addr))
if bz == nil {
Expand All @@ -38,8 +40,8 @@ func (ak AccountKeeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) exporte
}

// GetAllAccounts returns all accounts in the accountKeeper.
func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []exported.AccountI) {
ak.IterateAccounts(ctx, func(acc exported.AccountI) (stop bool) {
func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []exported.Account) {
ak.IterateAccounts(ctx, func(acc exported.Account) (stop bool) {
accounts = append(accounts, acc)
return false
})
Expand All @@ -48,7 +50,7 @@ func (ak AccountKeeper) GetAllAccounts(ctx sdk.Context) (accounts []exported.Acc
}

// SetAccount implements sdk.AccountKeeper.
func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc exported.AccountI) {
func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc exported.Account) {
addr := acc.GetAddress()
store := ctx.KVStore(ak.key)

Expand All @@ -62,14 +64,14 @@ func (ak AccountKeeper) SetAccount(ctx sdk.Context, acc exported.AccountI) {

// RemoveAccount removes an account for the account mapper store.
// NOTE: this will cause supply invariant violation if called
func (ak AccountKeeper) RemoveAccount(ctx sdk.Context, acc exported.AccountI) {
func (ak AccountKeeper) RemoveAccount(ctx sdk.Context, acc exported.Account) {
addr := acc.GetAddress()
store := ctx.KVStore(ak.key)
store.Delete(types.AddressStoreKey(addr))
}

// IterateAccounts iterates over all the stored accounts and performs a callback function
func (ak AccountKeeper) IterateAccounts(ctx sdk.Context, cb func(account exported.AccountI) (stop bool)) {
func (ak AccountKeeper) IterateAccounts(ctx sdk.Context, cb func(account exported.Account) (stop bool)) {
store := ctx.KVStore(ak.key)
iterator := sdk.KVStorePrefixIterator(store, types.AddressStoreKeyPrefix)

Expand Down
6 changes: 3 additions & 3 deletions x/auth/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ type AccountKeeper struct {
paramSubspace subspace.Subspace

// The prototypical Account constructor.
proto func() exported.AccountI
proto func() exported.Account
}

// NewAccountKeeper returns a new sdk.AccountKeeper that uses go-amino to
// (binary) encode and decode concrete sdk.Accounts.
func NewAccountKeeper(
cdc types.AuthCodec, key sdk.StoreKey, paramstore subspace.Subspace, proto func() exported.AccountI,
cdc types.AuthCodec, key sdk.StoreKey, paramstore subspace.Subspace, proto func() exported.Account,
) AccountKeeper {

return AccountKeeper{
Expand Down Expand Up @@ -91,7 +91,7 @@ func (ak AccountKeeper) GetNextAccountNumber(ctx sdk.Context) uint64 {
return accNumber
}

func (ak AccountKeeper) decodeAccount(bz []byte) exported.AccountI {
func (ak AccountKeeper) decodeAccount(bz []byte) exported.Account {
acc, err := ak.cdc.UnmarshalAccount(bz)
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion x/auth/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestQueryAccount(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, res)

var account exported.AccountI
var account exported.Account
err2 := cdc.UnmarshalJSON(res, &account)
require.Nil(t, err2)
}
2 changes: 1 addition & 1 deletion x/auth/simulation/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func DecodeStore(cdc *codec.Codec, kvA, kvB tmkv.Pair) string {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self/others:

This is something I need to look into. We already have a few modules migrated over to protobuf and simulations are passing. Yet, all the module's DecodeStore functions still utilize Amino...

switch {
case bytes.Equal(kvA.Key[:1], types.AddressStoreKeyPrefix):
var accA, accB exported.AccountI
var accA, accB exported.Account
cdc.MustUnmarshalBinaryBare(kvA.Value, &accA)
cdc.MustUnmarshalBinaryBare(kvB.Value, &accB)
return fmt.Sprintf("%v\n%v", accA, accB)
Expand Down
16 changes: 8 additions & 8 deletions x/auth/types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
//-----------------------------------------------------------------------------
// BaseAccount

var _ exported.AccountI = (*BaseAccount)(nil)
var _ exported.Account = (*BaseAccount)(nil)
var _ exported.GenesisAccount = (*BaseAccount)(nil)

// NewBaseAccount creates a new BaseAccount object
Expand All @@ -34,7 +34,7 @@ func NewBaseAccount(address sdk.AccAddress, pubKey crypto.PubKey, accountNumber,
}

// ProtoBaseAccount - a prototype function for BaseAccount
func ProtoBaseAccount() exported.AccountI {
func ProtoBaseAccount() exported.Account {
return &BaseAccount{}
}

Expand Down Expand Up @@ -117,9 +117,9 @@ func (acc BaseAccount) String() string {
return string(out)
}

// SetAccountI sets the Account's oneof sum type to the provided AccountI type.
// The provided AccountI type must be a reference to a BaseAccount.
func (acc *Account) SetAccountI(value exported.AccountI) error {
// SetAccountI sets the Account's oneof sum type to the provided Account type.
// The provided Account type must be a reference to a BaseAccount.
func (acc *Account) SetAccountI(value exported.Account) error {
if value == nil {
acc.Sum = nil
return nil
Expand All @@ -131,11 +131,11 @@ func (acc *Account) SetAccountI(value exported.AccountI) error {
return nil
}

return fmt.Errorf("failed to encode value of type %T as message AccountI", value)
return fmt.Errorf("failed to encode value of type %T as message Account", value)
}

// GetAccountI returns an AccountI based on the internal oneof sum type.
func (acc *Account) GetAccountI() exported.AccountI {
// GetAccountI returns an Account based on the internal oneof sum type.
func (acc *Account) GetAccountI() exported.Account {
if x := acc.GetBaseAccount(); x != nil {
return x
}
Expand Down
4 changes: 2 additions & 2 deletions x/auth/types/account_retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ func NewAccountRetriever(codec AuthCodec, querier NodeQuerier) AccountRetriever

// GetAccount queries for an account given an address and a block height. An
// error is returned if the query or decoding fails.
func (ar AccountRetriever) GetAccount(addr sdk.AccAddress) (exported.AccountI, error) {
func (ar AccountRetriever) GetAccount(addr sdk.AccAddress) (exported.Account, error) {
account, _, err := ar.GetAccountWithHeight(addr)
return account, err
}

// GetAccountWithHeight queries for an account given an address. Returns the
// height of the query with the account. An error is returned if the query
// or decoding fails.
func (ar AccountRetriever) GetAccountWithHeight(addr sdk.AccAddress) (exported.AccountI, int64, error) {
func (ar AccountRetriever) GetAccountWithHeight(addr sdk.AccAddress) (exported.Account, int64, error) {
bs, err := ar.codec.MarshalJSON(NewQueryAccountParams(addr))
if err != nil {
return nil, 0, err
Expand Down
10 changes: 5 additions & 5 deletions x/auth/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (
type AuthCodec interface {
codec.Marshaler

MarshalAccount(acc exported.AccountI) ([]byte, error)
UnmarshalAccount(bz []byte) (exported.AccountI, error)
MarshalAccount(acc exported.Account) ([]byte, error)
UnmarshalAccount(bz []byte) (exported.Account, error)

MarshalAccountJSON(acc exported.AccountI) ([]byte, error)
UnmarshalAccountJSON(bz []byte) (exported.AccountI, error)
MarshalAccountJSON(acc exported.Account) ([]byte, error)
UnmarshalAccountJSON(bz []byte) (exported.Account, error)
}

// RegisterCodec registers the account interfaces and concrete types on the
// provided Amino codec.
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterInterface((*exported.GenesisAccount)(nil), nil)
cdc.RegisterInterface((*exported.AccountI)(nil), nil)
cdc.RegisterInterface((*exported.Account)(nil), nil)
cdc.RegisterConcrete(&BaseAccount{}, "cosmos-sdk/Account", nil)
cdc.RegisterConcrete(StdTx{}, "cosmos-sdk/StdTx", nil)
}
16 changes: 8 additions & 8 deletions x/auth/types/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,33 @@ func NewCodec(amino *codec.Codec) *Codec {
return &Codec{Marshaler: codec.NewHybridCodec(amino), amino: amino}
}

// MarshalAccount marshals an AccountI interface. If the given type implements
// MarshalAccount marshals an Account interface. If the given type implements
// the Marshaler interface, it is treated as a Proto-defined message and
// serialized that way. Otherwise, it falls back on the internal Amino codec.
func (c *Codec) MarshalAccount(accI exported.AccountI) ([]byte, error) {
func (c *Codec) MarshalAccount(accI exported.Account) ([]byte, error) {
acc := &types.Account{}
acc.SetAccountI(accI)
return c.Marshaler.MarshalBinaryLengthPrefixed(acc)
}

// UnmarshalAccount returns an AccountI interface from raw encoded account bytes
// UnmarshalAccount returns an Account interface from raw encoded account bytes
// of a Proto-based Account type. An error is returned upon decoding failure.
func (c *Codec) UnmarshalAccount(bz []byte) (exported.AccountI, error) {
func (c *Codec) UnmarshalAccount(bz []byte) (exported.Account, error) {
acc := &types.Account{}
if err := c.Marshaler.UnmarshalBinaryLengthPrefixed(bz, acc); err != nil {
return nil, err
}
return acc.GetAccountI(), nil
}

// MarshalAccountJSON JSON encodes an account object implementing the AccountI
// MarshalAccountJSON JSON encodes an account object implementing the Account
// interface.
func (c *Codec) MarshalAccountJSON(acc exported.AccountI) ([]byte, error) {
func (c *Codec) MarshalAccountJSON(acc exported.Account) ([]byte, error) {
return c.Marshaler.MarshalJSON(acc)
}

// UnmarshalAccountJSON returns an AccountI from JSON encoded bytes.
func (c *Codec) UnmarshalAccountJSON(bz []byte) (exported.AccountI, error) {
// UnmarshalAccountJSON returns an Account from JSON encoded bytes.
func (c *Codec) UnmarshalAccountJSON(bz []byte) (exported.Account, error) {
acc := &types.Account{}
if err := c.Marshaler.UnmarshalJSON(bz, acc); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion x/auth/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ type GenesisAccountIterator struct{}
// appGenesis and invokes a callback on each genesis account. If any call
// returns true, iteration stops.
func (GenesisAccountIterator) IterateGenesisAccounts(
cdc AuthCodec, appGenesis map[string]json.RawMessage, cb func(exported.AccountI) (stop bool),
cdc AuthCodec, appGenesis map[string]json.RawMessage, cb func(exported.Account) (stop bool),
) {

for _, genAcc := range GetGenesisStateFromAppState(cdc, appGenesis).Accounts {
Expand Down
2 changes: 1 addition & 1 deletion x/auth/types/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestGenesisAccountIterator(t *testing.T) {

var addresses []sdk.AccAddress
types.GenesisAccountIterator{}.IterateGenesisAccounts(
accountCdc, appGenesis, func(acc exported.AccountI) (stop bool) {
accountCdc, appGenesis, func(acc exported.Account) (stop bool) {
addresses = append(addresses, acc.GetAddress())
return false
},
Expand Down
2 changes: 1 addition & 1 deletion x/auth/types/stdtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (tx StdTx) GetPubKeys() []crypto.PubKey {
}

// GetSignBytes returns the signBytes of the tx for a given signer
func (tx StdTx) GetSignBytes(ctx sdk.Context, acc exported.AccountI) []byte {
func (tx StdTx) GetSignBytes(ctx sdk.Context, acc exported.Account) []byte {
genesis := ctx.BlockHeight() == 0
chainID := ctx.ChainID()
var accNum uint64
Expand Down
4 changes: 2 additions & 2 deletions x/auth/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions x/auth/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";

// Account defines the default concrete account type used in the x/auth module.
// It contains a single oneof field member, BaseAccountProto. The type implements
// the AccountI interface and provides all necessary account functionality.
// the Account interface and provides all necessary account functionality.
//
// This type should only be used internally for testing purposes. The application's
// concrete Account type should be defined in the application-level codec.
//
// Applications may extend account functionality and types by extending the
// oneof set and using their own AuthCodec (e.g. types/vesting).
message Account {
// sum defines a list of all acceptable concrete AccountI implementations. The
// sum defines a list of all acceptable concrete Account implementations. The
// base Account type only specifies a BaseAccount as the only valid for the sum.
oneof sum {
BaseAccount base_account = 1;
Expand Down
2 changes: 1 addition & 1 deletion x/auth/vesting/exported/exported.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// VestingAccount defines an account type that vests coins via a vesting schedule.
type VestingAccount interface {
authexported.AccountI
authexported.Account

// LockedCoins returns the set of coins that are not spendable (i.e. locked).
//
Expand Down
Loading