Skip to content

Commit

Permalink
docs: fix the warning syntax error across docs (#6351)
Browse files Browse the repository at this point in the history
* fix the warning syntax error across docs.

* fix rendering of tip admonition

---------

Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
  • Loading branch information
3 people authored May 22, 2024
1 parent 6993618 commit 23f6751
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/docs/01-ibc/03-apps/01-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ sequence, err := IBCChannelKeeper.SendPacket(
)
```

::: warning
:::warning
In order to prevent modules from sending packets on channels they do not own, IBC expects
modules to pass in the correct channel capability for the packet's source channel.
:::
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-ibc/06-channel-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ As part of the handling of the `MsgChannelUpgradeInit` message, the application'

After this message is handled successfully, the channel's upgrade sequence will be incremented. This upgrade sequence will serve as a nonce for the upgrade process to provide replay protection.

::: warning
:::warning
Initiating an upgrade in the same block as opening a channel may potentially prevent the counterparty channel from also opening.
:::

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/02-apps/01-transfer/07-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To prevent a single token from being transferred from the chain, set the `SendEn
- For Cosmos SDK v0.46.x or earlier, set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`.
- For Cosmos SDK versions above v0.46.x, set the bank module's `SendEnabled` entry for the denomination to `false` using `MsgSetSendEnabled` as a governance proposal.

::: warning
:::warning
Doing so will prevent the token from being transferred between any accounts in the blockchain.
:::

Expand All @@ -39,7 +39,7 @@ To prevent a single token from being transferred to the chain, set the `ReceiveE
- For Cosmos SDK v0.46.x or earlier, set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`.
- For Cosmos SDK versions above v0.46.x, set the bank module's `SendEnabled` entry for the denomination to `false` using `MsgSetSendEnabled` as a governance proposal.

::: warning
:::warning
Doing so will prevent the token from being transferred between any accounts in the blockchain.
:::

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/04-middleware/02-callbacks/02-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ app.TransferKeeper.WithICS4Wrapper(transferICS4Wrapper)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
```

::: warning
:::warning
The usage of `WithICS4Wrapper` after `transferStack`'s configuration is critical! It allows the callbacks middleware to do `SendPacket` callbacks and asynchronous `ReceivePacket` callbacks. You must do this regardless of whether you are using the `29-fee` middleware or not.
:::

Expand Down Expand Up @@ -108,6 +108,6 @@ AddRoute(icacontrollertypes.SubModuleName, icaControllerStack).
AddRoute(icahosttypes.SubModuleName, icaHostStack).
```

::: warning
:::warning
The usage of `WithICS4Wrapper` here is also critical!
:::
8 changes: 4 additions & 4 deletions docs/docs/04-middleware/02-callbacks/05-end-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ This section explains how to use the callbacks middleware from the perspective o

For a given channel, the source callbacks are supported if the source chain has the callbacks middleware wired up in the channel's IBC stack. Similarly, the destination callbacks are supported if the destination chain has the callbacks middleware wired up in the channel's IBC stack.

::: tip
:::tip
Callbacks are always executed after the packet has been processed by the underlying IBC module.
:::

::: warning
:::warning
If the underlying application module is doing an asynchronous acknowledgement on packet receive (for example, if the [packet forward middleware](https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware) is in the stack, and is being used by this packet), then the callbacks middleware will execute the `ReceivePacket` callback after the acknowledgement has been received.
:::

Expand Down Expand Up @@ -85,12 +85,12 @@ User defined gas limit was added for the following reasons:
- To prevent callbacks from blocking packet lifecycle.
- To prevent relayers from being able to DOS the callback execution by sending a packet with a low amount of gas.

::: tip
:::tip
There is a chain wide parameter that sets the maximum gas limit that a user can set for a callback. This is to prevent a user from setting a gas limit that is too high for relayers. If the `"gas_limit"` is not set in the packet memo, then the maximum gas limit is used.
:::

These goals are achieved by creating a minimum gas amount required for callback execution. If the relayer provides at least the minimum gas limit for the callback execution, then the packet lifecycle will not be blocked if the callback runs out of gas during execution, and the callback cannot be retried. If the relayer does not provided the minimum amount of gas and the callback executions runs out of gas, the entire tx is reverted and it may be executed again.

::: tip
:::tip
`SendPacket` callback is always reverted if the callback execution fails or returns an error for any reason. This is so that the packet is not sent if the callback execution fails.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ sequence, err := IBCChannelKeeper.SendPacket(
)
```

::: warning
:::warning
In order to prevent modules from sending packets on channels they do not own, IBC expects
modules to pass in the correct channel capability for the packet's source channel.
:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ app.TransferKeeper.WithICS4Wrapper(transferICS4Wrapper)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
```

::: warning
:::warning
The usage of `WithICS4Wrapper` after `transferStack`'s configuration is critical! It allows the callbacks middleware to do `SendPacket` callbacks and asynchronous `ReceivePacket` callbacks. You must do this regardless of whether you are using the `29-fee` middleware or not.
:::

Expand Down Expand Up @@ -103,6 +103,6 @@ AddRoute(icacontrollertypes.SubModuleName, icaControllerStack).
AddRoute(icahosttypes.SubModuleName, icaHostStack).
```

::: warning
:::warning
The usage of `WithICS4Wrapper` here is also critical!
:::
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ This section explains how to use the callbacks middleware from the perspective o

For a given channel, the source callbacks are supported if the source chain has the callbacks middleware wired up in the channel's IBC stack. Similarly, the destination callbacks are supported if the destination chain has the callbacks middleware wired up in the channel's IBC stack.

::: tip
:::tip
Callbacks are always executed after the packet has been processed by the underlying IBC module.
:::

::: warning
:::warning
If the underlying application module is doing an asynchronous acknowledgement on packet receive (for example, if the [packet forward middleware](https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware) is in the stack, and is being used by this packet), then the callbacks middleware will execute the `ReceivePacket` callback after the acknowledgement has been received.
:::

Expand Down Expand Up @@ -85,12 +85,12 @@ User defined gas limit was added for the following reasons:
- To prevent callbacks from blocking packet lifecycle.
- To prevent relayers from being able to DOS the callback execution by sending a packet with a low amount of gas.

::: tip
:::tip
There is a chain wide parameter that sets the maximum gas limit that a user can set for a callback. This is to prevent a user from setting a gas limit that is too high for relayers. If the `"gas_limit"` is not set in the packet memo, then the maximum gas limit is used.
:::

These goals are achieved by creating a minimum gas amount required for callback execution. If the relayer provides at least the minimum gas limit for the callback execution, then the packet lifecycle will not be blocked if the callback runs out of gas during execution, and the callback cannot be retried. If the relayer does not provided the minimum amount of gas and the callback executions runs out of gas, the entire tx is reverted and it may be executed again.

::: tip
:::tip
`SendPacket` callback is always reverted if the callback execution fails or returns an error for any reason. This is so that the packet is not sent if the callback execution fails.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ sequence, err := IBCChannelKeeper.SendPacket(
)
```

::: warning
:::warning
In order to prevent modules from sending packets on channels they do not own, IBC expects
modules to pass in the correct channel capability for the packet's source channel.
:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ As part of the handling of the `MsgChannelUpgradeInit` message, the application'

After this message is handled successfully, the channel's upgrade sequence will be incremented. This upgrade sequence will serve as a nonce for the upgrade process to provide replay protection.

::: warning
:::warning
Initiating an upgrade in the same block as opening a channel may potentially prevent the counterparty channel from also opening.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To prevent a single token from being transferred from the chain, set the `SendEn
- For Cosmos SDK v0.46.x or earlier, set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`.
- For Cosmos SDK versions above v0.46.x, set the bank module's `SendEnabled` entry for the denomination to `false` using `MsgSetSendEnabled` as a governance proposal.

::: warning
:::warning
Doing so will prevent the token from being transferred between any accounts in the blockchain.
:::

Expand All @@ -39,7 +39,7 @@ To prevent a single token from being transferred to the chain, set the `ReceiveE
- For Cosmos SDK v0.46.x or earlier, set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`.
- For Cosmos SDK versions above v0.46.x, set the bank module's `SendEnabled` entry for the denomination to `false` using `MsgSetSendEnabled` as a governance proposal.

::: warning
:::warning
Doing so will prevent the token from being transferred between any accounts in the blockchain.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ app.TransferKeeper.WithICS4Wrapper(transferICS4Wrapper)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
```

::: warning
:::warning
The usage of `WithICS4Wrapper` after `transferStack`'s configuration is critical! It allows the callbacks middleware to do `SendPacket` callbacks and asynchronous `ReceivePacket` callbacks. You must do this regardless of whether you are using the `29-fee` middleware or not.
:::

Expand Down Expand Up @@ -103,6 +103,6 @@ AddRoute(icacontrollertypes.SubModuleName, icaControllerStack).
AddRoute(icahosttypes.SubModuleName, icaHostStack).
```

::: warning
:::warning
The usage of `WithICS4Wrapper` here is also critical!
:::
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ This section explains how to use the callbacks middleware from the perspective o

For a given channel, the source callbacks are supported if the source chain has the callbacks middleware wired up in the channel's IBC stack. Similarly, the destination callbacks are supported if the destination chain has the callbacks middleware wired up in the channel's IBC stack.

::: tip
:::tip
Callbacks are always executed after the packet has been processed by the underlying IBC module.
:::

::: warning
:::warning
If the underlying application module is doing an asynchronous acknowledgement on packet receive (for example, if the [packet forward middleware](https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware) is in the stack, and is being used by this packet), then the callbacks middleware will execute the `ReceivePacket` callback after the acknowledgement has been received.
:::

Expand Down Expand Up @@ -85,12 +85,12 @@ User defined gas limit was added for the following reasons:
- To prevent callbacks from blocking packet lifecycle.
- To prevent relayers from being able to DOS the callback execution by sending a packet with a low amount of gas.

::: tip
:::tip
There is a chain wide parameter that sets the maximum gas limit that a user can set for a callback. This is to prevent a user from setting a gas limit that is too high for relayers. If the `"gas_limit"` is not set in the packet memo, then the maximum gas limit is used.
:::

These goals are achieved by creating a minimum gas amount required for callback execution. If the relayer provides at least the minimum gas limit for the callback execution, then the packet lifecycle will not be blocked if the callback runs out of gas during execution, and the callback cannot be retried. If the relayer does not provided the minimum amount of gas and the callback executions runs out of gas, the entire tx is reverted and it may be executed again.

::: tip
:::tip
`SendPacket` callback is always reverted if the callback execution fails or returns an error for any reason. This is so that the packet is not sent if the callback execution fails.
:::

0 comments on commit 23f6751

Please sign in to comment.