---
# System prepended metadata

title: Hermes prerequisite

---

## Hermes setup for private zones

# Hermes prerequisite 


```
The IBC Relayer is developed with the Rust programming language. In order to build and run the relayer you need to install and configure Rust on your machine.

Fresh Rust installation
For instructions on how to install Rust on your machine please follow the official Notes about Rust Installation.

The provided instructions will install all the Rust tool chain including rustc, cargo, and rustup that are required to build the project.

Version requirements
Hermes is developed and tested using the latest version of Rust, 1.65 at the moment. To check that your tool chain is up-to-date run:


rustc --version
In case you already had installed the Rust tool chain in the past, you can update your installation by running rustup update.

Testing the installation
After you install the Rust tool chain you can execute the following command:


cargo version
This should display the cargo version and confirm the proper installation.
```

Should be somewhere around that
```
rustc  --version
rustc 1.67.1 (d5a82bbd2 2023-02-07)
```

```
cargo version
cargo 1.67.1 (8ecd4f20a 2023-01-10)
```

install hermes
`https://hermes.informal.systems/quick-start/installation.html`
 probably installing pre built binaries is best
 
 # create hermes configs
 
 create a hermes directory
 
copy config from here replace the values for the chains
https://github.com/arnabmitra/pio-scripts/blob/203d16462979204a10212c7443f2788dad0d4bb1/hermes/config.toml

things to replace to any private network 
`gas_price = { price = 1905, denom = 'nhash' }` to 0vspn


change the right values here 

```
id = '<id>'
rpc_addr = 'http://127.0.0.1:26660'
grpc_addr = 'http://127.0.0.1:9091'
websocket_addr = 'ws://127.0.0.1:26660/websocket'
```

# add the keys

Add keys for the id's chosen on the hermes config (provide the mnemonic as needed)

https://github.com/arnabmitra/pio-scripts/blob/6a9b8a067cc1d8a8abf1b5de368f2a3d20186e4d/hermes-restore-keys.sh#L7-L6

see added keys in `hermes` with 
`hermes --config ~/.hermes/config.toml keys list --chain testing`

make sure they match up with the current `rly` implementation
`rly --home /relayer keys list local`
where local is the <chain_id>

for e.g in my local testing
```
➜  .hermes git:(master) ✗ hermes --config ~/.hermes/config.toml keys list --chain testing
2023-03-13T17:20:36.318397Z  INFO ThreadId(01) running Hermes v1.2.0
SUCCESS
- testing (tp18uev5722xrwpfd2hnqducmt3qdjsyktmtw558y)
➜  .hermes git:(master) ✗ docker exec -it $(docker container ls
```
this is critical for them to be able to access the same client

now you can query all connections/channels
```
#!/bin/bash

hermes --config ~/.hermes/config.toml query channels --chain <chain_id>

hermes --config ~/.hermes/config.toml query  connections --chain <chain_id>

hermes --config ~/.hermes/config.toml query  connection end --chain <chain_id>  --connection <connection_id>

hermes --config ~/.hermes/config.toml query channel end --chain <dest_chain>  --port transfer --channel <channel_id>

hermes --config ~/.hermes/config.toml query channel end --chain <source_chain>  --port transfer --channel <channel_id>
```

# start hermes

https://github.com/arnabmitra/pio-scripts/blob/203d16462979204a10212c7443f2788dad0d4bb1/hermes_start.sh#L8-L7

