Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/google.golang.org/prot…
Browse files Browse the repository at this point in the history
…obuf-1.36.1
  • Loading branch information
gjermundgaraba authored Dec 23, 2024
2 parents 34190a8 + e10bbbc commit e81dca6
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 66 deletions.
51 changes: 2 additions & 49 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.60
version: v1.62
only-new-issues: true
args: --timeout 5m
working-directory: modules/apps/callbacks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2emodule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.60
version: v1.62
only-new-issues: true
args: --timeout 5m
working-directory: e2e/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.60
version: v1.62
only-new-issues: true
args: --timeout 10m
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.60
version: v1.62
only-new-issues: true
args: --timeout 10m
2 changes: 1 addition & 1 deletion .github/workflows/wasm-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.60
version: v1.62
only-new-issues: true
args: --timeout 10m
working-directory: modules/light-clients/08-wasm
Expand Down
6 changes: 3 additions & 3 deletions modules/apps/29-fee/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
Expand All @@ -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(),
)
Expand All @@ -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(),
)
Expand Down
10 changes: 5 additions & 5 deletions modules/core/04-channel/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions modules/core/24-host/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/07-tendermint/client_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e81dca6

Please sign in to comment.