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

(feat) Imported latest changes from the official repo v8.2.1 #2

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [[Unreleased]]

### Dependencies

### API Breaking

### State Machine Breaking

### Improvements

### Features

### Bug Fixes

## [v8.2.1](https://github.com/cosmos/ibc-go/releases/tag/v8.2.1) - 2024-04-25

### Improvements

* (apps/27-interchain-accounts) [\#6142](https://github.com/cosmos/ibc-go/pull/6142) Emit an event signalling that the host submodule is disabled.

### Bug Fixes

* [\#5837](https://github.com/cosmos/ibc-go/pull/5837) Move 02-client legacy v1beta gov types deprecation message to constructor functions.
* (apps/transfer) [\#5497](https://github.com/cosmos/ibc-go/pull/5497) Fix text in log of the migration that sets the total amount of source chain tokens in escrow.

## [v8.2.0](https://github.com/cosmos/ibc-go/releases/tag/v8.2.0) - 2024-04-05

### Dependencies
Expand Down
1 change: 1 addition & 0 deletions modules/apps/27-interchain-accounts/host/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func (im IBCModule) OnRecvPacket(
logger := im.keeper.Logger(ctx)
if !im.keeper.GetParams(ctx).HostEnabled {
logger.Info("host submodule is disabled")
keeper.EmitHostDisabledEvent(ctx, packet)
return channeltypes.NewErrorAcknowledgement(types.ErrHostSubModuleDisabled)
}

Expand Down
15 changes: 15 additions & 0 deletions modules/apps/27-interchain-accounts/host/keeper/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
"github.com/cosmos/ibc-go/v8/modules/core/exported"
)

Expand All @@ -29,3 +31,16 @@ func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack expo
),
)
}

// EmitHostDisabledEvent emits an event signalling that the host submodule is disabled.
func EmitHostDisabledEvent(ctx sdk.Context, packet channeltypes.Packet) {
ctx.EventManager().EmitEvent(
sdk.NewEvent(
icatypes.EventTypePacket,
sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName),
sdk.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()),
sdk.NewAttribute(icatypes.AttributeKeyAckError, types.ErrHostSubModuleDisabled.Error()),
sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, "false"),
),
)
}
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (m Migrator) MigrateTotalEscrowForDenom(ctx sdk.Context) error {
m.keeper.SetTotalEscrowForDenom(ctx, totalEscrow)
}

m.keeper.Logger(ctx).Info("successfully set total escrow for %d denominations", totalEscrowed.Len())
m.keeper.Logger(ctx).Info("successfully set total escrow", "number of denominations", totalEscrowed.Len())
return nil
}

Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"strings"

errorsmod "cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"

clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
Expand Down
8 changes: 6 additions & 2 deletions modules/core/02-client/types/legacy_proposal.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Deprecated: The legacy v1beta1 gov types maintained in this file are deprecated and will be removed in a future release.
// Please use MsgIBCSoftwareUpgrade and MsgRecoverClient in favour of the legacy v1beta1 gov proposal types.
package types

import (
Expand Down Expand Up @@ -34,6 +32,9 @@ func init() {
}

// NewClientUpdateProposal creates a new client update proposal.
//
// Deprecated: The legacy v1beta1 gov ClientUpdateProposal is deprecated
// and will be removed in a future release. Please use MsgRecoverClient instead.
func NewClientUpdateProposal(title, description, subjectClientID, substituteClientID string) govtypes.Content {
return &ClientUpdateProposal{
Title: title,
Expand Down Expand Up @@ -76,6 +77,9 @@ func (cup *ClientUpdateProposal) ValidateBasic() error {
}

// NewUpgradeProposal creates a new IBC breaking upgrade proposal.
//
// Deprecated: The legacy v1beta1 gov UpgradeProposal is deprecated
// and will be removed in a future release. Please use MsgIBCSoftwareUpgrade instead.
func NewUpgradeProposal(title, description string, plan upgradetypes.Plan, upgradedClientState exported.ClientState) (govtypes.Content, error) {
clientAny, err := PackClientState(upgradedClientState)
if err != nil {
Expand Down
Loading