Skip to content

Commit

Permalink
Merge branch 'main' into feature-20074
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 authored Apr 22, 2024
2 parents 3a4385f + 63f386e commit f5aef8d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion crypto/keys/bcrypt/bcrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (ih InvalidHashPrefixError) Error() string {
return fmt.Sprintf("crypto/bcrypt: bcrypt hashes must start with '$', but hashedSecret started with '%c'", byte(ih))
}

type InvalidCostError int
type InvalidCostError uint32

func (ic InvalidCostError) Error() string {
return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), MinCost, MaxCost)
Expand Down
2 changes: 1 addition & 1 deletion crypto/keys/ed25519/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ed25519
/*
This package contains a wrapper around crypto/ed22519 to make it comply with the crypto interfaces.
This package employs zip215 rules. We use https://github.com/hdevalence/ed25519consensus verification function. Ths is done in order to keep compatibility with Tendermints ed25519 implementation.
This package employs zip215 rules. We use https://github.com/hdevalence/ed25519consensus verification function. This is done in order to keep compatibility with Tendermints ed25519 implementation.
- https://github.com/cometbft/cometbft/blob/master/crypto/ed25519/ed25519.go#L155
This package works with correctly generated signatures. To read more about what this means see https://hdevalence.ca/blog/2020-10-04-its-25519am
Expand Down
3 changes: 0 additions & 3 deletions depinject/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ func (c *container) addNode(provider *providerDescriptor, key *moduleKey) (inter
typeGraphNode = vr.typeGraphNode()
} else {
typeGraphNode = c.typeGraphNode(typ)
if err != nil {
return nil, err
}
}

c.addGraphEdge(typeGraphNode, providerGraphNode)
Expand Down
1 change: 0 additions & 1 deletion simapp/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
vestingmodulev1 "cosmossdk.io/api/cosmos/vesting/module/v1"
"cosmossdk.io/depinject/appconfig"
"cosmossdk.io/x/accounts"
_ "cosmossdk.io/x/accounts" // import for side-effects
_ "cosmossdk.io/x/auth/tx/config" // import for side-effects
authtypes "cosmossdk.io/x/auth/types"
_ "cosmossdk.io/x/auth/vesting" // import for side-effects
Expand Down
20 changes: 9 additions & 11 deletions tests/integration/auth/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ import (
"cosmossdk.io/x/auth"
authkeeper "cosmossdk.io/x/auth/keeper"
authsims "cosmossdk.io/x/auth/simulation"
"cosmossdk.io/x/auth/types"
authtypes "cosmossdk.io/x/auth/types"
"cosmossdk.io/x/bank"
"cosmossdk.io/x/bank/keeper"
bankkeeper "cosmossdk.io/x/bank/keeper"
"cosmossdk.io/x/bank/testutil"
banktypes "cosmossdk.io/x/bank/types"
Expand Down Expand Up @@ -108,7 +106,7 @@ func initFixture(t *testing.T) *fixture {
blockedAddresses := map[string]bool{
authKeeper.GetAuthority(): false,
}
bankKeeper := keeper.NewBaseKeeper(
bankKeeper := bankkeeper.NewBaseKeeper(
runtime.NewEnvironment(runtime.NewKVStoreService(keys[banktypes.StoreKey]), log.NewNopLogger()),
cdc,
authKeeper,
Expand Down Expand Up @@ -186,13 +184,13 @@ func TestAsyncExec(t *testing.T) {

testCases := []struct {
name string
req *types.MsgNonAtomicExec
req *authtypes.MsgNonAtomicExec
expectErr bool
expErrMsg string
}{
{
name: "empty signer address",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: "",
Msgs: []*codectypes.Any{},
},
Expand All @@ -201,7 +199,7 @@ func TestAsyncExec(t *testing.T) {
},
{
name: "invalid signer address",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: "invalid",
Msgs: []*codectypes.Any{},
},
Expand All @@ -210,7 +208,7 @@ func TestAsyncExec(t *testing.T) {
},
{
name: "empty msgs",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: addrs[0].String(),
Msgs: []*codectypes.Any{},
},
Expand All @@ -219,23 +217,23 @@ func TestAsyncExec(t *testing.T) {
},
{
name: "valid msg",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: addrs[0].String(),
Msgs: []*codectypes.Any{msgAny},
},
expectErr: false,
},
{
name: "multiple messages being executed",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: addrs[0].String(),
Msgs: []*codectypes.Any{msgAny, msgAny},
},
expectErr: false,
},
{
name: "multiple messages with different signers",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: addrs[0].String(),
Msgs: []*codectypes.Any{msgAny, msgAny2},
},
Expand All @@ -244,7 +242,7 @@ func TestAsyncExec(t *testing.T) {
},
{
name: "multi msg with one failing being executed",
req: &types.MsgNonAtomicExec{
req: &authtypes.MsgNonAtomicExec{
Signer: addrs[0].String(),
Msgs: []*codectypes.Any{msgAny, failingMsgAny},
},
Expand Down
6 changes: 1 addition & 5 deletions testutil/sims/app_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ func NextBlock(app *runtime.App, ctx sdk.Context, jumpTime time.Duration) (sdk.C
Time: header.Time,
})

if err != nil {
return sdk.Context{}, err
}

return newCtx, err
return newCtx, nil
}

// SetupWithConfiguration initializes a new runtime.App. A Nop logger is set in runtime.App.
Expand Down
2 changes: 1 addition & 1 deletion x/auth/client/cli/tx_sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error {
// append messages
msgs = append(msgs, unsignedStdTx.GetMsgs()...)
}
// set the new appened msgs into builder
// set the new appended msgs into builder
err = txBuilder.SetMsgs(msgs...)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion x/staking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ A `ConsPubKeyRotationHistory` object is created every time a consensus pubkey ro

An entry is added in `OldToNewConsKeyMap` collection for every rotation (Note: this is to handle the evidences when submitted with old cons key).

An entry is added in `NewToOldConsKeyMap` collection for every rotation, this entry is to block the rotation if the validator is rotating to the cons key which is invovled in the history.
An entry is added in `NewToOldConsKeyMap` collection for every rotation, this entry is to block the rotation if the validator is rotating to the cons key which is involved in the history.

To prevent the spam:

Expand Down

0 comments on commit f5aef8d

Please sign in to comment.