Skip to content

Commit 3a9b943

Browse files
crodriguezvegamergify[bot]
authored andcommitted
fix broken links (#2511)
Co-authored-by: Carlos Rodriguez <crodveg@gmail.com> (cherry picked from commit 4c45212) # Conflicts: # docs/ibc/apps/apps.md # docs/middleware/ics29-fee/fee-distribution.md # modules/apps/transfer/spec/06_metrics.md
1 parent ba2e054 commit 3a9b943

File tree

9 files changed

+169
-6
lines changed

9 files changed

+169
-6
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ write a little note why.
2020

2121
- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
2222
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
23-
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
23+
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/10-structure.md).
2424
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
2525
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
2626
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).

docs/DOCS_README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ We are using [Algolia](https://www.algolia.com) to power full-text search. This
9696
## Consistency
9797

9898
Because the build processes are identical (as is the information contained herein), this file should be kept in sync as
99-
much as possible with its [counterpart in the Cosmos SDK repo](https://github.com/cosmos/cosmos-sdk/tree/master/docs/DOCS_README.md).
99+
much as possible with its [counterpart in the Cosmos SDK repo](https://github.com/cosmos/cosmos-sdk/blob/main/docs/README.md).
100100

101101
### Update and Build the RPC docs
102102

docs/ibc/apps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,4 +462,4 @@ callbacks](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/ibc_
462462
463463
## Next {hide}
464464
465-
Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/intro.md) {hide}
465+
Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/01-intro.md) {hide}

docs/ibc/apps/apps.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
order: 1
3+
-->
4+
5+
# IBC Applications
6+
7+
Learn how to build custom IBC application modules that enable packets to be sent to and received from other IBC-enabled chains. {synopsis}
8+
9+
This document serves as a guide for developers who want to write their own Inter-blockchain Communication Protocol (IBC) applications for custom use cases.
10+
11+
Due to the modular design of the IBC protocol, IBC application developers do not need to concern themselves with the low-level details of clients, connections, and proof verification. Nevertheless, an overview of these low-level concepts can be found in [the Overview section](../overview.md).
12+
The document goes into detail on the abstraction layer most relevant for application developers (channels and ports), and describes how to define your own custom packets, `IBCModule` callbacks and more to make an application module IBC ready.
13+
14+
**To have your module interact over IBC you must:**
15+
16+
- implement the `IBCModule` interface, i.e.:
17+
- channel (opening) handshake callbacks
18+
- channel closing handshake callbacks
19+
- packet callbacks
20+
- bind to a port(s)
21+
- add keeper methods
22+
- define your own packet data and acknowledgement structs as well as how to encode/decode them
23+
- add a route to the IBC router
24+
25+
The following sections provide a more detailed explanation of how to write an IBC application
26+
module correctly corresponding to the listed steps.
27+
28+
## Pre-requisites Readings
29+
30+
- [IBC Overview](../overview.md)) {prereq}
31+
- [IBC default integration](../integration.md) {prereq}
32+
33+
## Working example
34+
35+
For a real working example of an IBC application, you can look through the `ibc-transfer` module
36+
which implements everything discussed in this section.
37+
38+
Here are the useful parts of the module to look at:
39+
40+
[Binding to transfer
41+
port](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/genesis.go)
42+
43+
[Sending transfer
44+
packets](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/relay.go)
45+
46+
[Implementing IBC
47+
callbacks](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/ibc_module.go)
48+
49+
## Next {hide}
50+
51+
Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/01-intro.md) {hide}

