Skip to content
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

Guide refactoring and new tutorials #2579

Merged
merged 63 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
505334e
Modified the file structure + SUMMARY.md + Intro
Aug 19, 2022
e721f4c
rename grafana template + move feature matrix
Aug 19, 2022
8eb821c
populating section troubleshooting
Aug 19, 2022
ce6de6d
rename quick_start to quick-start, add manifest-path to alias, new su…
Aug 22, 2022
6f32439
more renaming
Aug 22, 2022
7674f84
draft description for every section page
Aug 22, 2022
f6747ea
fix typo
Aug 22, 2022
3eee817
more reorganization
Aug 22, 2022
1454caf
fix issues
Aug 22, 2022
184515d
add new commands
Aug 22, 2022
26e2d47
wrap up the first tutorial
Aug 23, 2022
2938dc4
topology defined
Aug 23, 2022
d89f624
progress on the more-chain tutorial
Aug 23, 2022
4fc520a
chart update
Aug 23, 2022
2be1496
progress on the second tutorial
Aug 24, 2022
10b90ea
more progress on tutorial 2
Aug 24, 2022
14672d7
finished 2nd tutorial (might need debugging)
Aug 24, 2022
1cd032c
fix packet filters
Aug 25, 2022
43fcd75
whatever blocs me from switching branches
Aug 25, 2022
0818308
add docker image, prometheus config and grafana template updated
Aug 25, 2022
58e6c3a
tools description
Aug 25, 2022
91e1372
fix grafana template
Aug 25, 2022
0914dd3
progress + fixed typos
Aug 26, 2022
4c3c3c8
almost done
Aug 26, 2022
7a3095b
more progress
Aug 26, 2022
10eeb83
more progress
Aug 26, 2022
03433ba
end of the production tutorial
Aug 26, 2022
0cae66b
correct many typos
Aug 29, 2022
9a7433d
more fixed typos + additional pages
Aug 29, 2022
08cbe98
fixed tutorial
Aug 29, 2022
5376d15
fix current version
Aug 29, 2022
2a02ec6
removal of identifiers section
Aug 29, 2022
4b9c1b6
fix typo
Aug 29, 2022
ce0691c
add next steps to most pages + ## Sections to supersections
Aug 29, 2022
3977ae4
finished concurrent tutorial
Aug 29, 2022
45a9edf
new note
Aug 29, 2022
ebcdde3
finished intro page
Aug 30, 2022
0cc0f50
small improvements + removal of help session in the commit before thi…
Aug 30, 2022
27435f1
fix grafana instructions + update grafana template
Aug 30, 2022
a2f7cf3
more typos fixed
Aug 30, 2022
ae7f14f
fix broken links
Aug 30, 2022
14c764c
tons of broken links fixed
Aug 30, 2022
fa880ef
even more broken links
Aug 30, 2022
e44112c
every broken link
Aug 30, 2022
3568ced
fix a lot of typos
Aug 30, 2022
469d986
fix more things
Aug 30, 2022
d63cad1
doc update
Aug 30, 2022
b5e1203
merge conflict
Aug 30, 2022
bc2398e
Fix link that didn't render in README
seanchen1991 Aug 30, 2022
f28bdf9
Proofread pass over tutorials
seanchen1991 Aug 30, 2022
18357b9
mdbook-template exampleé
Aug 31, 2022
9d47fa7
version with mdbook-template
Aug 31, 2022
09e0f90
templates up to 3.2.1
Aug 31, 2022
4cf773a
modify create channel new client command
Aug 31, 2022
daeb911
fix broken link
Aug 31, 2022
ab1ba7c
Suggested review
AlianBenabdallah Aug 31, 2022
82b62a5
first tutorial using mdbook
Aug 31, 2022
b00705c
Merge branch 'ali/refactor_guide' of github.com:informalsystems/ibc-r…
Aug 31, 2022
e3d6a6c
templates up to 3.3.2
Aug 31, 2022
30dd7b8
templates up to 3.3.4
Aug 31, 2022
05c8a56
every tutorial with templates
Aug 31, 2022
cb971c7
hardcode versions in dockerfile
Aug 31, 2022
e7be4ad
github action for mdbook-template
Aug 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chart update
  • Loading branch information
