Skip to content

Commit 01097fc

Browse files
mergify[bot]tmsdkeys
authored andcommitted
update fee mw docs, add formating, fix typos, increase readability (cosmos#1665) (cosmos#1750)
* update fee mw docs, add formating, fix typos, increase readability * fix broken link * Apply suggestions from code review (De)capitalize headings and references to headings for consistency Co-authored-by: Carlos Rodriguez <[email protected]> * resolving merge conflict * split the CLI commands and small typo correction Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit aaccbd1) Co-authored-by: tmsdkeys <[email protected]>
1 parent 2bfb9d7 commit 01097fc

File tree

10 files changed

+148
-103
lines changed

10 files changed

+148
-103
lines changed

docs/.vuepress/config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@ module.exports = {
267267
directory: false,
268268
path: "/middleware/ics29-fee/integration.html",
269269
},
270-
{
271-
title: "End Users",
272-
directory: false,
273-
path: "/middleware/ics29-fee/end-users.html",
274-
},
275270
{
276271
title: "Fee Messages",
277272
directory: false,
@@ -287,6 +282,11 @@ module.exports = {
287282
directory: false,
288283
path: "/middleware/ics29-fee/events.html",
289284
},
285+
{
286+
title: "End Users",
287+
directory: false,
288+
path: "/middleware/ics29-fee/end-users.html",
289+
},
290290
],
291291
},
292292
],

docs/assets/fee-mw/feeflow.png

385 KB
Loading

docs/assets/fee-mw/msgpaypacket.png

147 KB
Loading
139 KB
Loading
154 KB
Loading

