Skip to content

Commit 0c25fcc

Browse files
committed
chore(hermes): update wormhole config
1 parent 17f489e commit 0c25fcc

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

hermes/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hermes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermes"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = "Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle."
55
edition = "2021"
66

hermes/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/golang:1.20.4@sha256:6dd5c5f8936d7d4487802fb10a77f31b1776740be0fc
22

33
# Install OS packages
44
RUN apt-get update && apt-get install --yes \
5-
build-essential curl clang libssl-dev
5+
build-essential curl clang libssl-dev protobuf-compiler
66

77
# Install Rust
88
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --quiet --no-modify-path

hermes/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ updates.
1414

1515
To set up and run a Hermes node, follow the steps below:
1616

17+
0. **Prerequisites**: Hermes requires a running instance of Pythnet and the Wormhole spy RPC. You can find instructions
18+
for getting a Pythnet RPC instance from a node provider
19+
[here](https://docs.pyth.network/documentation/pythnet-price-feeds/hermes#hermes-node-providers) and instructions
20+
for running a Wormhole spy RPC instance [here](https://docs.wormhole.com/wormhole/explore-wormhole/spy). We recommend
21+
using [Beacon](https://github.com/pyth-network/beacon), a highly available rewrite for spy, for production purposes.
1722
1. **Install Rust nightly-2023-07-23**: If you haven't already, you'll need to install Rust. You can
1823
do so by following the official instructions. Then, run the following command to install the required
1924
nightly version of Rust:
@@ -39,15 +44,16 @@ To set up and run a Hermes node, follow the steps below:
3944
```bash
4045
./target/release/hermes run \
4146
--pythnet-http-addr https://pythnet-rpc/ \
42-
--pythnet-ws-addr wss://pythnet-rpc/
47+
--pythnet-ws-addr wss://pythnet-rpc/ \
48+
--wormhole-spy-rpc-addr https://wormhole-spy-rpc/
4349
```
4450

45-
Your Hermes node will now start and connect to the specified networks. You
51+
Your Hermes node will now start and connect to the Pythnet and Wormhole spy RPC. You
4652
can interact with the node using the REST and Websocket APIs on port 33999.
4753

4854
For local development, you can also run the node with [cargo watch](https://crates.io/crates/cargo-watch) to restart
4955
it automatically when the code changes:
5056

5157
```bash
52-
cargo watch -w src -x "run -- run --pythnet-http-addr https://pythnet-rpc/ --pythnet-ws-addr wss://pythnet-rpc/"
58+
cargo watch -w src -x "run -- run --pythnet-http-addr https://pythnet-rpc/ --pythnet-ws-addr wss://pythnet-rpc/ --wormhole-spy-rpc-addr https://wormhole-spy-rpc/
5359
```

hermes/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ fn main() {
1818
git clean -df
1919
git remote add wormhole https://github.com/wormhole-foundation/wormhole.git
2020
git remote add googleapis https://github.com/googleapis/googleapis.git
21-
git fetch --depth=1 --porcelain wormhole main
22-
git fetch --depth=1 --porcelain googleapis master
21+
git fetch --depth=1 wormhole main
22+
git fetch --depth=1 googleapis master
2323
git read-tree --prefix=proto/ -u wormhole/main:proto
2424
git read-tree --prefix=proto/google/api/ -u googleapis/master:google/api
2525
"#;

hermes/src/config/wormhole.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use {
44
};
55

66
const DEFAULT_CONTRACT_ADDR: &str = "H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU";
7-
const DEFAULT_WORMHOLE_RPC_ADDR: &str = "grpc://127.0.0.1:7073";
87

98
#[derive(Args, Clone, Debug)]
109
#[command(next_help_heading = "Wormhole Options")]
@@ -16,12 +15,11 @@ pub struct Options {
1615
#[arg(env = "WORMHOLE_CONTRACT_ADDR")]
1716
pub contract_addr: Pubkey,
1817

19-
/// gRPC endpoint for a Wormhole node.
18+
/// gRPC endpoint for a Wormhole spy.
2019
///
21-
/// This can either be a standard Wormhole node gRPC endpoint or a beacon endpoint if
20+
/// This can either be a standard Wormhole spy gRPC endpoint or a beacon endpoint if
2221
/// load-balancing is desired.
2322
#[arg(long = "wormhole-spy-rpc-addr")]
24-
#[arg(default_value = DEFAULT_WORMHOLE_RPC_ADDR)]
25-
#[arg(env = "WORMHOLE_RPC_ADDR")]
23+
#[arg(env = "WORMHOLE_SPY_RPC_ADDR")]
2624
pub spy_rpc_addr: String,
2725
}

0 commit comments

Comments
 (0)