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
fix issues
  • Loading branch information
ali committed Aug 22, 2022
commit 1454caf0e444e16b35344e7bad6a54a0571b9c95
14 changes: 8 additions & 6 deletions guide/src/tutorials/local-chains/identifiers.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Identifiers

In order to connect two IBC-enabled chains, both chains need an on-chain client that keeps track of the other chain. These two clients can be connected by one or multiple connections. Then, channels need to be created, over a connection, to specify the destination module.

> __WARNING__: Do not create clients, connections or channels between two chains/modules before checking that they are not already created.

A chain allocates identifiers when it creates clients, connections and channels. These identifiers can subsequently be used to refer to existing clients, connections and channels.

> NOTE: If you want to ensure you get the same identifiers while following the tutorials, run the each of the three commands below __once__ on `ibc-1`. This will ensure that when going through the tutorial, a second channel on `ibc-1` with identifier `channel-1` will created.
> NOTE: If you want to ensure you get the same identifiers while following the tutorials, run the each of the three commands below __once__ on `ibc-1`. This will ensure that when going through the tutorial, a second channel on `ibc-1` with identifier `channel-1` will be created.

Chains allocate identifiers using a chain specific allocation scheme. Currently, *cosmos-sdk* implementation uses the follow identifiers:

Expand Down Expand Up @@ -37,8 +40,7 @@ Success: CreateClient(
),
)
```

We will create a second client on `ibc-1` with identifier `07-tendermint-1` in the client tutorial.
We created a client on chain `ibc-1` that keeps track of the state of `ibc-0`. We will create a second client on `ibc-1` with identifier `07-tendermint-1` in the client tutorial.

### 2. Connection Identifiers

Expand All @@ -47,7 +49,7 @@ __`connection-<n>`__ for connections
For example `connection-0` is assigned to the first connection created on `ibc-1`:

```shell
hermes tx conn-init --b-chain ibc-1 --a-chain ibc-0 --b-client 07-tendermint-0 --a-client 07-tendermint-0
hermes tx conn-init --dst-chain ibc-1 --src-chain ibc-0 --dst-client 07-tendermint-0 --src-client dummyclientname
```

```json
Expand All @@ -68,7 +70,7 @@ Success: OpenInitConnection(
),
counterparty_connection_id: None,
counterparty_client_id: ClientId(
"07-tendermint-0",
"dummyclientname",
),
},
),
Expand All @@ -83,7 +85,7 @@ We will create a second connection on `ibc-1` with identifier `connection-1` in
For example `channel-0` is assigned to the first channel created on `ibc-1`:

```shell
hermes tx chan-open-init --b-chain ibc-1 --a-chain ibc-0 --b-connection connection-0 --b-port transfer --a-port transfer
hermes tx chan-open-init --dst-chain ibc-1 --src-chain ibc-0 --dst-connection connection-0 --dst-port transfer --src-port transfer
```