docs/ibc/integration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func NewApp(...args) *App {
139139
140140
### Module Managers
141141
142-
In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/simulator.md).
142+
In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/13-simulator.md).
143143
144144
```go
145145
// app.go

docs/ibc/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ must use for committing IBC messages is defined in
6161
[ICS-24](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements) and the proof
6262
format that all implementations must be able to produce and verify is defined in this [ICS-23 implementation](https://github.com/confio/ics23).
6363

64-
### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/ocap.md)
64+
### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/core/10-ocap.md)
6565

6666
IBC is intended to work in execution environements where modules do not necessarily trust each
6767
other. Thus IBC must authenticate module actions on ports and channels so that only modules with the

docs/ibc/relayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ order: 4
77
## Pre-requisites Readings
88

99
- [IBC Overview](./overview.md) {prereq}
10-
- [Events](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/events.md) {prereq}
10+
- [Events](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/core/08-events.md) {prereq}
1111

1212
## Events
1313

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<!--
2+
order: 4
3+
-->
4+
5+
# Fee distribution
6+
7+
Learn about payee registration for the distribution of packet fees. The following document is intended for relayer operators. {synopsis}
8+
9+
## Pre-requisite readings
10+
11+
- [Fee Middleware](overview.md) {prereq}
12+
13+
Packet fees are divided into 3 distinct amounts in order to compensate relayer operators for packet relaying on fee enabled IBC channels.
14+
15+
- `RecvFee`: The sum of all packet receive fees distributed to a payee for successful execution of `MsgRecvPacket`.
16+
- `AckFee`: The sum of all packet acknowledgement fees distributed to a payee for successful execution of `MsgAcknowledgement`.
17+
- `TimeoutFee`: The sum of all packet timeout fees distributed to a payee for successful execution of `MsgTimeout`.
18+
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.
25+
26+
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.
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?
30+
31+
A transaction must be submitted **to the destination chain** including a `CounterpartyPayee` address of an account on the source chain.
32+
The transaction must be signed by the `Relayer`.
33+
34+
Note: If a module account address is used as the `CounterpartyPayee` but the module has been set as a blocked address in the `BankKeeper`, the refunding to the module account will fail. This is because many modules use invariants to compare internal tracking of module account balances against the actual balance of the account stored in the `BankKeeper`. If a token transfer to the module account occurs without going through this module and updating the account balance of the module on the `BankKeeper`, then invariants may break and unknown behaviour could occur depending on the module implementation. Therefore, if it is desirable to use a module account that is currently blocked, the module developers should be consulted to gauge to possibility of removing the module account from the blocked list.
35+
36+
```go
37+
type MsgRegisterCounterpartyPayee struct {
38+
// unique port identifier
39+
PortId string
40+
// unique channel identifier
41+
ChannelId string
42+
// the relayer address
43+
Relayer string
44+
// the counterparty payee address
45+
CounterpartyPayee string
46+
}
47+
```
48+
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/docs/basics/03-accounts.md#addresses)).
54+
> - `CounterpartyPayee` is empty.
55+
56+
See below for an example CLI command:
57+
58+
```bash
59+
simd tx ibc-fee register-counterparty-payee transfer channel-0 \
60+
cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh \
61+
osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 \
62+
--from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh
63+
```
64+
65+
## Register an alternative payee address for reverse and timeout relaying
66+
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.
68+
Similarly the timeout relayer describes the actor who performs the submission of `MsgTimeout` (or `MsgTimeoutOnClose`) on the source chain.
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+
72+
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`.
73+
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.
77+
The transaction must be signed by the `Relayer`.
78+
79+
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+
81+
```go
82+
type MsgRegisterPayee struct {
83+
// unique port identifier
84+
PortId string
85+
// unique channel identifier
86+
ChannelId string
87+
// the relayer address
88+
Relayer string
89+
// the payee address
90+
Payee string
91+
}
92+
```
93+
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/docs/basics/03-accounts.md#addresses)).
99+
> - `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/basics/03-accounts.md#addresses)).
100+
101+
See below for an example CLI command:
102+
103+
```bash
104+
simd tx ibc-fee register-payee transfer channel-0 \
105+
cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh \
106+
cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5 \
107+
--from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh
108+
```

modules/apps/transfer/spec/06_metrics.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ order: 6
44

55
# Metrics
66

7+
<<<<<<< HEAD:modules/apps/transfer/spec/06_metrics.md
78
The transfer IBC application module exposes the following set of [metrics](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/telemetry.md).
9+
=======
10+
The IBC transfer application module exposes the following set of [metrics](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/core/09-telemetry.md).
11+
>>>>>>> 4c45212 (fix broken links (#2511)):docs/apps/transfer/metrics.md
812
913
| Metric | Description | Unit | Type |
1014
|:--------------------------------|:------------------------------------------------------------------------------------------|:----------------|:--------|

0 commit comments

Comments
 (0)