probably avoid the log redirect on the in
on successful startup 
```
➜  pio-scripts git:(main) /bin/bash /Users/arnabmitra/pio-scripts/hermes_start.sh
Starting hermes relayer...
{"timestamp":"2023-03-13T17:24:59.336530Z","level":"INFO","fields":{"message":"running Hermes v1.2.0"},"threadId":"ThreadId(1)"}
{"timestamp":"2023-03-13T17:24:59.340229Z","level":"INFO","fields":{"message":"telemetry service running, exposing metrics at http://127.0.0.1:3001/metrics"},"span":{"name":"telemetry"},"spans":[{"name":"telemetry"}],"threadId":"ThreadId(1)"}
{"timestamp":"2023-03-13T17:24:59.340583Z","level":"INFO","fields":{"message":"starting REST API server listening at http://127.0.0.1:3000"},"span":{"name":"rest"},"spans":[{"name":"rest"}],"threadId":"ThreadId(1)"}
{"timestamp":"2023-03-13T17:24:59.356434Z","level":"TRACE","fields":{"message":"spawned chain runtime","chain":"testing"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(1)"}
{"timestamp":"2023-03-13T17:24:59.371905Z","level":"TRACE","fields":{"message":"parsed version specification","application":"<appd>","version":"","git_commit":"","sdk_version":"0.46.7","ibc_go_status":"Some(Version { major: 6, minor: 1, patch: 0 })","tendermint_version":"0.34.26"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(34)"}
{"timestamp":"2023-03-13T17:24:59.371962Z","level":"DEBUG","fields":{"message":"running diagnostic on version info Cosmos SDK 0.46.7, IBC-Go 6.1.0, Tendermint 0.34.26"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(34)"}
{"timestamp":"2023-03-13T17:24:59.371995Z","level":"WARN","fields":{"message":"Health checkup for chain 'testing' failed"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(34)"}
{"timestamp":"2023-03-13T17:24:59.372001Z","level":"WARN","fields":{"message":"    Reason: Hermes health check failed while verifying the application compatibility for chain testing:http://127.0.0.1:9090/; caused by: Ibc-Go module at version '6.1.0' does not meet compatibility requirements >=1.1, <=5"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(34)"}
{"timestamp":"2023-03-13T17:24:59.372005Z","level":"WARN","fields":{"message":"    Some Hermes features may not work in this mode!"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(34)"}
{"timestamp":"2023-03-13T17:24:59.372274Z","level":"WARN","fields":{"message":"chain is not healthy: Hermes health check failed while verifying the application compatibility for chain testing:http://127.0.0.1:9090/; caused by: Ibc-Go module at version '6.1.0' does not meet compatibility requirements >=1.1, <=5"},"span":{"chain":"testing","name":"health_check"},"spans":[{"chain":"testing","name":"health_check"}],"threadId":"ThreadId(1)"}
{"timestamp":"2023-03-13T17:24:59.376540Z","level":"TRACE","fields":{"message":"spawned chain runtime","chain":"testing2"},"span":{"chain":"testing2","name":"health_check"},"spans":[{"chain":"testing2","name":"health_check"}],"threadId":"ThreadId(1)"}
{"timestamp":"2023-03-13T17:24:59.387103Z","level":"TRACE","fields":{"message":"parsed version specification","application":"<appd>","version":"","git_commit":"","sdk_version":"0.46.7","ibc_go_status":"Some(Version { major: 6, minor: 1, patch: 0 })","tendermint_version":"0.34.26"},"span":{"chain":"testing2","name":"health_check"},"spans":[{"chain":"testing2","name":"health_check"}],"threadId":"ThreadId(35)"}
{"timestamp":"2023-03-13T17:24:59.387148Z","level":"DEBUG","fields":{"message":"running diagnostic on version info Cosmos SDK 0.46.7, IBC-Go 6.1.0, Tendermint 0.34.26"},"span":{"chain":"testing2","name":"health_check"},"spans":[{"chain":"testing2","name":"health_check"}],"threadId":"ThreadId(35)"}
{"timestamp":"2023-03-13T17:24:59.387159Z","level":"WARN","fields":{"message":"Health checkup for chain 'testing2' failed"},"span":{"chain":"testing2","name":"health_check"},"spans":[{"chain":"testing2","name":"health_check"}],"threadId":"ThreadId(35)"}
{"timestamp":"2023-03-13T17:24:59.387163Z","level":"WARN","fields":{"message":"    Reason: Hermes health check failed while verifying the application compatibility for chain testing2:http://127.0.0.1:9091/; caused by: Ibc-Go module at version '6.1.0' does not meet compatibility requirements >=1.1, <=5"},"span":{"chain":"testing2","name":"health_check"},"spans":[{"chain":"testing2","name":"health_check"}],"threadId":"ThreadId(35)"}
``` 


# Now we can shut down the rly binary