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

Documentation for Hermes v0.2 #792

Merged
merged 94 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
4518f2c
Add websocket_addr config option to the guide
romac Apr 1, 2021
47ca66d
Licences & consistent badges in all crate readmes.
adizere Apr 6, 2021
5580b26
Crates.io small improvs for cli
adizere Apr 6, 2021
6e5ac59
Update guide to account for removal of global timeout property and ad…
romac Apr 6, 2021
4fef124
Remove documentation about light client config and commands
romac Apr 6, 2021
57e164d
Merge branch 'master' into doc-v2
romac Apr 6, 2021
6d5b223
modifiend output for command sections 3.3, 4.1.1, 4.1.2, 4.31.
cezarad Apr 6, 2021
bd79f29
Fix typo
romac Apr 7, 2021
88a734b
Rename init-clients to init-hermes
romac Apr 7, 2021
aed5b74
Merge branch 'master' into doc-v2
romac Apr 7, 2021
5bfff0d
Update tutorial_set_new_path.md
cezarad Apr 8, 2021
e72f586
path
cezarad Apr 9, 2021
ae89739
Update tutorial_relay_two_paths.md
cezarad Apr 9, 2021
7dad60f
Merge branch 'master' into doc-v2
romac Apr 9, 2021
77d740a
Update Keys section of the guide
romac Apr 9, 2021
d9a3357
Add backward compatibility note for keys format
romac Apr 9, 2021
7ef4a6b
Document update to `listen` command
romac Apr 10, 2021
23c3b1d
Merge branch 'master' into doc-v2
ancazamfir Apr 11, 2021
a0f5173
Fix clippy - not caught by CI?
ancazamfir Apr 11, 2021
3aee4e2
Update sections that mention 'tx raw update-client' CLI
ancazamfir Apr 11, 2021
ee96691
Updates for query client consensus command
ancazamfir Apr 11, 2021
5f5d183
Update feature matrix and layout
ancazamfir Apr 11, 2021
b530f84
Small cleanup
ancazamfir Apr 11, 2021
f0011f3
Rought content for the path setup and streaming sub-sections
ancazamfir Apr 11, 2021
d896535
Add misbehaviour skeleton and links with connection and packets guides
ancazamfir Apr 11, 2021
9c1a6fa
Added details on misbehaviour
ancazamfir Apr 12, 2021
fb02dba
Exit on misbehaviour event
ancazamfir Apr 12, 2021
cab8b4d
Exit on misbehaviour event or if client is already frozen
ancazamfir Apr 12, 2021
85f948c
revert header check changed for testing
ancazamfir Apr 12, 2021
e8c399b
Update ft-transfer with the --receiver option
ancazamfir Apr 12, 2021
5d63d4e
Merge branch 'master' into doc-v2
romac Apr 12, 2021
48a6cd4
Fix output of `create connection` in no-JSON mode
romac Apr 12, 2021
9a4bb8d
Update `create client` and `update client` commands doc
romac Apr 12, 2021
de8f888
Fix `create client`, `update client` commands docs using Gaia v4.2.0
romac Apr 12, 2021
1cf92e8
Add Display instance to Order
romac Apr 12, 2021
d24f3b4
Comment out unused --version parameter in `create channel` command
romac Apr 12, 2021
54d1b49
Update `create channel` doc
romac Apr 12, 2021
5023e37
Update clients doc
romac Apr 12, 2021
4f6b3cd
Upgrade guide, create CLI wrapper
ancazamfir Apr 12, 2021
3b0c548
Merge branch 'doc-v2' of https://github.com/informalsystems/ibc-rs in…
ancazamfir Apr 12, 2021
ffa7949
Use `create client` command in upgrade doc
romac Apr 12, 2021
7ef19be
Fix TOC in Packet Relaying page
romac Apr 12, 2021
b73a2e5
Fix broken link for upgrade guide
ancazamfir Apr 12, 2021
e606533
Add channel version option
ancazamfir Apr 12, 2021
725dada
Add fee denom and amount where missing
ancazamfir Apr 12, 2021
6f1cee5
Same format for channel order accross CLIs, update guide
ancazamfir Apr 12, 2021
1b1fef3
Only print command options in debug mode
romac Apr 12, 2021
4c919d9
Minor changes in existing tutorials
romac Apr 12, 2021
db7feb7
Minor update to ft-transfer interface
romac Apr 12, 2021
b0198c4
Use default values with gumdrop
romac Apr 12, 2021
a6933f6
Update documentation for multi-paths relaying
romac Apr 12, 2021
ea6883e
Quick fix for multi-start
ancazamfir Apr 13, 2021
dddcd8d
Mention config everywhere in tutorial_relay_two_paths.md
romac Apr 13, 2021
7314f27
Re-organize the guide and check all links
romac Apr 13, 2021
72312b0
Comment out link checker for CI
romac Apr 13, 2021
94ad66e
Rename upgrade pages
romac Apr 13, 2021
64a60ae
Move feature_matrix under features/
romac Apr 13, 2021
3bf4c77
Change ft-transfer to use same param order as the other packet clis
ancazamfir Apr 13, 2021
edac2f1
Output for upgrade
ancazamfir Apr 13, 2021
d88a88d
Output for raw client and connection
ancazamfir Apr 13, 2021
db8d722
Output for raw channel open
ancazamfir Apr 13, 2021
6ae71b6
Use pretty debug output in channel handshake
romac Apr 13, 2021
156c1a1
Add more output to multi-path tutorial
romac Apr 13, 2021
57a4a32
Update lockfile
romac Apr 13, 2021
ede5b4f
Use pretty in channel open
romac Apr 13, 2021
7f5b202
Use standard Debug instance for Height
romac Apr 13, 2021
c49366c
Use standard Debug instance for Height in guide
romac Apr 13, 2021
b69a175
More pretty channel messages
romac Apr 13, 2021
4068f65
Fix compilation
romac Apr 13, 2021
5c10218
Show commitment root hash as a hex-encoded string
romac Apr 13, 2021
74ad14e
Update client queries
romac Apr 13, 2021
b808ebc
Output for raw packet clis
ancazamfir Apr 13, 2021
058adf7
Output for channel close handshake
ancazamfir Apr 13, 2021
14d7fb1
Fix output for connection open
ancazamfir Apr 13, 2021
21993b6
Fix output for misbehaviour
ancazamfir Apr 13, 2021
246fad3
Update listen command output
romac Apr 13, 2021
d035ba6
Update query connection guide doc
romac Apr 13, 2021
7c36421
Update query channel guide doc
romac Apr 13, 2021
c092777
Update packet queries guide docs
romac Apr 13, 2021
df1f8a6
First pass at features
ancazamfir Apr 13, 2021
0fd2014
Update packet queries guide docs, part 2
romac Apr 13, 2021
b93260d
Add page on global options and JSON output
romac Apr 13, 2021
1335b0f
Update output on help page
romac Apr 13, 2021
c046c30
Use debug! in tx connection command
romac Apr 13, 2021
5824384
Updates to documentation in the tutorials sections (#792)
andynog Apr 13, 2021
7b4baf2
Merge branch 'doc-v2' of github.com:informalsystems/ibc-rs into doc-v2
andynog Apr 13, 2021
ef31537
Next steps and a comment
romac Apr 14, 2021
2a64dc2
More uppercase on deletion of data folder
romac Apr 14, 2021
004e1e4
Updates on features
ancazamfir Apr 14, 2021
50f2f82
More variables in setup-chains
romac Apr 14, 2021
3459f26
Rename Disk keyring store to Test
romac Apr 14, 2021
1c10532
Fix ft-transfer invocation
romac Apr 14, 2021
d3306a2
Update start-multi queries
ancazamfir Apr 14, 2021
cb008b8
Initial changelog update for v0.2.0
ancazamfir Apr 14, 2021
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
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions e2e/e2e/packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class TxPacketSendRes:
@cmd("tx raw ft-transfer")
@dataclass
class TxPacketSend(Cmd[TxPacketSendRes]):
src_chain_id: ChainId
dst_chain_id: ChainId
src_chain_id: ChainId
src_port: PortId
src_channel: ChannelId

def args(self) -> List[str]:
return [self.src_chain_id, self.dst_chain_id, self.src_port, self.src_channel, "9999", "1000"]
return [self.dst_chain_id, self.src_chain_id, self.src_port, self.src_channel, "9999", "1000"]

def process(self, result: Any) -> TxPacketSendRes:
entry = find_entry(result, 'SendPacket')
Expand Down Expand Up @@ -90,7 +90,7 @@ def process(self, result: Any) -> TxPacketAckRes:


def packet_send(c: Config, src: ChainId, dst: ChainId, src_port: PortId, src_channel: ChannelId) -> Packet:
cmd = TxPacketSend(src_chain_id=src, dst_chain_id=dst,
cmd = TxPacketSend(dst_chain_id=dst, src_chain_id=src,
src_port=src_port, src_channel=src_channel)

res = cmd.run(c).success()
Expand Down
3 changes: 3 additions & 0 deletions guide/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ renderer = ["html"]

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]

# Uncomment to trigger the link check
# [output.linkcheck]
71 changes: 39 additions & 32 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,48 @@
- [Introduction](./index.md)
- [What is Hermes?](./relayer.md)
- [Features](./features.md)
- [Feature matrix](./feature_matrix.md)
- [Feature matrix](./features/matrix.md)
- [Getting Started](./getting_started.md)
- [Pre-requisites](./pre_requisites.md)
- [Installation](./installation.md)
- [Configuration](./config.md)
- [Tutorials](./tutorials.md)
- [Two local chains](./two_chains.md)
- [Install Gaia](./gaia.md)
- [Start the local chains](./local_chains.md)
- [Connect the chains using raw transactions](./tutorial_raw.md)
- [Configure clients](./tutorial_client_raw.md)
- [Connection handshake](./tutorial_conn_raw.md)
- [Channel handshake](./tutorial_chan_open_raw.md)
- [Relay packets](./tutorial_packet_raw.md)
- [Connect the chains using relay paths](./tutorial_relay_paths.md)
- [New path](./tutorial_set_new_path.md)
- [Packet relaying on existing path](./tutorial_relay_existing_path.md)
- [Packet relaying on new path](./tutorial_relay_new_path.md)
- [Concurrent packet relaying on multiple paths](./tutorial_relay_two_paths.md)
- [Commands Reference](./commands.md)
- [Keys](./keys.md)
- [Light clients](./light_clients.md)
- [Path setup and streaming](./relayer_loop.md)
- [Raw transactions](./transactions.md)
- [Client](./tx_client.md)
- [Connection](./tx_connection.md)
- [Channel Open](./tx_channel_open.md)
- [Channel Close](./tx_channel_close.md)
- [Packet](./tx_packet.md)
- [Queries](./queries.md)
- [Client](./query_client.md)
- [Connection](./query_connection.md)
- [Channel](./query_channel.md)
- [Packet](./query_packet.md)
- [Listen mode](./listen.md)
- [Help](help.md)
- [Tutorials](./tutorials/index.md)
- [Local chains](./tutorials/local-chains/index.md)
- [Install Gaia](./tutorials/local-chains/gaia.md)
- [Start the local chains](./tutorials/local-chains/start.md)
- [Connect the chains using relay paths](./tutorials/local-chains/relay-paths/index.md)
- [Create a new path](./tutorials/local-chains/relay-paths/create-new-path.md)
- [Packet relaying on existing path](./tutorials/local-chains/relay-paths/existing-path.md)
- [Packet relaying on new path](./tutorials/local-chains/relay-paths/new-path.md)
- [Concurrent packet relaying on multiple paths](./tutorials/local-chains/relay-paths/multiple-paths.md)
- [Connect the chains using raw transactions](./tutorials/local-chains/raw/index.md)
- [Configure clients](./tutorials/local-chains/raw/client.md)
- [Connection handshake](./tutorials/local-chains/raw/connection.md)
- [Channel handshake](./tutorials/local-chains/raw/channel.md)
- [Relay packets](./tutorials/local-chains/raw/packet.md)
- [Commands Reference](./commands/index.md)
- [Global options and JSON output](./commands/global.md)
- [Keys](./commands/keys/index.md)
- [Path setup and streaming](./commands/setup-and-relaying/index.md)
- [Clients](./commands/setup-and-relaying/clients.md)
- [Connections](./commands/setup-and-relaying/connections.md)
- [Channels](./commands/setup-and-relaying/channels.md)
- [Packet relaying](./commands/setup-and-relaying/packets.md)
- [Listen mode](./commands/listen/index.md)
- [Client upgrade](./commands/upgrade/index.md)
- [Testing client upgrade](./commands/upgrade/test.md)
- [Misbehaviour](./commands/misbehaviour/index.md)
- [Queries](./commands/queries/index.md)
- [Client](./commands/queries/client.md)
- [Connection](./commands/queries/connection.md)
- [Channel](./commands/queries/channel.md)
- [Packet](./commands/queries/packet.md)
- [Raw transactions](./commands/raw/index.md)
- [Client](./commands/raw/client.md)
- [Connection](./commands/raw/connection.md)
- [Channel Open](./commands/raw/channel-open.md)
- [Channel Close](./commands/raw/channel-close.md)
- [Packet](./commands/raw/packet.md)
- [Help](./help.md)
- [Glossary](./glossary.md)
---
29 changes: 0 additions & 29 deletions guide/src/commands.md

This file was deleted.

113 changes: 113 additions & 0 deletions guide/src/commands/global.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Global options

The Hermes accepts global options which affect all commands.

```shell
hermes 0.1.1
Informal Systems <[email protected]>
Implementation of `hermes`, an IBC Relayer developed in Rust.

FLAGS:
-c, --config CONFIG path to configuration file
-h, --help print help message
-j, --json enable JSON output
```

The flags must be specified right after the `hermes` command and before any subcommand.

__Example__

To start the relayer using the configuration file at `/home/my_chain.toml` and enable JSON output:

```shell
hermes -c /home/my_chain.toml --json start ibc-0 ibc-1
```

## JSON output

If the `--json` option is supplied, all relayer commands will output single-line JSON values instead of plain text.

Intermediate log messages will be written to `stderr`, while the final result will be written to `stdout`.
This allows processing only the final output using [`jq`](https://stedolan.github.io/jq/).
To process all the output using `jq`, one can redirect `stderr` to `stdout` with `hermes --json COMMAND 2>&1 | jq`.

__Example__

```shell
hermes -c /home/my_chain.toml --json create client ibc-0 ibc-1
```

```json
{"timestamp":"Apr 13 20:46:31.921","level":"INFO","fields":{"message":"Using default configuration from: '.hermes/config.toml'"},"target":"ibc_relayer_cli::commands"}
{"timestamp":"Apr 13 20:46:31.961","level":"INFO","fields":{"message":"running listener","chain.id":"ibc-1"},"target":"ibc_relayer::event::monitor"}
{"timestamp":"Apr 13 20:46:31.989","level":"INFO","fields":{"message":"running listener","chain.id":"ibc-0"},"target":"ibc_relayer::event::monitor"}
{"result":{"CreateClient":{"client_id":"07-tendermint-1","client_type":"Tendermint","consensus_height":{"revision_height":10060,"revision_number":1},"height":{"revision_height":10072,"revision_number":0}}},"status":"success"}
```

The first three lines are printed to `stderr`, while the last line with a `"result"` key is printed to `stdout`.

__Example__

To improve the readability, pipe all of the output to `jq`:

```
hermes -c /home/my_chain.toml --json create client ibc-0 ibc-1 2>&1 | jq
```

```json
{
"timestamp": "Apr 13 20:52:26.060",
"level": "INFO",
"fields": {
"message": "Using default configuration from: '.hermes/config.toml'"
},
"target": "ibc_relayer_cli::commands"
}
{
"timestamp": "Apr 13 20:52:26.082",
"level": "INFO",
"fields": {
"message": "running listener",
"chain.id": "ibc-1"
},
"target": "ibc_relayer::event::monitor"
}
{
"timestamp": "Apr 13 20:52:26.088",
"level": "INFO",
"fields": {
"message": "running listener",
"chain.id": "ibc-0"
},
"target": "ibc_relayer::event::monitor"
}
{
"result": {
"CreateClient": {
"client_id": "07-tendermint-5",
"client_type": "Tendermint",
"consensus_height": {
"revision_height": 10364,
"revision_number": 1
},
"height": {
"revision_height": 10375,
"revision_number": 0
}
}
},
"status": "success"
}
```

__Example__

To extract the identifer of the newly created client above:

```
hermes -c /home/my_chain.toml --json create client ibc-0 ibc-1 | jq '.result.CreateClient.client_id'
```

```
"07-tendermint-2"
```
33 changes: 33 additions & 0 deletions guide/src/commands/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Commands

The `Commands` section presents the commands current available in Hermes

## Sections

**[Keys](./keys/index.md)**

Commands to manage keys (private keys) for each chain.

**[Path Setup and Streaming](./setup-and-relaying/index.md)**

Commands to manage clients, connections, channels and performing packet relaying

**[Listen Mode](./listen/index.md)**

Commands to listen for IBC events

**[Upgrade](./upgrade/index.md)**

Commands to perform client upgrade

**[Monitor](./misbehaviour/index.md)**

Commands to monitor clients and submit evidence of misbehaviour

**[Queries](./queries/index.md)**

Commands to execute queries on configured chains

**[Raw Transactions](./raw/index.md)**

Commands to submit individual transactions to configured chains
Loading