Skip to content

Commit 50d08d5

Browse files
authored
Merge branch 'main' into jim/move-denomtrace-to-internal
2 parents 94d6cee + 14cfc6d commit 50d08d5

39 files changed

+3122
-2859
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
5555
* (core/04-channel) [\#6023](https://github.com/cosmos/ibc-go/pull/6023) Remove emission of non-hexlified event attributes `packet_data` and `packet_ack`.
5656
* (core) [\#6320](https://github.com/cosmos/ibc-go/pull/6320) Remove unnecessary `Proof` interface from `exported` package.
5757
* (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.
58+
* (apps/27-interchain-accounts) [\#6433](https://github.com/cosmos/ibc-go/pull/6433) Use UNORDERED as the default ordering for new ICA channels.
5859
* (apps/transfer) [\#6440](https://github.com/cosmos/ibc-go/pull/6440) Remove `GetPrefixedDenom`.
5960

6061
### State Machine Breaking
@@ -69,6 +70,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
6970

7071
### Features
7172

73+
* (apps/transfer) [\#6492](https://github.com/cosmos/ibc-go/pull/6492) Added new `Tokens` field to `MsgTransfer` to enable sending of multiple denoms, and deprecated the `Token` field.
74+
7275
### Bug Fixes
7376

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

docs/docs/02-apps/01-transfer/04-messages.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,30 @@ A fungible token cross chain transfer is achieved by using the `MsgTransfer`:
1515
type MsgTransfer struct {
1616
SourcePort string
1717
SourceChannel string
18+
// Deprecated: Use Tokens instead.
1819
Token sdk.Coin
1920
Sender string
2021
Receiver string
2122
TimeoutHeight ibcexported.Height
2223
TimeoutTimestamp uint64
2324
Memo string
25+
Tokens []sdk.Coin
2426
}
2527
```
2628

2729
This message is expected to fail if:
2830

2931
- `SourcePort` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators).
3032
- `SourceChannel` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators)).
31-
- `Token` is invalid (denom is invalid or amount is negative)
32-
- `Token.Amount` is not positive.
33-
- `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](/architecture/adr-001-coin-source-tracing).
33+
- `Tokens` must not be empty.
34+
- Each `Coin` in `Tokens` must satisfy the following:
35+
- `Amount` must be positive.
36+
- `Denom` must be a valid IBC denomination, as defined in [ADR 001 - Coin Source Tracing](/architecture/adr-001-coin-source-tracing).
3437
- `Sender` is empty.
3538
- `Receiver` is empty.
3639
- `TimeoutHeight` and `TimeoutTimestamp` are both zero.
3740

41+
Please note that the `Token` field is deprecated and users should now use `Tokens` instead. If `Token` is used then `Tokens` must be empty. Similarly, if `Tokens` is used then `Token` should be left empty.
3842
This message will send a fungible token to the counterparty chain represented by the counterparty Channel End connected to the Channel End with the identifiers `SourcePort` and `SourceChannel`.
3943

4044
The denomination provided for transfer should correspond to the same denomination represented on this chain. The prefixes will be added as necessary upon by the receiving chain.

docs/docs/02-apps/01-transfer/05-events.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ sidebar_position: 5
55
slug: /apps/transfer/events
66
---
77

8-
98
# Events
109

1110
## `MsgTransfer`
@@ -14,41 +13,41 @@ slug: /apps/transfer/events
1413
|--------------|---------------|-----------------|
1514
| ibc_transfer | sender | \{sender\} |
1615
| ibc_transfer | receiver | \{receiver\} |
17-
| message | action | transfer |
16+
| ibc_transfer | tokens | \{jsonTokens\} |
17+
| ibc_transfer | memo | \{memo\} |
1818
| message | module | transfer |
1919

2020
## `OnRecvPacket` callback
2121

22-
| Type | Attribute Key | Attribute Value |
23-
|-----------------------|---------------|-----------------|
24-
| fungible_token_packet | module | transfer |
25-
| fungible_token_packet | sender | \{sender\} |
26-
| fungible_token_packet | receiver | \{receiver\} |
27-
| fungible_token_packet | denom | \{denom\} |
28-
| fungible_token_packet | amount | \{amount\} |
29-
| fungible_token_packet | success | \{ackSuccess\} |
30-
| fungible_token_packet | memo | \{memo\} |
31-
| denomination_trace | trace_hash | \{hex_hash\} |
22+
| Type | Attribute Key | Attribute Value |
23+
|-----------------------|---------------|------------------|
24+
| fungible_token_packet | sender | \{sender\} |
25+
| fungible_token_packet | receiver | \{receiver\} |
26+
| fungible_token_packet | tokens | \{jsonTokens\} |
27+
| fungible_token_packet | success | \{ackSuccess\} |
28+
| fungible_token_packet | error | \{ackError\} |
29+
| fungible_token_packet | memo | \{memo\} |
30+
| denomination | trace_hash | \{hex_hash\} |
31+
| denomination | denom | \{voucherDenom\} |
32+
| message | module | transfer |
3233

3334
## `OnAcknowledgePacket` callback
3435

35-
| Type | Attribute Key | Attribute Value |
36-
|-----------------------|-----------------|-------------------|
37-
| fungible_token_packet | module | transfer |
38-
| fungible_token_packet | sender | \{sender\} |
39-
| fungible_token_packet | receiver | \{receiver\} |
40-
| fungible_token_packet | denom | \{denom\} |
41-
| fungible_token_packet | amount | \{amount\} |
42-
| fungible_token_packet | memo | \{memo\} |
43-
| fungible_token_packet | acknowledgement | \{ack.String()\} |
44-
| fungible_token_packet | success / error | \{ack.Response\} |
36+
| Type | Attribute Key | Attribute Value |
37+
|-----------------------|-----------------|------------------|
38+
| fungible_token_packet | sender | \{sender\} |
39+
| fungible_token_packet | receiver | \{receiver\} |
40+
| fungible_token_packet | tokens | \{jsonTokens\} |
41+
| fungible_token_packet | memo | \{memo\} |
42+
| fungible_token_packet | acknowledgement | \{ack.String()\} |
43+
| fungible_token_packet | success / error | \{ack.Response\} |
44+
| message | module | transfer |
4545

4646
## `OnTimeoutPacket` callback
4747

48-
| Type | Attribute Key | Attribute Value |
49-
|-----------------------|-----------------|-----------------|
50-
| fungible_token_packet | module | transfer |
51-
| fungible_token_packet | refund_receiver | \{receiver\} |
52-
| fungible_token_packet | denom | \{denom\} |
53-
| fungible_token_packet | amount | \{amount\} |
54-
| fungible_token_packet | memo | \{memo\} |
48+
| Type | Attribute Key | Attribute Value |
49+
|---------|-----------------|-----------------|
50+
| timeout | refund_receiver | \{receiver\} |
51+
| timeout | refund_tokens | \{jsonTokens\} |
52+
| timeout | memo | \{memo\} |
53+
| message | module | transfer |

docs/docs/02-apps/02-interchain-accounts/09-active-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The Interchain Accounts module uses either [ORDERED or UNORDERED](https://github
1111

1212
When using `ORDERED` channels, the order of transactions when sending packets from a controller to a host chain is maintained.
1313

14-
When using `UNORDERED` channels, there is no guarantee that the order of transactions when sending packets from the controller to the host chain is maintained.
14+
When using `UNORDERED` channels, there is no guarantee that the order of transactions when sending packets from the controller to the host chain is maintained. If no ordering is specified in `MsgRegisterInterchainAccount`, then the default ordering for new ICA channels is `UNORDERED`.
1515

1616
> A limitation when using ORDERED channels is that when a packet times out the channel will be closed.
1717

docs/docs/02-apps/02-interchain-accounts/10-legacy/03-keeper-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ The controller submodule keeper exposes two legacy functions that allow respecti
1919
The authentication module can begin registering interchain accounts by calling `RegisterInterchainAccount`:
2020

2121
```go
22-
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionID, owner.String(), version); err != nil {
22+
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionID, owner.String(), version, channeltypes.UNORDERED); err != nil {
2323
return err
2424
}
2525

2626
return nil
2727
```
2828

29-
The `version` argument is used to support ICS-29 fee middleware for relayer incentivization of ICS-27 packets. Consumers of the `RegisterInterchainAccount` are expected to build the appropriate JSON encoded version string themselves and pass it accordingly. If an empty string is passed in the `version` argument, then the version will be initialized to a default value in the `OnChanOpenInit` callback of the controller's handler, so that channel handshake can proceed.
29+
The `version` argument is used to support ICS-29 fee middleware for relayer incentivization of ICS-27 packets. The `ordering` argument allows to specify the ordering of the channel that is created; if `NONE` is passed, then the default ordering will be `UNORDERED`. Consumers of the `RegisterInterchainAccount` are expected to build the appropriate JSON encoded version string themselves and pass it accordingly. If an empty string is passed in the `version` argument, then the version will be initialized to a default value in the `OnChanOpenInit` callback of the controller's handler, so that channel handshake can proceed.
3030

3131
The following code snippet illustrates how to construct an appropriate interchain accounts `Metadata` and encode it as a JSON bytestring:
3232

@@ -44,7 +44,7 @@ if err != nil {
4444
return err
4545
}
4646

47-
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(appVersion)); err != nil {
47+
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(appVersion), channeltypes.UNORDERED); err != nil {
4848
return err
4949
}
5050
```
@@ -75,7 +75,7 @@ if err != nil {
7575
return err
7676
}
7777

78-
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(feeEnabledVersion)); err != nil {
78+
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(feeEnabledVersion), channeltypes.UNORDERED); err != nil {
7979
return err
8080
}
8181
```

docs/docs/05-migrations/13-v8-to-v9.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ func NewKeeper(
8484
) Keeper
8585
```
8686

87+
The legacy function `RegisterInterchainAccount` now takes an extra parameter to specify the ordering of new ICA channels:
88+
89+
```diff
90+
func (k Keeper) RegisterInterchainAccount(
91+
ctx sdk.Context,
92+
connectionID, owner,
93+
version string,
94+
+ ordering channeltypes.Order
95+
) error {
96+
```
97+
8798
## Relayers
8899

89100
- Renaming of event attribute keys in [#5603](https://github.com/cosmos/ibc-go/pull/5603).

modules/apps/27-interchain-accounts/controller/client/cli/tx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ the associated capability.`),
7171
}
7272

7373
cmd.Flags().String(flagVersion, "", "Controller chain channel version")
74-
cmd.Flags().String(flagOrdering, channeltypes.ORDERED.String(), fmt.Sprintf("Channel ordering, can be one of: %s", strings.Join(connectiontypes.SupportedOrderings, ", ")))
74+
cmd.Flags().String(flagOrdering, channeltypes.UNORDERED.String(), fmt.Sprintf("Channel ordering, can be one of: %s", strings.Join(connectiontypes.SupportedOrderings, ", ")))
7575
flags.AddTxFlagsToCmd(cmd)
7676

7777
return cmd

0 commit comments

Comments
 (0)