From c44315bfc2332140c287d62e9fcd71891c7986d2 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Thu, 27 Jun 2024 13:32:58 +0200 Subject: [PATCH] docs: document limits in string fields (#6671) * docs: document limits in string fields * updated v7.6.x docs --- docs/docs/02-apps/01-transfer/04-messages.md | 3 ++- docs/docs/02-apps/02-interchain-accounts/05-messages.md | 4 ++-- docs/docs/04-middleware/01-ics29-fee/04-fee-distribution.md | 2 +- .../version-v7.6.x/02-apps/01-transfer/04-messages.md | 3 ++- .../02-apps/02-interchain-accounts/05-messages.md | 4 ++-- .../04-middleware/01-ics29-fee/04-fee-distribution.md | 2 +- .../02-apps/02-interchain-accounts/05-messages.md | 4 ++-- .../04-middleware/01-ics29-fee/04-fee-distribution.md | 2 +- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/docs/02-apps/01-transfer/04-messages.md b/docs/docs/02-apps/01-transfer/04-messages.md index 69300985fef..43cdf32a3e2 100644 --- a/docs/docs/02-apps/01-transfer/04-messages.md +++ b/docs/docs/02-apps/01-transfer/04-messages.md @@ -35,7 +35,8 @@ This message is expected to fail if: - `Amount` must be positive. - `Denom` must be a valid IBC denomination, as defined in [ADR 001 - Coin Source Tracing](/architecture/adr-001-coin-source-tracing). - `Sender` is empty. -- `Receiver` is empty. +- `Receiver` is empty or contains more than 2048 bytes. +- `Memo` contains more than 32768 bytes. - `TimeoutHeight` and `TimeoutTimestamp` are both zero. 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. diff --git a/docs/docs/02-apps/02-interchain-accounts/05-messages.md b/docs/docs/02-apps/02-interchain-accounts/05-messages.md index 53db5a65b6f..69599f03538 100644 --- a/docs/docs/02-apps/02-interchain-accounts/05-messages.md +++ b/docs/docs/02-apps/02-interchain-accounts/05-messages.md @@ -23,7 +23,7 @@ type MsgRegisterInterchainAccount struct { This message is expected to fail if: -- `Owner` is an empty string. +- `Owner` is an empty string or contains more than 2048 bytes. - `ConnectionID` 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)). This message will construct a new `MsgChannelOpenInit` on chain and route it to the core IBC message server to initiate the opening step of the channel handshake. @@ -55,7 +55,7 @@ type MsgSendTx struct { This message is expected to fail if: -- `Owner` is an empty string. +- `Owner` is an empty string or contains more than 2048 bytes. - `ConnectionID` 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)). - `PacketData` contains an `UNSPECIFIED` type enum, the length of `Data` bytes is zero or the `Memo` field exceeds 256 characters in length. - `RelativeTimeout` is zero. diff --git a/docs/docs/04-middleware/01-ics29-fee/04-fee-distribution.md b/docs/docs/04-middleware/01-ics29-fee/04-fee-distribution.md index d66c067bdac..a2f4c286276 100644 --- a/docs/docs/04-middleware/01-ics29-fee/04-fee-distribution.md +++ b/docs/docs/04-middleware/01-ics29-fee/04-fee-distribution.md @@ -60,7 +60,7 @@ type MsgRegisterCounterpartyPayee struct { > - `PortId` 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). > - `ChannelId` 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)). > - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/beginner/03-accounts.md#addresses)). -> - `CounterpartyPayee` is empty. +> - `CounterpartyPayee` is empty or contains more than 2048 bytes. See below for an example CLI command: diff --git a/docs/versioned_docs/version-v7.6.x/02-apps/01-transfer/04-messages.md b/docs/versioned_docs/version-v7.6.x/02-apps/01-transfer/04-messages.md index 483384a09fe..202596ed70f 100644 --- a/docs/versioned_docs/version-v7.6.x/02-apps/01-transfer/04-messages.md +++ b/docs/versioned_docs/version-v7.6.x/02-apps/01-transfer/04-messages.md @@ -32,7 +32,8 @@ This message is expected to fail if: - `Token.Amount` is not positive. - `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](/architecture/adr-001-coin-source-tracing). - `Sender` is empty. -- `Receiver` is empty. +- `Receiver` is empty or contains more than 2048 bytes. +- `Memo` contains more than 32768 bytes. - `TimeoutHeight` and `TimeoutTimestamp` are both zero. 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`. diff --git a/docs/versioned_docs/version-v7.6.x/02-apps/02-interchain-accounts/05-messages.md b/docs/versioned_docs/version-v7.6.x/02-apps/02-interchain-accounts/05-messages.md index 4f812e357b4..a998a46d347 100644 --- a/docs/versioned_docs/version-v7.6.x/02-apps/02-interchain-accounts/05-messages.md +++ b/docs/versioned_docs/version-v7.6.x/02-apps/02-interchain-accounts/05-messages.md @@ -23,7 +23,7 @@ type MsgRegisterInterchainAccount struct { This message is expected to fail if: -- `Owner` is an empty string. +- `Owner` is an empty string or contains more than 2048 bytes. - `ConnectionID` 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)). This message will construct a new `MsgChannelOpenInit` on chain and route it to the core IBC message server to initiate the opening step of the channel handshake. @@ -55,7 +55,7 @@ type MsgSendTx struct { This message is expected to fail if: -- `Owner` is an empty string. +- `Owner` is an empty string or contains more than 2048 bytes. - `ConnectionID` 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)). - `PacketData` contains an `UNSPECIFIED` type enum, the length of `Data` bytes is zero or the `Memo` field exceeds 256 characters in length. - `RelativeTimeout` is zero. diff --git a/docs/versioned_docs/version-v7.6.x/04-middleware/01-ics29-fee/04-fee-distribution.md b/docs/versioned_docs/version-v7.6.x/04-middleware/01-ics29-fee/04-fee-distribution.md index 9cfd4f3e5a6..bfeda02e11d 100644 --- a/docs/versioned_docs/version-v7.6.x/04-middleware/01-ics29-fee/04-fee-distribution.md +++ b/docs/versioned_docs/version-v7.6.x/04-middleware/01-ics29-fee/04-fee-distribution.md @@ -57,7 +57,7 @@ type MsgRegisterCounterpartyPayee struct { > - `PortId` 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). > - `ChannelId` 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)). > - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/beginner/03-accounts.md#addresses)). -> - `CounterpartyPayee` is empty. +> - `CounterpartyPayee` is empty or contains more than 2048 bytes. See below for an example CLI command: diff --git a/docs/versioned_docs/version-v8.3.x/02-apps/02-interchain-accounts/05-messages.md b/docs/versioned_docs/version-v8.3.x/02-apps/02-interchain-accounts/05-messages.md index 53db5a65b6f..69599f03538 100644 --- a/docs/versioned_docs/version-v8.3.x/02-apps/02-interchain-accounts/05-messages.md +++ b/docs/versioned_docs/version-v8.3.x/02-apps/02-interchain-accounts/05-messages.md @@ -23,7 +23,7 @@ type MsgRegisterInterchainAccount struct { This message is expected to fail if: -- `Owner` is an empty string. +- `Owner` is an empty string or contains more than 2048 bytes. - `ConnectionID` 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)). This message will construct a new `MsgChannelOpenInit` on chain and route it to the core IBC message server to initiate the opening step of the channel handshake. @@ -55,7 +55,7 @@ type MsgSendTx struct { This message is expected to fail if: -- `Owner` is an empty string. +- `Owner` is an empty string or contains more than 2048 bytes. - `ConnectionID` 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)). - `PacketData` contains an `UNSPECIFIED` type enum, the length of `Data` bytes is zero or the `Memo` field exceeds 256 characters in length. - `RelativeTimeout` is zero. diff --git a/docs/versioned_docs/version-v8.3.x/04-middleware/01-ics29-fee/04-fee-distribution.md b/docs/versioned_docs/version-v8.3.x/04-middleware/01-ics29-fee/04-fee-distribution.md index d66c067bdac..a2f4c286276 100644 --- a/docs/versioned_docs/version-v8.3.x/04-middleware/01-ics29-fee/04-fee-distribution.md +++ b/docs/versioned_docs/version-v8.3.x/04-middleware/01-ics29-fee/04-fee-distribution.md @@ -60,7 +60,7 @@ type MsgRegisterCounterpartyPayee struct { > - `PortId` 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). > - `ChannelId` 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)). > - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/beginner/03-accounts.md#addresses)). -> - `CounterpartyPayee` is empty. +> - `CounterpartyPayee` is empty or contains more than 2048 bytes. See below for an example CLI command: