-
Notifications
You must be signed in to change notification settings - Fork 716
update fee mw docs, add formating, fix typos, increase readability #1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
4598e1b
578fd6b
4cae4d6
c72eae4
9397570
afb18b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,30 @@ Learn about payee registration for the distribution of packet fees. The followin | |
|
||
## Pre-requisite readings | ||
|
||
* [Fee Middleware](overview.md) {prereq} | ||
- [Fee Middleware](overview.md) {prereq} | ||
|
||
Packet fees are divided into 3 distinct amounts in order to compensate relayer operators for packet relaying on fee enabled IBC channels. | ||
|
||
- `RecvFee`: The sum of all packet receive fees distributed to a payee for successful execution of `MsgRecvPacket`. | ||
- `AckFee`: The sum of all packet acknowledgement fees distributed to a payee for successful execution of `MsgAcknowledgement`. | ||
- `TimeoutFee`: The sum of all packet timeout fees distributed to a payee for successful execution of `MsgTimeout`. | ||
|
||
## Register a payee address for forward relaying | ||
## Register a counterparty payee address for forward relaying | ||
|
||
As mentioned in [ICS29 Concepts](../ics29-fee/overview.md#concepts), the forward relayer describes the actor who performs the submission of `MsgRecvPacket` on the destination chain. | ||
Fee distribution for incentivized packet relays takes place on the packet source chain. | ||
|
||
> Relayer operators are expected to register a counterparty payee address, in order to be compensated accordingly with `RecvFee`s upon completion of a packet lifecycle. | ||
|
||
As mentioned in [ICS29 Concepts](../ics29-fee/overview.md#concepts), the forward relayer describes the actor who performs the submission of `MsgRecvPacket` on the destination chain. | ||
Fee distribution for incentivized packet relays takes place on the packet source chain. | ||
Relayer operators are expected to register a counterparty payee address, in order to be compensated accordingly with `RecvFee`s upon completion of a packet lifecycle. | ||
The counterparty payee address registered on the destination chain is encoded into the packet acknowledgement and communicated as such to the source chain for fee distribution. | ||
If a counterparty payee is not registered for the forward relayer on the destination chain, the escrowed fees will be refunded upon fee distribution. | ||
**If a counterparty payee is not registered for the forward relayer on the destination chain, the escrowed fees will be refunded upon fee distribution.** | ||
|
||
A transaction must be submitted to the destination chain including a `CounterpartyPayee` address of an account on the source chain. | ||
### Relayer Operator Actions? | ||
tmsdkeys marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
A transaction must be submitted **to the destination chain** including a `CounterpartyPayee` address of an account on the source chain. | ||
The transaction must be signed by the `Relayer`. | ||
|
||
Note: If a module account address is used as the `CounterpartyPayee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module. | ||
Note: If a module account address is used as the `CounterpartyPayee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module. | ||
|
||
```go | ||
type MsgRegisterCounterpartyPayee struct { | ||
|
@@ -42,27 +46,31 @@ type MsgRegisterCounterpartyPayee struct { | |
} | ||
``` | ||
|
||
This message is expected to fail if: | ||
|
||
- `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/basics/accounts.md#Addresses)). | ||
- `CounterpartyPayee` is empty. | ||
> This message is expected to fail if: | ||
> | ||
> - `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/basics/accounts.md#Addresses)). | ||
> - `CounterpartyPayee` is empty. | ||
|
||
See below for an example CLI command: | ||
|
||
``` | ||
simd tx ibc-fee register-counterparty-payee transfer channel-0 cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 --from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know that this is not part of your changes, but I just realized that this long line is not very easy to read in markdown. Would you mind to add this change and split it like this?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, will implement! |
||
``` | ||
|
||
## Register a payee address for reverse and timeout relaying | ||
## Register an alternate payee address for reverse and timeout relaying | ||
tmsdkeys marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
As mentioned in [ICS29 Concepts](../ics29-fee/overview.md#concepts), the reverse relayer describes the actor who performs the submission of `MsgAcknowledgement` on the source chain. | ||
As mentioned in [ICS29 Concepts](../ics29-fee/overview.md#concepts), the reverse relayer describes the actor who performs the submission of `MsgAcknowledgement` on the source chain. | ||
Similarly the timeout relayer describes the actor who performs the submission of `MsgTimeout` (or `MsgTimeoutOnClose`) on the source chain. | ||
Relayer operators may choose to register an optional payee address, in order to be compensated accordingly with `AckFee`s and `TimeoutFee`s upon completion of a packet life cycle. | ||
|
||
> Relayer operators **may choose** to register an optional payee address, in order to be compensated accordingly with `AckFee`s and `TimeoutFee`s upon completion of a packet life cycle. | ||
|
||
If a payee is not registered for the reverse or timeout relayer on the source chain, then fee distribution assumes the default behaviour, where fees are paid out to the relayer account which delivers `MsgAcknowledgement` or `MsgTimeout`/`MsgTimeoutOnClose`. | ||
|
||
A transaction must be submitted to the source chain including a `Payee` address of an account on the source chain. | ||
### Relayer Operator Actions? | ||
tmsdkeys marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
A transaction must be submitted **to the source chain** including a `Payee` address of an account on the source chain. | ||
The transaction must be signed by the `Relayer`. | ||
|
||
Note: If a module account address is used as the `Payee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module. | ||
|
@@ -80,12 +88,12 @@ type MsgRegisterPayee struct { | |
} | ||
``` | ||
|
||
This message is expected to fail if: | ||
|
||
- `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/basics/accounts.md#Addresses)). | ||
- `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)). | ||
> This message is expected to fail if: | ||
> | ||
> - `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/basics/accounts.md#Addresses)). | ||
> - `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)). | ||
|
||
See below for an example CLI command: | ||
tmsdkeys marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.