Skip to content

Commit

Permalink
Update changelog for unmarshal packet data interface change (#7001)
Browse files Browse the repository at this point in the history
* chore: update changelog for unmarshal packet data interface change

* docs: updating docs to include note about version return

* docs: just grep-foo thangs

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
  • Loading branch information
chatton and DimitrisJim authored Jul 31, 2024
1 parent 75ec6e9 commit 4a0da8f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (core/04-channel) [\#6023](https://github.com/cosmos/ibc-go/pull/6023) Remove emission of non-hexlified event attributes `packet_data` and `packet_ack`.
* (core) [\#6320](https://github.com/cosmos/ibc-go/pull/6320) Remove unnecessary `Proof` interface from `exported` package.
* (core/05-port) [\#6341](https://github.com/cosmos/ibc-go/pull/6341) Modify `UnmarshalPacketData` interface to take in the context, portID, and channelID. This allows for packet data's to be unmarshaled based on the channel version.
* (core/05-port) [\#6341](https://github.com/cosmos/ibc-go/pull/6988) Modify `UnmarshalPacketData` interface to return the underlying application version.
* (apps/27-interchain-accounts) [\#6433](https://github.com/cosmos/ibc-go/pull/6433) Use UNORDERED as the default ordering for new ICA channels.
* (apps/transfer) [\#6440](https://github.com/cosmos/ibc-go/pull/6440) Remove `GetPrefixedDenom`.
* (apps/transfer) [\#6508](https://github.com/cosmos/ibc-go/pull/6508) Remove the `DenomTrace` type.
Expand Down
3 changes: 2 additions & 1 deletion docs/architecture/adr-008-app-caller-cbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ type PacketDataUnmarshaler interface {
// UnmarshalPacketData unmarshals the packet data into a concrete type
// ctx, portID, channelID are provided as arguments, so that (if needed)
// the packet data can be unmarshaled based on the channel version.
UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, error)
// the version of the underlying app is also returned.
UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, string, error)
}
```

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/01-ibc/03-apps/02-ibcmodule.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ type PacketDataUnmarshaler interface {
// UnmarshalPacketData unmarshals the packet data into a concrete type
// ctx, portID, channelID are provided as arguments, so that (if needed)
// the packet data can be unmarshaled based on the channel version.
UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, error)
// The version of the underlying app is also returned.
UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, string, error)
}
```

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/04-middleware/02-callbacks/03-interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ type PacketDataUnmarshaler interface {
// UnmarshalPacketData unmarshals the packet data into a concrete type
// ctx, portID, channelID are provided as arguments, so that (if needed)
// the packet data can be unmarshaled based on the channel version.
UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, error)
// The version of the underlying app is also returned.
UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, string, error)
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/05-migrations/13-v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ OnTimeoutPacket func(

### 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:
- 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. In addition to these, `UnmarshalPacketData` now also returns the underlying application's version:

```diff
type PacketDataUnmarshaler interface {
Expand All @@ -185,7 +185,7 @@ type PacketDataUnmarshaler interface {
+ portID,
+ channelID string,
bz []byte,
) (interface{}, error)
+ ) (interface{}, string, error)
}
```

Expand Down

0 comments on commit 4a0da8f

Please sign in to comment.