diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f7f3404256b..7310f39e4cf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,52 +1,5 @@ # CODEOWNERS: https://help.github.com/articles/about-codeowners/ -* @AdityaSripal @damiannolan @gjermundgaraba - -# Our appreciation and gratitude to past code owners: @fedekunze @seantking @tmsdkeys @charleenfei @crodriguezvega @colin-axner @chatton @bznein @DimitrisJim - -# Order is important; the last matching pattern takes the most -# precedence. When someone opens a pull request that only -# modifies 27-interchain-accounts files, only the interchain account owners -# and not the global owner(s) will be requested for a review. - -# CODEOWNERS for the CODEOWNER file - -/.github/CODEOWNERS @AdityaSripal @damiannolan - -# CODEOWNERS for the core IBC module - -/modules/core/ @AdityaSripal @damiannolan -/proto/ibc/core/ @AdityaSripal @damiannolan - -# CODEOWNERS for the light-clients - -/modules/light-clients/ @AdityaSripal @damiannolan -/proto/ibc/lightclients/ @AdityaSripal @damiannolan - -# CODEOWNERS for 08-wasm light client module - -/modules/light-clients/08-wasm/ @AdityaSripal @damiannolan @srdtrk - -# CODEOWNERS for ICS 20 - -/modules/apps/transfer/ @AdityaSripal @damiannolan -/proto/ibc/applications/transfer/ @AdityaSripal @damiannolan - -# CODEOWNERS for interchain-accounts module - -/modules/apps/27-interchain-accounts/ @AdityaSripal @damiannolan -/proto/ibc/applications/interchain_accounts/ @AdityaSripal @damiannolan - -# CODEOWNERS for fee module - -/modules/apps/29-fee/ @AdityaSripal @damiannolan -/proto/ibc/applications/fee/ @AdityaSripal @damiannolan - -# CODEOWNERS for callbacks middleware - -/modules/apps/callbacks/ @AdityaSripal @damiannolan @srdtrk - -# CODEOWNERS for docs - -/docs/ @AdityaSripal @damiannolan @srdtrk +* @AdityaSripal @gjermundgaraba @srdtrk +# Our appreciation and gratitude to past code owners: @fedekunze @seantking @tmsdkeys @charleenfei @crodriguezvega @colin-axner @chatton @bznein @DimitrisJim @damiannolan diff --git a/.github/workflows/callbacks.yml b/.github/workflows/callbacks.yml index adf1b777e56..d4e13cc5316 100644 --- a/.github/workflows/callbacks.yml +++ b/.github/workflows/callbacks.yml @@ -23,7 +23,7 @@ jobs: fetch-depth: 0 - uses: golangci/golangci-lint-action@v6.1.1 with: - version: v1.60 + version: v1.62 only-new-issues: true args: --timeout 5m working-directory: modules/apps/callbacks diff --git a/.github/workflows/e2emodule.yml b/.github/workflows/e2emodule.yml index 5d57178b3d1..0a39029ac76 100644 --- a/.github/workflows/e2emodule.yml +++ b/.github/workflows/e2emodule.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - uses: golangci/golangci-lint-action@v6.1.1 with: - version: v1.60 + version: v1.62 only-new-issues: true args: --timeout 5m working-directory: e2e/ diff --git a/.github/workflows/golangci-feature.yml b/.github/workflows/golangci-feature.yml index f3d8b9f1e60..f66d2ddb1ba 100644 --- a/.github/workflows/golangci-feature.yml +++ b/.github/workflows/golangci-feature.yml @@ -29,6 +29,6 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6.1.1 with: - version: v1.60 + version: v1.62 only-new-issues: true args: --timeout 10m diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index ccec7ff787f..1e22051640e 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -25,6 +25,6 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6.1.1 with: - version: v1.60 + version: v1.62 only-new-issues: true args: --timeout 10m diff --git a/.github/workflows/wasm-client.yml b/.github/workflows/wasm-client.yml index f947cac3b79..5e669b2afab 100644 --- a/.github/workflows/wasm-client.yml +++ b/.github/workflows/wasm-client.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - uses: golangci/golangci-lint-action@v6.1.1 with: - version: v1.60 + version: v1.62 only-new-issues: true args: --timeout 10m working-directory: modules/light-clients/08-wasm diff --git a/modules/apps/29-fee/keeper/grpc_query.go b/modules/apps/29-fee/keeper/grpc_query.go index 1c0b4317185..a2e9fb92eb1 100644 --- a/modules/apps/29-fee/keeper/grpc_query.go +++ b/modules/apps/29-fee/keeper/grpc_query.go @@ -118,7 +118,7 @@ func (k Keeper) TotalRecvFees(ctx context.Context, req *types.QueryTotalRecvFees feesInEscrow, found := k.GetFeesInEscrow(ctx, req.PacketId) if !found { - return nil, status.Errorf( + return nil, status.Error( codes.NotFound, errorsmod.Wrapf(types.ErrFeeNotFound, "channel: %s, port: %s, sequence: %d", req.PacketId.ChannelId, req.PacketId.PortId, req.PacketId.Sequence).Error(), ) @@ -142,7 +142,7 @@ func (k Keeper) TotalAckFees(ctx context.Context, req *types.QueryTotalAckFeesRe feesInEscrow, found := k.GetFeesInEscrow(ctx, req.PacketId) if !found { - return nil, status.Errorf( + return nil, status.Error( codes.NotFound, errorsmod.Wrapf(types.ErrFeeNotFound, "channel: %s, port: %s, sequence: %d", req.PacketId.ChannelId, req.PacketId.PortId, req.PacketId.Sequence).Error(), ) @@ -166,7 +166,7 @@ func (k Keeper) TotalTimeoutFees(ctx context.Context, req *types.QueryTotalTimeo feesInEscrow, found := k.GetFeesInEscrow(ctx, req.PacketId) if !found { - return nil, status.Errorf( + return nil, status.Error( codes.NotFound, errorsmod.Wrapf(types.ErrFeeNotFound, "channel: %s, port: %s, sequence: %d", req.PacketId.ChannelId, req.PacketId.PortId, req.PacketId.Sequence).Error(), ) diff --git a/modules/core/04-channel/keeper/keeper.go b/modules/core/04-channel/keeper/keeper.go index c14f6aa49c8..527cd10007d 100644 --- a/modules/core/04-channel/keeper/keeper.go +++ b/modules/core/04-channel/keeper/keeper.go @@ -369,7 +369,7 @@ func (k *Keeper) GetAllPacketAckSeqs(ctx context.Context) (seqs []types.PacketSe func (k *Keeper) IteratePacketCommitment(ctx context.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketCommitmentPrefix)) - k.iterateHashes(ctx, iterator, cb) + k.iterateHashes(iterator, cb) } // GetAllPacketCommitments returns all stored PacketCommitments objects. @@ -388,7 +388,7 @@ func (k *Keeper) GetAllPacketCommitments(ctx context.Context) (commitments []typ func (k *Keeper) IteratePacketCommitmentAtChannel(ctx context.Context, portID, channelID string, cb func(_, _ string, sequence uint64, hash []byte) bool) { store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, host.PacketCommitmentPrefixKey(portID, channelID)) - k.iterateHashes(ctx, iterator, cb) + k.iterateHashes(iterator, cb) } // GetAllPacketCommitmentsAtChannel returns all stored PacketCommitments objects for a specified @@ -408,7 +408,7 @@ func (k *Keeper) GetAllPacketCommitmentsAtChannel(ctx context.Context, portID, c func (k *Keeper) IteratePacketReceipt(ctx context.Context, cb func(portID, channelID string, sequence uint64, receipt []byte) bool) { store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) - k.iterateHashes(ctx, iterator, cb) + k.iterateHashes(iterator, cb) } // GetAllPacketReceipts returns all stored PacketReceipt objects. @@ -427,7 +427,7 @@ func (k *Keeper) GetAllPacketReceipts(ctx context.Context) (receipts []types.Pac func (k *Keeper) IteratePacketAcknowledgement(ctx context.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketAckPrefix)) - k.iterateHashes(ctx, iterator, cb) + k.iterateHashes(iterator, cb) } // GetAllPacketAcks returns all stored PacketAcknowledgements objects. @@ -688,7 +688,7 @@ func (k *Keeper) GetParams(ctx context.Context) types.Params { } // common functionality for IteratePacketCommitment and IteratePacketAcknowledgement -func (k *Keeper) iterateHashes(ctx context.Context, iterator db.Iterator, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { +func (k *Keeper) iterateHashes(iterator db.Iterator, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/core/24-host/validate.go b/modules/core/24-host/validate.go index 3ba0f88847c..fb83a83542c 100644 --- a/modules/core/24-host/validate.go +++ b/modules/core/24-host/validate.go @@ -36,7 +36,7 @@ var IsValidID = regexp.MustCompile(`^[a-zA-Z0-9\.\_\+\-\#\[\]\<\>]+$`).MatchStri // ValidateFn function type to validate path and identifier bytestrings type ValidateFn func(string) error -func defaultIdentifierValidator(id string, min, max int) error { +func defaultIdentifierValidator(id string, minLength, maxLength int) error { if strings.TrimSpace(id) == "" { return errorsmod.Wrap(ErrInvalidID, "identifier cannot be blank") } @@ -45,8 +45,8 @@ func defaultIdentifierValidator(id string, min, max int) error { return errorsmod.Wrapf(ErrInvalidID, "identifier %s cannot contain separator '/'", id) } // valid id must fit the length requirements - if len(id) < min || len(id) > max { - return errorsmod.Wrapf(ErrInvalidID, "identifier %s has invalid length: %d, must be between %d-%d characters", id, len(id), min, max) + if len(id) < minLength || len(id) > maxLength { + return errorsmod.Wrapf(ErrInvalidID, "identifier %s has invalid length: %d, must be between %d-%d characters", id, len(id), minLength, maxLength) } // valid id must contain only alphanumeric characters and some allowed symbols. if !IsValidID(id) { diff --git a/modules/light-clients/07-tendermint/client_state.go b/modules/light-clients/07-tendermint/client_state.go index 89ab21128d7..9261ed81c09 100644 --- a/modules/light-clients/07-tendermint/client_state.go +++ b/modules/light-clients/07-tendermint/client_state.go @@ -125,7 +125,7 @@ func (cs ClientState) Validate() error { } if err := light.ValidateTrustLevel(cs.TrustLevel.ToTendermint()); err != nil { - return errorsmod.Wrapf(ErrInvalidTrustLevel, err.Error()) + return errorsmod.Wrap(ErrInvalidTrustLevel, err.Error()) } if cs.TrustingPeriod <= 0 { return errorsmod.Wrap(ErrInvalidTrustingPeriod, "trusting period must be greater than zero")