```json
Expand Down
64 changes: 55 additions & 9 deletions guide/src/tutorials/local-chains/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,60 @@ trust_threshold = { numerator = '1', denominator = '3' }
To see the keys generated by `gm`, run the command below

```bash
gm key
gm keys
```

This will generate an output similar to the one below (albeit all on the same line):
```json
{
"name": "testkey",
"type": "local",
"address": "cosmos1tc3vcuxyyac0dmayf887t95tdg7qpyql48w7gj",
"pubkey": "cosmospub1addwnpepqgg7ng4ycm60pdxfzdfh4hjvkwcr3da59mr8k883vsstx60ruv7kur4525u",
"mnemonic": "[24 words mnemonic]"
}
```
"$HOME/go/bin/gaiad" keys list --keyring-backend test --keyring-dir "$HOME/.gm/ibc-0"

- name: validator
address: cosmos1a5545h09sdzwgjpraasgkvu0f585lc33k9h4kx
pubkey: cosmospub1addwnpepqw5j24lg0ya34umnrn7akxuks3as2ktggndxg37cnfsx2fl5xkl8ymte6c2
mnemonic: "confirm path season shiver adjust order quarter now empower crystal busy foam pony web chaos bachelor magnet imitate audit wear spike chunk garlic sport"

- name: wallet
address: cosmos14czpvfgzcr06astyylahshcexzwm0j9ne6h5p5
pubkey: cosmospub1addwnpepqdcmngqappsxp6jp53atfx6kt5p7d6vce4un3mfvsa8gtml5n8lj2yh29q9
mnemonic: "brass exhibit artist beef album canvas liar fine water wave bus rose sunny permit strategy eight stove legal sustain vessel offer great book loan"

- name: wallet1
address: cosmos1qs5nmmf7jall4sm38fjssxfw5ay87mfp22p3xm
pubkey: cosmospub1addwnpepqtxfgjxg8xrc9xrzqyfs3ud6svmu7wrt608s80d0t0g93rylu4kd7kpckj6
mnemonic: "puzzle pole beyond announce clip else cause airport index pencil intact camp leisure pole nasty put meat cover garage ripple chief unfair destroy spatial"

- name: wallet2
address: cosmos1n7qyhjkfp8szpy7ury7vlejd5wcfc2ysdd9xlx
pubkey: cosmospub1addwnpepq2nuh2a9x9wd6ad78dcft3e8tuds5xs4ypeterl0zenw9ejt0tdvk38yd3z
mnemonic: "february slab crane panther harbor judge artefact ghost clay torch stay cave enrich narrow sausage expand tomato margin wool repeat squeeze couch fork unhappy"

"$HOME/go/bin/gaiad" keys list --keyring-backend test --keyring-dir "$HOME/.gm/ibc-1"

- name: validator
address: cosmos14eg9y3kjlrepk8lmdavw8u5l472sl8e6xv99yk
pubkey: cosmospub1addwnpepq0q4f0aaaq2wycg7y3x8j8gfacazdf3xlxujkjguy2k3gq654jwuyn58hhq
mnemonic: "clarify concert lens mobile hover lucky bulk home elite fix school jungle draw soul excess siren advice accuse shallow copper model absorb salon mystery"

- name: wallet
address: cosmos120jm7xkv49erxty6ec9trs85j8yfgjwwdlsrtz
pubkey: cosmospub1addwnpepqgs0llcm64e7yrpx7hs9fmzqefnwxzfxnujf3qgysdpv8w5aalu2z2e86gs
mnemonic: "shine again similar wheel also frozen equal win ask grit artist quality subject twenty pet scrub olympic ladder puppy balcony blood exotic buddy gather"

- name: wallet1
address: cosmos18ccme8td0zdktcy7dafhurdhx7x8xxx0s445y2
pubkey: cosmospub1addwnpepq045d9qjrkvfxdx39849qdcrny0zr8z2elx6z7kjkgezrvw2enepx98pyxf
mnemonic: "join skill day disease canal alpha sweet sing icon donor relief little wheat borrow silver allow child silent teach then flower deliver arena library"

- name: wallet2
address: cosmos1x45ucdaa3fegemh3x2xp0qtnxl2gv533e2fg6g
pubkey: cosmospub1addwnpepq0ryrcm08l8x5wskhd5dczrduj535fxs9w7wky04ux97amljcffe6ewxymg
mnemonic: "wish burden unfair subway club pulp wood helmet whip decline between maid defense sniff cash guard cargo travel donor nasty saddle tumble service fringe"

"$HOME/go/bin/gaiad" keys list --keyring-backend test --keyring-dir "$HOME/.gm/node-0"
[]

"$HOME/go/bin/gaiad" keys list --keyring-backend test --keyring-dir "$HOME/.gm/node-1"
[]
```

Next, we will need to associate a private key with chains `ibc-0` and `ibc-1` which `hermes` will use to sign transactions.
Expand All @@ -119,6 +161,10 @@ If successful, the command should show an output similar to:
Success: Added key testkey ([ADDRESS]) on [CHAIN ID] chain
```

> __TROUBLESHOOTING__:
> - If the command outputs an error, run `gm rm ibc-0` and `gm rm ibc-1`.
> - If it does not out output anything, make sure the path to Hermes' binary is set in `$HOME/.gm/gm.toml`.

### Starting the chains with `gm`

Make sure you have the `$HOME/.gm/gm.toml` that we configured in the previous section [Install Gaiad Manager](gaiad-manager.md) and run the `gm` command below to start the chains.
Expand Down