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

Release Hermes v0.5.0 #1098

Merged
merged 10 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

## Unreleased

> Nothing yet.

## v0.5.0
*June 22nd, 2021*

This release brings a few features, and several improvements and bug fixes to the Hermes
relayer, notably the capability for Hermes to complete IBC connection handshakes when
it detects that one has been initialized, as well as the ability to detect chain
impersonation attacks and to dynamically estimate the gas needed to submit
a transaction.

Moreover, the overall reliability and availability of the relayer has also been improved
substantially by switching over to `tx_broadcast_sync` for submitting transactions.

### FEATURES

- [ibc-relayer-cli]
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mdBook is a utility to create modern online books from Markdown files.
This guide should be permanently deployed at its latest stable version at
[hermes.informal.systems](https://hermes.informal.systems).

Current version: `0.4.0`.
Current version: `0.5.0`.

The version of this guide is aligned with the [versioning of the ibc crates](../README.md).

Expand Down
5 changes: 3 additions & 2 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Summary

# Hermes (v0.4.0)
# Hermes (v0.5.0)

---
- [Introduction](./index.md)
Expand Down Expand Up @@ -34,7 +34,7 @@
- [Channels](./commands/path-setup/channels.md)
- [Relaying](commands/relaying/index.md)
- [Packet Messages](./commands/relaying/packets.md)
- [Channel Open Handshake Messages](commands/relaying/channel.md)
- [Handshake Messages](commands/relaying/handshakes.md)
- [Listen mode](./commands/listen/index.md)
- [Client upgrade](./commands/upgrade/index.md)
- [Testing client upgrade](./commands/upgrade/test.md)
Expand All @@ -44,6 +44,7 @@
- [Connection](./commands/queries/connection.md)
- [Channel](./commands/queries/channel.md)
- [Packet](./commands/queries/packet.md)
- [Tx](./commands/queries/tx.md)
- [Raw transactions](./commands/raw/index.md)
- [Client](./commands/raw/client.md)
- [Connection](./commands/raw/connection.md)
Expand Down
7 changes: 4 additions & 3 deletions guide/src/commands/global.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Hermes accepts global options which affect all commands.

```shell
hermes 0.4.0
hermes 0.5.0
Informal Systems <hello@informal.systems>
Implementation of `hermes`, an IBC Relayer developed in Rust.

Expand All @@ -19,14 +19,15 @@ __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
hermes -c /home/my_chain.toml --json start
```

## 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`.
Log messages will be written to `stderr`, while the final result will be written to `stdout`, and everything
will be formatted as JSON.
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`.

Expand Down
2 changes: 1 addition & 1 deletion guide/src/commands/keys/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> __WARNING__: Currently the relayer does NOT support a `keyring` store to securely
> store the private key file. The key file will be stored on the local file system
> in the user __$HOME__ folder under `$HOME/.rrly`
> in the user __$HOME__ folder under `$HOME/.hermes/keys/`

> __BREAKING__: As of Hermes v0.2.0, the format of the keys stored on disk has changed, and
> keys which had been previously configured must now be re-imported using either the `keys add`
Expand Down
2 changes: 1 addition & 1 deletion guide/src/commands/listen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Start the relayer in listen mode for all `ibc-0` events and observe the output:
hermes listen ibc-0
```

```rust
```json
EventBatch {
chain_id: ChainId {
id: "ibc-0",
Expand Down
2 changes: 1 addition & 1 deletion guide/src/commands/misbehaviour/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The `hermes misbehaviour` outputs an error message displaying `MISBEHAVIOUR DETE
hermes misbehaviour ibc-0 07-tendermint-0
```

```rust
```json
Apr 13 20:04:03.347 INFO ibc_relayer::foreign_client: checking misbehaviour for consensus state heights [Height { revision: 1, height: 195 }, Height { revision: 1, height: 85 }, Height { revision: 1, height: 28 }]
Apr 13 20:04:04.425 ERROR ibc_relayer::foreign_client: MISBEHAVIOUR DETECTED ClientId("07-tendermint-0") h1: Height { revision: 1, height: 195 }-Height { revision: 1, height: 85 } h2: Height { revision: 1, height: 195 }-Height { revision: 1, height: 85 }, sending evidence
Apr 13 20:04:05.070 INFO ibc_relayer_cli::commands::misbehaviour: evidence submission result [ClientMisbehaviour(ClientMisbehaviour(Attributes { height: Height { revision: 0, height: 1521 }, client_id: ClientId("07-tendermint-0"), client_type: Tendermint, consensus_height: Height { revision: 1, height: 195 } }))]
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/path-setup/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ port name `transfer` on both sides:
hermes create channel ibc-0 ibc-1 --port-a transfer --port-b transfer -o unordered
```

```rust
```json
🥂 ibc-0 => OpenInitConnection(
OpenInit(
Attributes {
Expand Down Expand Up @@ -327,7 +327,7 @@ hermes create channel ibc-0 --connection-a connection-0 --port-a transfer --port
Notice that one can omit the destination chain parameter, as Hermes will automatically
figure it out by looking up the given connection on `ibc-0`.

```rust
```json
🥳 ibc-0 => OpenInitChannel(
OpenInit(
Attributes {
Expand Down
6 changes: 3 additions & 3 deletions guide/src/commands/path-setup/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Create a new client of `ibc-1` on `ibc-0`:
hermes create client ibc-0 ibc-1
```

```rust
```json
CreateClient(
Attributes {
height: Height {
Expand Down Expand Up @@ -79,7 +79,7 @@ the client on `ibc-0` with latest header of `ibc-1`:
hermes update client ibc-0 07-tendermint-9
```

```rust
```json
Success: UpdateClient(
UpdateClient {
common: Attributes {
Expand Down Expand Up @@ -107,7 +107,7 @@ __Update a client to a specific target height__
hermes update client ibc-0 07-tendermint-1 --target-height 320 --trusted-height 293
```

```rust
```json
Success: UpdateClient(
UpdateClient {
common: Attributes {
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/path-setup/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ POSITIONAL ARGUMENTS:
FLAGS:
--client-a CLIENT-A identifier of client hosted on chain `a`; default: None (creates a new client)
--client-b CLIENT-B identifier of client hosted on chain `b`; default: None (creates a new client)

--delay DELAY delay period parameter for the new connection (seconds) (default: 0)
```

## Examples
Expand All @@ -34,7 +34,7 @@ Create a new connection between `ibc-0` and `ibc-1` over new clients:
hermes create connection ibc-0 ibc-1
```

```rust
```json
🥂 ibc-0 => OpenInitConnection(
OpenInit(
Attributes {
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/queries/channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Query all channels on `ibc-1`:
hermes query channels ibc-1
```

```rust
```json
Success: [
PortChannelId {
channel_id: ChannelId(
Expand Down Expand Up @@ -89,7 +89,7 @@ Query the channel end of channel `channel-1` on port `transfer` on `ibc-1`:
hermes query channel end ibc-1 transfer channel-1
```

```rust
```json
Success: ChannelEnd {
state: Open,
ordering: Unordered,
Expand Down
6 changes: 3 additions & 3 deletions guide/src/commands/queries/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Query the state of client `07-tendermint-2` on `ibc-1`:
hermes query client state ibc-1 07-tendermint-1
```

```rust
```json
Success: ClientState {
chain_id: ChainId {
id: "ibc-2",
Expand Down Expand Up @@ -246,7 +246,7 @@ Query the connections of client `07-tendermint-0` on `ibc-0`:
hermes query client connections ibc-0 07-tendermint-0
```

```rust
```json
Success: [
ConnectionId("connection-0"),
ConnectionId("connection-1"),
Expand Down Expand Up @@ -279,7 +279,7 @@ Query for the header used in the `07-tendermint-0` client update at height 2724
hermes query client header ibc-0 07-tendermint-0 2724
```

```rust
```json
Success: [
UpdateClient(
UpdateClient {
Expand Down
6 changes: 3 additions & 3 deletions guide/src/commands/queries/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Query all connections on `ibc-1`:
hermes query connections ibc-1
```

```rust
```json
Success: [
ConnectionId(
"connection-0",
Expand Down Expand Up @@ -79,7 +79,7 @@ Query the connection end of connection `connection-1` on `ibc-1`:
hermes query connection end ibc-1 connection-1
```

```rust
```json
Success: ConnectionEnd {
state: Open,
client_id: ClientId(
Expand Down Expand Up @@ -133,7 +133,7 @@ Query the channels associated with connection `connection-1` on `ibc-1`:
hermes query connection channels ibc-1 connection-1
```

```rust
```json
Success: [
PortChannelId {
channel_id: ChannelId(
Expand Down
1 change: 1 addition & 0 deletions guide/src/commands/queries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The `query` command provides the following sub-commands:
| `channel` | [Query information about channels](./channel.md) |
| `channels` | [Query the identifiers of all channels on a given chain](./channel.md) |
| `packet` | [Query information about packets](./packet.md) |
| `tx` | [Query information about transactions](./tx.md) |

## Usage

Expand Down
8 changes: 4 additions & 4 deletions guide/src/commands/queries/packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Query `ibc-0` for the sequence numbers of packets that still have commitments on
hermes query packet commitments ibc-0 transfer channel-0
```

```rust
```json
Success: PacketSeqs {
height: Height {
revision: 0,
Expand Down Expand Up @@ -93,7 +93,7 @@ Query `ibc-0` for the commitment of packet with sequence `3` sent on `transfer`
hermes query packet commitment ibc-0 transfer channel-0 3
```

```rust
```json
Success: "F9458DC7EBEBCD6D18E983FCAB5BD752CC2A74532BBD50B812DB229997739EFC"
```

Expand Down Expand Up @@ -122,7 +122,7 @@ Query `ibc-1` for the sequence numbers of packets acknowledged that were receive
hermes query packet acks ibc-1 transfer channel-1
```

```rust
```json
Success: PacketSeqs {
height: Height {
revision: 1,
Expand Down Expand Up @@ -165,7 +165,7 @@ Query `ibc-1` for the acknowledgment of packet with sequence `2` received on `tr
hermes query packet ack ibc-1 transfer channel-1 2
```

```rust
```json
Success: "08F7557ED51826FE18D84512BF24EC75001EDBAF2123A477DF72A0A9F3640A7C"
```

Expand Down
60 changes: 60 additions & 0 deletions guide/src/commands/queries/tx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Tx Queries

Use the `query tx` command to query information about transaction(s).


```shell
USAGE:
hermes query tx <SUBCOMMAND>

DESCRIPTION:
Query information about transactions

SUBCOMMANDS:
events Query the events emitted by transaction
```

## Table of Contents

<!-- toc -->


## Transaction Events

Use the `query tx events` command to obtain a list of events that a chain generated as a consequence of
delivering a transaction.

```shell
USAGE:
hermes query tx events <OPTIONS>

DESCRIPTION:
Query the events emitted by transaction

POSITIONAL ARGUMENTS:
chain_id identifier of the chain to query
hash transaction hash to query
```

__Example__

Query chain `ibc-0` for the events emitted due to transaction with hash
`6EDBBCBCB779F9FC9D6884ACDC4350E69720C4B362E4ACE6C576DE792F837490`:

```shell
hermes query tx events ibc-0 6EDBBCBCB779F9FC9D6884ACDC4350E69720C4B362E4ACE6C576DE792F837490
```

```json
Success: [
SendPacket(
SendPacket {
height: Height {
revision: 4,
height: 6628239,
},
packet: PortId("transfer") ChannelId("channel-139") Sequence(2),
},
),
]
```
Loading