Skip to content

Commit 5820ece

Browse files
authored
Upgrade to go 1.24.5 (#2420)
Port of original work done in sei-protocol/sei-cosmos#604, excluding the CI workflow updates since the CI workflows are relocated in `sei-chain`. Upgrade to go 1.24.5, consistent with sei-chain. While at it, resolve false negative test failures: * use testing temp directory * use constant pattern for formatting printers * follow required go naming convention in examples
1 parent 62d017e commit 5820ece

11 files changed

Lines changed: 19 additions & 26 deletions

File tree

sei-cosmos/crypto/hd/hdpath_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func TestDeriveHDPathRange(t *testing.T) {
186186
}
187187
}
188188

189-
func ExampleStringifyPathParams() {
189+
func ExampleNewParams() {
190190
path := hd.NewParams(44, 0, 0, false, 0)
191191
fmt.Println(path.String())
192192
path = hd.NewParams(44, 33, 7, true, 9)
@@ -196,7 +196,7 @@ func ExampleStringifyPathParams() {
196196
// m/44'/33'/7'/1/9
197197
}
198198

199-
func ExampleSomeBIP32TestVecs() {
199+
func ExampleComputeMastersFromSeed() {
200200
seed := mnemonicToSeed("barrel original fuel morning among eternal " +
201201
"filter ball stove pluck matrix mechanic")
202202
master, ch := hd.ComputeMastersFromSeed(seed)

sei-cosmos/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
go 1.21
2-
31
module github.com/cosmos/cosmos-sdk
42

3+
go 1.24.5
4+
55
require (
66
cosmossdk.io/errors v1.0.0
77
github.com/99designs/keyring v1.2.1

sei-cosmos/server/start.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"context"
77
"fmt"
88
"net/http"
9+
//nolint:gosec,G108
10+
_ "net/http/pprof"
911
"os"
1012
"path"
1113
"runtime/pprof"
@@ -25,9 +27,6 @@ import (
2527
"go.opentelemetry.io/otel/sdk/trace"
2628
"google.golang.org/grpc"
2729

28-
//nolint:gosec,G108
29-
_ "net/http/pprof"
30-
3130
"github.com/cosmos/cosmos-sdk/client"
3231
"github.com/cosmos/cosmos-sdk/client/flags"
3332
"github.com/cosmos/cosmos-sdk/codec"
@@ -310,7 +309,7 @@ func startStandAlone(ctx *Context, appCreator types.AppCreator) error {
310309
goCtx, cancel := context.WithCancel(context.Background())
311310
err = svr.Start(goCtx)
312311
if err != nil {
313-
fmt.Printf(err.Error() + "\n")
312+
fmt.Println(err.Error())
314313
os.Exit(1)
315314
}
316315

sei-cosmos/x/auth/ante/fee.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func DeductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc types.AccountI
207207

208208
err := bankKeeper.DeferredSendCoinsFromAccountToModule(ctx, acc.GetAddress(), types.FeeCollectorName, fees)
209209
if err != nil {
210-
return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error())
210+
return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "%s", err.Error())
211211
}
212212

213213
return nil

sei-cosmos/x/auth/keeper/grpc_query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (ak AccountKeeper) Account(c context.Context, req *types.QueryAccountReques
6767

6868
any, err := codectypes.NewAnyWithValue(account)
6969
if err != nil {
70-
return nil, status.Errorf(codes.Internal, err.Error())
70+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
7171
}
7272

7373
return &types.QueryAccountResponse{Account: any}, nil

sei-cosmos/x/authz/keeper/grpc_query.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (k Keeper) Grants(c context.Context, req *authz.QueryGrantsRequest) (*authz
3939
}
4040
authorizationAny, err := codectypes.NewAnyWithValue(authorization)
4141
if err != nil {
42-
return nil, status.Errorf(codes.Internal, err.Error())
42+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
4343
}
4444
return &authz.QueryGrantsResponse{
4545
Grants: []*authz.Grant{{
@@ -61,7 +61,7 @@ func (k Keeper) Grants(c context.Context, req *authz.QueryGrantsRequest) (*authz
6161

6262
authorizationAny, err := codectypes.NewAnyWithValue(auth1)
6363
if err != nil {
64-
return nil, status.Errorf(codes.Internal, err.Error())
64+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
6565
}
6666
return &authz.Grant{
6767
Authorization: authorizationAny,
@@ -103,7 +103,7 @@ func (k Keeper) GranterGrants(c context.Context, req *authz.QueryGranterGrantsRe
103103

104104
any, err := codectypes.NewAnyWithValue(auth1)
105105
if err != nil {
106-
return nil, status.Errorf(codes.Internal, err.Error())
106+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
107107
}
108108

109109
grantee := firstAddressFromGrantStoreKey(key)
@@ -155,7 +155,7 @@ func (k Keeper) GranteeGrants(c context.Context, req *authz.QueryGranteeGrantsRe
155155

156156
authorizationAny, err := codectypes.NewAnyWithValue(auth1)
157157
if err != nil {
158-
return nil, status.Errorf(codes.Internal, err.Error())
158+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
159159
}
160160

161161
return &authz.GrantAuthorization{

sei-cosmos/x/capability/keeper/keeper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (sk ScopedKeeper) NewCapability(ctx sdk.Context, name string) (*types.Capab
229229
store := ctx.KVStore(sk.storeKey)
230230

231231
if _, ok := sk.GetCapability(ctx, name); ok {
232-
return nil, sdkerrors.Wrapf(types.ErrCapabilityTaken, fmt.Sprintf("module: %s, name: %s", sk.module, name))
232+
return nil, sdkerrors.Wrapf(types.ErrCapabilityTaken, "module: %s, name: %s", sk.module, name)
233233
}
234234

235235
// create new capability with the current global index

sei-cosmos/x/capability/types/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (co *CapabilityOwners) Set(owner Owner) error {
4747
i, ok := co.Get(owner)
4848
if ok {
4949
// owner already exists at co.Owners[i]
50-
return sdkerrors.Wrapf(ErrOwnerClaimed, owner.String())
50+
return sdkerrors.Wrapf(ErrOwnerClaimed, "%s", owner.String())
5151
}
5252

5353
// owner does not exist in the set of owners, so we insert at position i

sei-cosmos/x/evidence/keeper/grpc_query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (k Keeper) Evidence(c context.Context, req *types.QueryEvidenceRequest) (*t
4242

4343
evidenceAny, err := codectypes.NewAnyWithValue(msg)
4444
if err != nil {
45-
return nil, status.Errorf(codes.Internal, err.Error())
45+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
4646
}
4747

4848
return &types.QueryEvidenceResponse{Evidence: evidenceAny}, nil

sei-cosmos/x/feegrant/keeper/grpc_query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest
3636

3737
feeAllowance, err := q.GetAllowance(ctx, granterAddr, granteeAddr)
3838
if err != nil {
39-
return nil, status.Errorf(codes.Internal, err.Error())
39+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
4040
}
4141

4242
msg, ok := feeAllowance.(proto.Message)
@@ -46,7 +46,7 @@ func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest
4646

4747
feeAllowanceAny, err := codectypes.NewAnyWithValue(msg)
4848
if err != nil {
49-
return nil, status.Errorf(codes.Internal, err.Error())
49+
return nil, status.Errorf(codes.Internal, "%s", err.Error())
5050
}
5151

5252
return &feegrant.QueryAllowanceResponse{

0 commit comments

Comments
 (0)