ali committed Aug 23, 2022
commit 4fc520adc5f271092198336c2d61073389fa35ec
2 changes: 1 addition & 1 deletion guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- [Start relaying](./tutorials/local-chains/start-relaying.md)
- [More Local Chains](./tutorials/more-chains/index.md)
- [Start the local chains](./tutorials/more-chains/start-local-chains.md)
- [Relay packets on multiple paths](./tutorials/more-chains/multiple-paths.md)
- [Build the topology](./tutorials/more-chains/build-the-topology.md)
- [Relaying in production](./tutorials/production/index.md)
- [Run multiple instances](./tutorials/concurrent/index.md)

Expand Down
129 changes: 129 additions & 0 deletions guide/src/tutorials/more-chains/build-the-topology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Build the topology

At this point of the tutorial, you should have four chains running and hermes correctly configured. You can perform a `health-check` with the command :

```shell
hermes health-check
```

If the command runs successfully you should see a message similar to the one below in the terminal:
```
2022-08-23T15:54:58.150005Z INFO ThreadId(01) using default configuration from '$HOME/.hermes/config.toml'
2022-08-23T15:54:58.150179Z INFO ThreadId(01) [ibc-0] performing health check...
2022-08-23T15:54:58.163298Z INFO ThreadId(01) chain is healthy chain=ibc-0
2022-08-23T15:54:58.163323Z INFO ThreadId(01) [ibc-1] performing health check...
2022-08-23T15:54:58.169132Z INFO ThreadId(01) chain is healthy chain=ibc-1
2022-08-23T15:54:58.169154Z INFO ThreadId(01) [ibc-2] performing health check...
2022-08-23T15:54:58.178418Z INFO ThreadId(01) chain is healthy chain=ibc-2
2022-08-23T15:54:58.178445Z INFO ThreadId(01) [ibc-3] performing health check...
2022-08-23T15:54:58.184615Z INFO ThreadId(01) chain is healthy chain=ibc-3
SUCCESS performed health check for all chains in the config
```

## Connect all the chains

Execute the following command :
```shell
gm hermes cc
```

If this command runs succesfully, it should output the following :

```shell
"$HOME/ibc-rs/target/release/hermes" create channel --a-chain ibc-0 --b-chain ibc-1 --a-port transfer --b-port transfer --new-client-connection --yes
"$HOME/ibc-rs/target/release/hermes" create channel --a-chain ibc-0 --b-chain ibc-2 --a-port transfer --b-port transfer --new-client-connection --yes
"$HOME/ibc-rs/target/release/hermes" create channel --a-chain ibc-0 --b-chain ibc-3 --a-port transfer --b-port transfer --new-client-connection --yes
"$HOME/ibc-rs/target/release/hermes" create channel --a-chain ibc-1 --b-chain ibc-2 --a-port transfer --b-port transfer --new-client-connection --yes
"$HOME/ibc-rs/target/release/hermes" create channel --a-chain ibc-1 --b-chain ibc-3 --a-port transfer --b-port transfer --new-client-connection --yes
"$HOME/ibc-rs/target/release/hermes" create channel --a-chain ibc-2 --b-chain ibc-3 --a-port transfer --b-port transfer --new-client-connection --yes
```

Executing these commands will :
* For every pair of chain, create a client on both chain tracking the state of the counterparty chain.
* Create a connection between these two clients.
* Create a `transfer` channel over this connection.

Use the flag `--exec` flag to execute these commands:

```shell
gm hermes cc --exec
```

At this point, your network should be fully connected. However, we want to relay on a specific topology presented at the beginning of [Start the local chains](./start-local-chains.md). The following chart displays the current state of the network. The channels that we want to filter out are filled in red while the channels we want to relay on are filled in green :