docs/middleware/ics29-fee/end-users.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Learn how to incentivize IBC packets using the ICS29 Fee Middleware module. {syn
88

99
## Pre-requisite readings
1010

11-
* [Fee Middleware](overview.md) {prereq}
11+
- [Fee Middleware](overview.md) {prereq}
1212

1313
## Summary
1414

@@ -17,7 +17,6 @@ Different types of end users:
1717
- CLI users who want to manually incentivize IBC packets
1818
- Client developers
1919

20-
2120
The Fee Middleware module allows end users to add a 'tip' to each IBC packet which will incentivize relayer operators to relay packets between chains. gRPC endpoints are exposed for client developers as well as a simple CLI for manually incentivizing IBC packets.
2221

2322
## CLI Users
@@ -26,6 +25,6 @@ For an in depth guide on how to use the ICS29 Fee Middleware module using the CL
2625

2726
## Client developers
2827

29-
Client developers can read more about the relevant ICS29 message types in the [Escrowing and paying out fees section](../ics29-fee/msgs.md).
28+
Client developers can read more about the relevant ICS29 message types in the [Fee messages section](../ics29-fee/msgs.md).
3029

3130
[CosmJS](https://github.com/cosmos/cosmjs) is a useful client library for signing and broadcasting Cosmos SDK messages.

docs/middleware/ics29-fee/events.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ order: 5
44

55
# Events
66

7+
An overview of all events related to ICS-29 {synopsis}
8+
79
## `MsgPayPacketFee`, `MsgPayPacketFeeAsync`
810

911
| Type | Attribute Key | Attribute Value |
10-
|-------------------------|-----------------|-----------------|
12+
| ----------------------- | --------------- | --------------- |
1113
| incentivized_ibc_packet | port_id | {portID} |
1214
| incentivized_ibc_packet | channel_id | {channelID} |
1315
| incentivized_ibc_packet | packet_sequence | {sequence} |
@@ -19,16 +21,16 @@ order: 5
1921
## `RegisterPayee`
2022

2123
| Type | Attribute Key | Attribute Value |
22-
|----------------|------------|--------------------|
23-
| register_payee | relayer | {relayer} |
24-
| register_payee | payee | {payee} |
25-
| register_payee | channel_id | {channelID} |
26-
| message | module | fee-ibc |
24+
| -------------- | ------------- | --------------- |
25+
| register_payee | relayer | {relayer} |
26+
| register_payee | payee | {payee} |
27+
| register_payee | channel_id | {channelID} |
28+
| message | module | fee-ibc |
2729

2830
## `RegisterCounterpartyPayee`
2931

3032
| Type | Attribute Key | Attribute Value |
31-
|-----------------------------|--------------------|---------------------|
33+
| --------------------------- | ------------------ | ------------------- |
3234
| register_counterparty_payee | relayer | {relayer} |
3335
| register_counterparty_payee | counterparty_payee | {counterpartyPayee} |
3436
| register_counterparty_payee | channel_id | {channelID} |

docs/middleware/ics29-fee/fee-distribution.md

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,30 @@ Learn about payee registration for the distribution of packet fees. The followin
88

99
## Pre-requisite readings
1010

11-
* [Fee Middleware](overview.md) {prereq}
11+
- [Fee Middleware](overview.md) {prereq}
1212

1313
Packet fees are divided into 3 distinct amounts in order to compensate relayer operators for packet relaying on fee enabled IBC channels.
1414

1515
- `RecvFee`: The sum of all packet receive fees distributed to a payee for successful execution of `MsgRecvPacket`.
1616
- `AckFee`: The sum of all packet acknowledgement fees distributed to a payee for successful execution of `MsgAcknowledgement`.
1717
- `TimeoutFee`: The sum of all packet timeout fees distributed to a payee for successful execution of `MsgTimeout`.
1818

19-
## Register a payee address for forward relaying
19+
## Register a counterparty payee address for forward relaying
20+
21+
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.
22+
Fee distribution for incentivized packet relays takes place on the packet source chain.
23+
24+
> 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.
2025
21-
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.
22-
Fee distribution for incentivized packet relays takes place on the packet source chain.
23-
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.
2426
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.
25-
If a counterparty payee is not registered for the forward relayer on the destination chain, the escrowed fees will be refunded upon fee distribution.
27+
**If a counterparty payee is not registered for the forward relayer on the destination chain, the escrowed fees will be refunded upon fee distribution.**
28+
29+
### Relayer operator actions?
2630

27-
A transaction must be submitted to the destination chain including a `CounterpartyPayee` address of an account on the source chain.
31+
A transaction must be submitted **to the destination chain** including a `CounterpartyPayee` address of an account on the source chain.
2832
The transaction must be signed by the `Relayer`.
2933

30-
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.
34+
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.
3135

3236
```go
3337
type MsgRegisterCounterpartyPayee struct {
@@ -42,27 +46,34 @@ type MsgRegisterCounterpartyPayee struct {
4246
}
4347
```
4448

45-
This message is expected to fail if:
46-
47-
- `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).
48-
- `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)).
49-
- `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)).
50-
- `CounterpartyPayee` is empty.
49+
> This message is expected to fail if:
50+
>
51+
> - `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).
52+
> - `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)).
53+
> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)).
54+
> - `CounterpartyPayee` is empty.
5155
5256
See below for an example CLI command:
5357

54-
```
55-
simd tx ibc-fee register-counterparty-payee transfer channel-0 cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 --from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh
58+
```bash
59+
simd tx ibc-fee register-counterparty-payee transfer channel-0 \
60+
cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh \
61+
osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 \
62+
--from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh
5663
```
5764

58-
## Register a payee address for reverse and timeout relaying
65+
## Register an alternative payee address for reverse and timeout relaying
5966

60-
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.
67+
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.
6168
Similarly the timeout relayer describes the actor who performs the submission of `MsgTimeout` (or `MsgTimeoutOnClose`) on the source chain.
62-
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.
69+
70+
> 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.
71+
6372
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`.
6473

65-
A transaction must be submitted to the source chain including a `Payee` address of an account on the source chain.
74+
### Relayer operator actions
75+
76+
A transaction must be submitted **to the source chain** including a `Payee` address of an account on the source chain.
6677
The transaction must be signed by the `Relayer`.
6778

6879
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,15 +91,18 @@ type MsgRegisterPayee struct {
8091
}
8192
```
8293

83-
This message is expected to fail if:
84-
85-
- `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).
86-
- `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)).
87-
- `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)).
88-
- `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)).
94+
> This message is expected to fail if:
95+
>
96+
> - `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).
97+
> - `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)).
98+
> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)).
99+
> - `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)).
89100
90101
See below for an example CLI command:
91102

92-
```
93-
simd tx ibc-fee register-payee transfer channel-0 cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5 --from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh
103+
```bash
104+
simd tx ibc-fee register-payee transfer channel-0 \
105+
cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh \
106+
cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5 \
107+
--from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh
94108
```

0 commit comments

Comments
 (0)