Skip to content

Commit

Permalink
changelog and migration docs for #6960
Browse files Browse the repository at this point in the history
  • Loading branch information
crodriguezvega committed Jul 28, 2024
1 parent beb2d93 commit cd281d8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (core/types) [\#6794](https://github.com/cosmos/ibc-go/pull/6794) The composite interface `QueryServer` has been removed from package `core/types`. Please use the granular `QueryServer` interfaces provided by each core submodule.
* (light-clients/06-solomachine) [\#6888](https://github.com/cosmos/ibc-go/pull/6888) Remove `TypeClientMisbehaviour` constant and the `Type` method on `Misbehaviour`.
* (light-clients/06-solomachine, light-clients/07-tendermint) [\#6891](https://github.com/cosmos/ibc-go/pull/6891) The `VerifyMembership` and `VerifyNonMembership` functions of solomachine's `ClientState` have been made private. The `VerifyMembership`, `VerifyNonMembership`, `GetTimestampAtHeight`, `Status` and `Initialize` functions of tendermint's `ClientState` have been made private.
* (core/04-channel) [\#6902](https://github.com/cosmos/ibc-go/pull/6902) Add channel version to core application callbacks.

### State Machine Breaking

Expand Down
68 changes: 68 additions & 0 deletions docs/docs/05-migrations/13-v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,74 @@ func (k *Keeper) TimeoutOnClose(
)
```

- The keeper handlers `RecvPacket`, `AcknowledgePacket`, `TimeoutPacket` and `TimeoutOnClose` return now the channel version, which the message server passes to the packet lifecycle application callbacks (`OnRecvPacket`, `OnAcknowledgementPacket` and `OnTimeoutPacket`). The channel version is useful when adding backwards compatible features to an existing application implementation (for example: in the context of ICS20 v2, middleware and the transfer application may use the channel version to unmarshal the packet differently depending on the channel version).

```diff
func (k *Keeper) RecvPacket(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
packet types.Packet,
proof []byte,
proofHeight exported.Height,
- ) error {
+ ) (string, error) {

func (k *Keeper) AcknowledgePacket(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
packet types.Packet,
acknowledgement []byte,
proof []byte,
proofHeight exported.Height,
- ) error {
+ ) (string, error) {

func (k *Keeper) TimeoutPacket(
ctx sdk.Context,
packet types.Packet,
proof []byte,
proofHeight exported.Height,
nextSequenceRecv uint64,
- ) error {
+ ) (string, error) {

func (k *Keeper) TimeoutOnClose(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
packet types.Packet,
proof,
closedProof []byte,
proofHeight exported.Height,
nextSequenceRecv uint64,
counterpartyUpgradeSequence uint64,
- ) error {
+ ) (string, error) {
```

```diff
OnRecvPacket func(
ctx sdk.Context,
+ channelVersion string,
packet channeltypes.Packet,
relayer sdk.AccAddress,
) exported.Acknowledgement

OnAcknowledgementPacket func(
ctx sdk.Context,
+ channelVersion string,
packet channeltypes.Packet,
acknowledgement []byte,
relayer sdk.AccAddress,
) error

OnTimeoutPacket func(
ctx sdk.Context,
+ channelVersion string,
packet channeltypes.Packet,
relayer sdk.AccAddress,
) error
```

### 05-port

- The signature of the `UnmarshalPacketData` function of the `PacketDataUnmarshaler` interface takes now extra arguments for the context and the port and channel identifiers. These parameters have been added so that implementations of the interface function can retrieve the channel version, which allows the provided packet data to be unmarshaled based on the channel version:
Expand Down

0 comments on commit cd281d8

Please sign in to comment.