```mermaid
flowchart TD
ibc0((ibc-0))
ibc0ibc1[[channel-0]]
ibc0ibc2[[channel-1]]
ibc0ibc3[[channel-2]]

ibc1((ibc-1))
ibc1ibc0[[channel-0]]
ibc1ibc2[[channel-1]]
ibc1ibc3[[channel-2]]

ibc2((ibc-2))
ibc2ibc0[[channel-0]]
ibc2ibc1[[channel-1]]
ibc2ibc3[[channel-2]]

ibc3((ibc-3))
ibc3ibc0[[channel-0]]
ibc3ibc1[[channel-1]]
ibc3ibc2[[channel-2]]

classDef deny fill:#AA0000,color:#000000;
classDef allow fill:#00AA00,color:#000000;
class ibc0ibc1 allow;
class ibc1ibc0 allow;
class ibc0ibc3 allow;
class ibc3ibc0 allow;
class ibc2ibc1 allow;
class ibc1ibc2 allow;
class ibc2ibc3 allow;
class ibc3ibc2 allow;


class ibc1ibc3 deny;
class ibc3ibc1 deny;
class ibc0ibc2 deny;
class ibc2ibc0 deny;

ibc0---ibc0ibc1---ibc1ibc0---ibc1
ibc0---ibc0ibc2---ibc2ibc0---ibc2
ibc0---ibc0ibc3---ibc3ibc0---ibc3
ibc1---ibc1ibc2---ibc2ibc1---ibc2
ibc1---ibc1ibc3---ibc3ibc1---ibc3
ibc2---ibc2ibc3---ibc3ibc2---ibc3
```

You can verify that everything is correct with the commands:

```shell
hermes query channels --chain ibc-0 --show-counterparty
hermes query channels --chain ibc-1 --show-counterparty
hermes query channels --chain ibc-2 --show-counterparty
hermes query channels --chain ibc-3 --show-counterparty
```

Which should normally output:

```
ibc-0: transfer/channel-0 --- ibc-1: transfer/channel-0
ibc-0: transfer/channel-1 --- ibc-2: transfer/channel-0
ibc-0: transfer/channel-2 --- ibc-3: transfer/channel-0

ibc-1: transfer/channel-0 --- ibc-0: transfer/channel-0
ibc-1: transfer/channel-1 --- ibc-2: transfer/channel-1
ibc-1: transfer/channel-2 --- ibc-3: transfer/channel-1

ibc-2: transfer/channel-0 --- ibc-0: transfer/channel-1
ibc-2: transfer/channel-1 --- ibc-1: transfer/channel-1
ibc-2: transfer/channel-2 --- ibc-3: transfer/channel-2

ibc-3: transfer/channel-0 --- ibc-0: transfer/channel-2
ibc-3: transfer/channel-1 --- ibc-1: transfer/channel-2
ibc-3: transfer/channel-2 --- ibc-2: transfer/channel-2
```
22 changes: 3 additions & 19 deletions guide/src/tutorials/more-chains/index.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
# Even more local chains

In this tutorial we will show how you can test the relayer against five chains using Gaiad manager `gm` with an arbitrary topology of IBC channels.
In this tutorial we will show how you can test the relayer against four chains using Gaiad manager `gm` with an arbitrary topology of IBC channels.

Using `gm` we will start five [`gaia`](https://github.com/cosmos/gaia) chains that support the `IBC` protocol.
Using `gm` we will start four [`gaia`](https://github.com/cosmos/gaia) chains that support the `IBC` protocol.

Make sure that you followed the steps in the [Pre-requisites for local chains](../pre-requisites/index.md) section.


```mermaid
flowchart LR
ibc0((ibc-0))
ibc1((ibc-1))
ibc2((ibc-2))
ibc3((ibc-3))

ibc0---ibc1
ibc0---ibc3
ibc1---ibc3
ibc2---ibc3
ibc2---ibc1

```
Make sure that you followed the steps in the [Pre-requisites for local chains](../pre-requisites/index.md) section before moving to the [next section](./start-local-chains.md).
16 changes: 15 additions & 1 deletion guide/src/tutorials/more-chains/start-local-chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

In this chapter, you will learn how to spawn four Gaia chains, connect them in an arbitrary topology and use Hermes to transfer tokens between them.

```mermaid
flowchart LR
ibc0((ibc-0))
ibc1((ibc-1))
ibc2((ibc-2))
ibc3((ibc-3))

ibc0---ibc1
ibc1---ibc2
ibc2---ibc3
ibc0---ibc3

```

As for the [Local chains tutorial](../local-chains/index.md), we will make use of Gaiad Manager `gm` that we installed in [Install Gaiad Manager](../pre-requisites/gaiad-manager.md).

### Reset your configuration
Expand Down Expand Up @@ -390,4 +404,4 @@ $HOME/.hermes/

#### Next Steps

[The next section](./topology.md) describes how to create an arbitrary topology between these chains before relaying packets.
[The next section](./build-the-topology.md) describes how to create an arbitrary topology between these chains before relaying packets.
Empty file.