Skip to content

Commit cbf5138

Browse files
romacadizerecezaradancazamfirandynog
authored
Documentation for Hermes v0.2 (#792)
* Add websocket_addr config option to the guide * Licences & consistent badges in all crate readmes. * Crates.io small improvs for cli * Update guide to account for removal of global timeout property and addition of per-chain rpc_timeout property * Remove documentation about light client config and commands * modifiend output for command sections 3.3, 4.1.1, 4.1.2, 4.31. * Fix typo * Rename init-clients to init-hermes * Update tutorial_set_new_path.md * path * Update tutorial_relay_two_paths.md * Update Keys section of the guide * Add backward compatibility note for keys format * Document update to `listen` command * Fix clippy - not caught by CI? * Update sections that mention 'tx raw update-client' CLI * Updates for query client consensus command * Update feature matrix and layout * Small cleanup * Rought content for the path setup and streaming sub-sections * Add misbehaviour skeleton and links with connection and packets guides * Added details on misbehaviour * Exit on misbehaviour event * Exit on misbehaviour event or if client is already frozen * revert header check changed for testing * Update ft-transfer with the --receiver option * Fix output of `create connection` in no-JSON mode * Update `create client` and `update client` commands doc * Fix `create client`, `update client` commands docs using Gaia v4.2.0 * Add Display instance to Order * Comment out unused --version parameter in `create channel` command * Update `create channel` doc * Update clients doc * Upgrade guide, create CLI wrapper * Use `create client` command in upgrade doc * Fix TOC in Packet Relaying page * Fix broken link for upgrade guide * Add channel version option * Add fee denom and amount where missing * Same format for channel order accross CLIs, update guide * Only print command options in debug mode * Minor changes in existing tutorials * Minor update to ft-transfer interface * Use default values with gumdrop * Update documentation for multi-paths relaying * Quick fix for multi-start * Mention config everywhere in tutorial_relay_two_paths.md * Re-organize the guide and check all links * Comment out link checker for CI * Rename upgrade pages * Move feature_matrix under features/ * Change ft-transfer to use same param order as the other packet clis * Output for upgrade * Output for raw client and connection * Output for raw channel open * Use pretty debug output in channel handshake * Add more output to multi-path tutorial * Update lockfile * Use pretty in channel open * Use standard Debug instance for Height * Use standard Debug instance for Height in guide * More pretty channel messages * Fix compilation * Show commitment root hash as a hex-encoded string * Update client queries * Output for raw packet clis * Output for channel close handshake * Fix output for connection open * Fix output for misbehaviour * Update listen command output * Update query connection guide doc * Update query channel guide doc * Update packet queries guide docs * First pass at features * Update packet queries guide docs, part 2 * Add page on global options and JSON output * Update output on help page * Use debug! in tx connection command * Updates to documentation in the tutorials sections (#792) * Next steps and a comment * More uppercase on deletion of data folder * Updates on features * More variables in setup-chains * Rename Disk keyring store to Test * Fix ft-transfer invocation * Update start-multi queries Co-authored-by: Adi Seredinschi <[email protected]> Co-authored-by: cezarad <[email protected]> Co-authored-by: Anca Zamfir <[email protected]> Co-authored-by: Andy Nogueira <[email protected]>
1 parent 306b7b6 commit cbf5138

File tree

104 files changed

+4021
-2225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+4021
-2225
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# Changelog
22

33
## Unreleased Changes
4+
This release includes initial support for relaying over multiple paths from a single `hermes` instance.
5+
Adds support for relayer restart, where pending packets are cleared.
6+
Includes support for ordered channels, packet delay, misbehaviour detection and evidence submission, client upgrade after counterparty chain upgrades.
47

5-
> [TODO: high level summary]
8+
This release brings improvements to the relayer UX by providing new and updated commands for keys, client,
9+
connection and channel management.
10+
In addition, it simplifies the configuration of and integration with the light client.
11+
12+
This release also finalizes initial implementation for all of ICS 004 handlers.
613

714
### FEATURES
815

916
- Update to `tendermint-rs` v0.19.0 ([#798])
1017

1118
- [ibc]
12-
- Added handler(s) for sending packets ([#695]) and for recv. and ack. packets ([#736])
19+
- Added handler(s) for sending packets ([#695]), recv. and ack. packets ([#736]), and timeouts ([#362])
1320

1421
- [ibc-relayer]
1522
- Support for relayer restart ([#561])
@@ -77,6 +84,7 @@
7784

7885

7986
[#352]: https://github.com/informalsystems/ibc-rs/issues/352
87+
[#362]: https://github.com/informalsystems/ibc-rs/issues/362
8088
[#357]: https://github.com/informalsystems/ibc-rs/issues/357
8189
[#416]: https://github.com/informalsystems/ibc-rs/issues/416
8290
[#561]: https://github.com/informalsystems/ibc-rs/issues/561

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/e2e/packet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ class TxPacketSendRes:
2323
@cmd("tx raw ft-transfer")
2424
@dataclass
2525
class TxPacketSend(Cmd[TxPacketSendRes]):
26-
src_chain_id: ChainId
2726
dst_chain_id: ChainId
27+
src_chain_id: ChainId
2828
src_port: PortId
2929
src_channel: ChannelId
3030

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

3434
def process(self, result: Any) -> TxPacketSendRes:
3535
entry = find_entry(result, 'SendPacket')
@@ -90,7 +90,7 @@ def process(self, result: Any) -> TxPacketAckRes:
9090

9191

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

9696
res = cmd.run(c).success()

guide/book.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ renderer = ["html"]
1414

1515
[output.html]
1616
additional-js = ["mermaid.min.js", "mermaid-init.js"]
17+
18+
# Uncomment to trigger the link check
19+
# [output.linkcheck]

guide/src/SUMMARY.md

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,49 @@
66
- [Introduction](./index.md)
77
- [What is Hermes?](./relayer.md)
88
- [Features](./features.md)
9-
- [Feature matrix](./feature_matrix.md)
9+
- [Feature matrix](./features/matrix.md)
1010
- [Getting Started](./getting_started.md)
1111
- [Pre-requisites](./pre_requisites.md)
1212
- [Installation](./installation.md)
1313
- [Configuration](./config.md)
14-
- [Tutorials](./tutorials.md)
15-
- [Two local chains](./two_chains.md)
16-
- [Install Gaia](./gaia.md)
17-
- [Start the local chains](./local_chains.md)
18-
- [Connect the chains using raw transactions](./tutorial_raw.md)
19-
- [Configure clients](./tutorial_client_raw.md)
20-
- [Connection handshake](./tutorial_conn_raw.md)
21-
- [Channel handshake](./tutorial_chan_open_raw.md)
22-
- [Relay packets](./tutorial_packet_raw.md)
23-
- [Connect the chains using relay paths](./tutorial_relay_paths.md)
24-
- [New path](./tutorial_set_new_path.md)
25-
- [Packet relaying on existing path](./tutorial_relay_existing_path.md)
26-
- [Packet relaying on new path](./tutorial_relay_new_path.md)
27-
- [Concurrent packet relaying on multiple paths](./tutorial_relay_two_paths.md)
28-
- [Commands Reference](./commands.md)
29-
- [Keys](./keys.md)
30-
- [Light clients](./light_clients.md)
31-
- [Path setup and streaming](./relayer_loop.md)
32-
- [Raw transactions](./transactions.md)
33-
- [Client](./tx_client.md)
34-
- [Connection](./tx_connection.md)
35-
- [Channel Open](./tx_channel_open.md)
36-
- [Channel Close](./tx_channel_close.md)
37-
- [Packet](./tx_packet.md)
38-
- [Queries](./queries.md)
39-
- [Client](./query_client.md)
40-
- [Connection](./query_connection.md)
41-
- [Channel](./query_channel.md)
42-
- [Packet](./query_packet.md)
43-
- [Listen mode](./listen.md)
44-
- [Help](help.md)
14+
- [Tutorials](./tutorials/index.md)
15+
- [Local chains](./tutorials/local-chains/index.md)
16+
- [Install Gaia](./tutorials/local-chains/gaia.md)
17+
- [Start the local chains](./tutorials/local-chains/start.md)
18+
- [Identifiers](./tutorials/local-chains/identifiers.md)
19+
- [Connect the chains using relay paths](./tutorials/local-chains/relay-paths/index.md)
20+
- [Create a new path](./tutorials/local-chains/relay-paths/create-new-path.md)
21+
- [Packet relaying on existing path](./tutorials/local-chains/relay-paths/existing-path.md)
22+
- [Packet relaying on new path](./tutorials/local-chains/relay-paths/new-path.md)
23+
- [Concurrent packet relaying on multiple paths](./tutorials/local-chains/relay-paths/multiple-paths.md)
24+
- [Connect the chains using raw transactions](./tutorials/local-chains/raw/index.md)
25+
- [Configure clients](./tutorials/local-chains/raw/client.md)
26+
- [Connection handshake](./tutorials/local-chains/raw/connection.md)
27+
- [Channel handshake](./tutorials/local-chains/raw/channel.md)
28+
- [Relay packets](./tutorials/local-chains/raw/packet.md)
29+
- [Commands Reference](./commands/index.md)
30+
- [Global options and JSON output](./commands/global.md)
31+
- [Keys](./commands/keys/index.md)
32+
- [Path setup and streaming](./commands/setup-and-relaying/index.md)
33+
- [Clients](./commands/setup-and-relaying/clients.md)
34+
- [Connections](./commands/setup-and-relaying/connections.md)
35+
- [Channels](./commands/setup-and-relaying/channels.md)
36+
- [Packet relaying](./commands/setup-and-relaying/packets.md)
37+
- [Listen mode](./commands/listen/index.md)
38+
- [Client upgrade](./commands/upgrade/index.md)
39+
- [Testing client upgrade](./commands/upgrade/test.md)
40+
- [Misbehaviour](./commands/misbehaviour/index.md)
41+
- [Queries](./commands/queries/index.md)
42+
- [Client](./commands/queries/client.md)
43+
- [Connection](./commands/queries/connection.md)
44+
- [Channel](./commands/queries/channel.md)
45+
- [Packet](./commands/queries/packet.md)
46+
- [Raw transactions](./commands/raw/index.md)
47+
- [Client](./commands/raw/client.md)
48+
- [Connection](./commands/raw/connection.md)
49+
- [Channel Open](./commands/raw/channel-open.md)
50+
- [Channel Close](./commands/raw/channel-close.md)
51+
- [Packet](./commands/raw/packet.md)
52+
- [Help](./help.md)
4553
- [Glossary](./glossary.md)
4654
---

guide/src/commands.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

guide/src/commands/global.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Global options
2+
3+
The Hermes accepts global options which affect all commands.
4+
5+
```shell
6+
hermes 0.1.1
7+
Informal Systems <[email protected]>
8+
Implementation of `hermes`, an IBC Relayer developed in Rust.
9+
10+
FLAGS:
11+
-c, --config CONFIG path to configuration file
12+
-h, --help print help message
13+
-j, --json enable JSON output
14+
```
15+
16+
The flags must be specified right after the `hermes` command and before any subcommand.
17+
18+
__Example__
19+
20+
To start the relayer using the configuration file at `/home/my_chain.toml` and enable JSON output:
21+
22+
```shell
23+
hermes -c /home/my_chain.toml --json start ibc-0 ibc-1
24+
```
25+
26+
## JSON output
27+
28+
If the `--json` option is supplied, all relayer commands will output single-line JSON values instead of plain text.
29+
30+
Intermediate log messages will be written to `stderr`, while the final result will be written to `stdout`.
31+
This allows processing only the final output using [`jq`](https://stedolan.github.io/jq/).
32+
To process all the output using `jq`, one can redirect `stderr` to `stdout` with `hermes --json COMMAND 2>&1 | jq`.
33+
34+
__Example__
35+
36+
```shell
37+
hermes -c /home/my_chain.toml --json create client ibc-0 ibc-1
38+
```
39+
40+
```json
41+
{"timestamp":"Apr 13 20:46:31.921","level":"INFO","fields":{"message":"Using default configuration from: '.hermes/config.toml'"},"target":"ibc_relayer_cli::commands"}
42+
{"timestamp":"Apr 13 20:46:31.961","level":"INFO","fields":{"message":"running listener","chain.id":"ibc-1"},"target":"ibc_relayer::event::monitor"}
43+
{"timestamp":"Apr 13 20:46:31.989","level":"INFO","fields":{"message":"running listener","chain.id":"ibc-0"},"target":"ibc_relayer::event::monitor"}
44+
{"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"}
45+
```
46+
47+
The first three lines are printed to `stderr`, while the last line with a `"result"` key is printed to `stdout`.
48+
49+
__Example__
50+
51+
To improve the readability, pipe all of the output to `jq`:
52+
53+
```
54+
hermes -c /home/my_chain.toml --json create client ibc-0 ibc-1 2>&1 | jq
55+
```
56+
57+
```json
58+
{
59+
"timestamp": "Apr 13 20:52:26.060",
60+
"level": "INFO",
61+
"fields": {
62+
"message": "Using default configuration from: '.hermes/config.toml'"
63+
},
64+
"target": "ibc_relayer_cli::commands"
65+
}
66+
{
67+
"timestamp": "Apr 13 20:52:26.082",
68+
"level": "INFO",
69+
"fields": {
70+
"message": "running listener",
71+
"chain.id": "ibc-1"
72+
},
73+
"target": "ibc_relayer::event::monitor"
74+
}
75+
{
76+
"timestamp": "Apr 13 20:52:26.088",
77+
"level": "INFO",
78+
"fields": {
79+
"message": "running listener",
80+
"chain.id": "ibc-0"
81+
},
82+
"target": "ibc_relayer::event::monitor"
83+
}
84+
{
85+
"result": {
86+
"CreateClient": {
87+
"client_id": "07-tendermint-5",
88+
"client_type": "Tendermint",
89+
"consensus_height": {
90+
"revision_height": 10364,
91+
"revision_number": 1
92+
},
93+
"height": {
94+
"revision_height": 10375,
95+
"revision_number": 0
96+
}
97+
}
98+
},
99+
"status": "success"
100+
}
101+
```
102+
103+
__Example__
104+
105+
To extract the identifer of the newly created client above:
106+
107+
```
108+
hermes -c /home/my_chain.toml --json create client ibc-0 ibc-1 | jq '.result.CreateClient.client_id'
109+
```
110+
111+
```
112+
"07-tendermint-2"
113+
```

guide/src/commands/index.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Commands
2+
3+
The `Commands` section presents the commands current available in Hermes
4+
5+
## Sections
6+
7+
**[Keys](./keys/index.md)**
8+
9+
Commands to manage keys (private keys) for each chain.
10+
11+
**[Path Setup and Streaming](./setup-and-relaying/index.md)**
12+
13+
Commands to manage clients, connections, channels and performing packet relaying
14+
15+
**[Listen Mode](./listen/index.md)**
16+
17+
Commands to listen for IBC events
18+
19+
**[Upgrade](./upgrade/index.md)**
20+
21+
Commands to perform client upgrade
22+
23+
**[Monitor](./misbehaviour/index.md)**
24+
25+
Commands to monitor clients and submit evidence of misbehaviour
26+
27+
**[Queries](./queries/index.md)**
28+
29+
Commands to execute queries on configured chains
30+
31+
**[Raw Transactions](./raw/index.md)**
32+
33+
Commands to submit individual transactions to configured chains

0 commit comments

Comments
 (0)