pyth-crosschain/hermes
Ali Behjati 1a64d58834 patch(hermes): improve ws reliability
- Add max message size for incoming messages
- Add sent message rate limit and ip whitelisting
2023-10-05 16:00:48 +02:00
..
src patch(hermes): improve ws reliability 2023-10-05 16:00:48 +02:00
.gitignore feat: add serializers for pyth formats 2023-06-05 15:19:48 +01:00
Cargo.lock patch(hermes): improve ws reliability 2023-10-05 16:00:48 +02:00
Cargo.toml patch(hermes): improve ws reliability 2023-10-05 16:00:48 +02:00
Dockerfile fix(hermes): fix rust version 2023-07-27 18:31:42 +03:30
README.md chore(hermes): bump major version 2023-09-28 17:16:54 +02:00
buf.gen.yaml [hermes] Rename from price service and add README. (#705) 2023-03-21 14:36:13 +00:00
build.rs [hermes] add utoipa for API docs (#990) 2023-07-27 11:29:56 -07:00
go.mod feat(hermes): add datadog profiling 2023-09-01 11:58:43 +01:00
go.sum feat(hermes): add datadog profiling 2023-09-01 11:58:43 +01:00
rust-toolchain fix(hermes): fix rust version 2023-07-27 18:31:42 +03:30
shell.nix fix(hermes): fix slot metadata bug 2023-09-20 11:37:05 +02:00

README.md

Hermes

Hermes is a web service designed to monitor both Pythnet and the Wormhole Network for the next generation of Pyth price updates. It supersedes the Pyth Price Service, offering these updates through a user-friendly web API. The service facilitates easy querying for recent price updates via a REST API, as well as provides the option to subscribe to a websocket for real-time updates. Hermes maintains compatibility with the price service API, allowing the Price Service JS client to seamlessly connect to an instance of Hermes and fetch on-demand price updates.

Getting Started

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

  1. Install Rust nightly-2023-07-23: If you haven't already, you'll need to install Rust. You can do so by following the official instructions. Then, run the following command to install the required nightly version of Rust:

     rustup toolchain install nightly-2023-07-23
    
  2. Install Go: If you haven't already, you'll also need to install Go. You can do so by following the official instructions. If you are on a Mac with M series chips, make sure to install the arm64 version of Go.

  3. Clone the repository: Clone the Pyth Crosschain repository to your local machine using the following command:

    git clone https://github.com/pyth-network/pyth-crosschain.git
    
  4. Build the project: Navigate to the project directory and run the following command to build the project:

    cd hermes
    cargo build --release
    

    This will create a binary in the target/release directory.

  5. Run the node: To run Hermes for Pythnet, use the following command:

    ./target/release/hermes run \
      --pythnet-http-addr https://pythnet-rpc/ \
      --pythnet-ws-addr wss://pythnet-rpc/
    

    Your Hermes node will now start and connect to the specified networks. You can interact with the node using the REST and Websocket APIs on port 33999.

    For local development, you can also run the node with cargo watch to restart it automatically when the code changes:

    cargo watch -w src -x "run -- run --pythnet-http-addr https://pythnet-rpc/ --pythnet-ws-addr wss://pythnet-rpc/"