From 0252e9b9fed25f9f5380d1cc0f01ed58eea11be5 Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Fri, 19 Dec 2025 12:15:09 +0530 Subject: [PATCH 1/3] readme for hip-3 pusher --- apps/hip-3-pusher/.gitignore | 1 + apps/hip-3-pusher/README.md | 63 +++++++++++++++++++++ apps/hip-3-pusher/config/config.sample.toml | 10 ++++ 3 files changed, 74 insertions(+) diff --git a/apps/hip-3-pusher/.gitignore b/apps/hip-3-pusher/.gitignore index 505a3b1ca2..fd41f304a2 100644 --- a/apps/hip-3-pusher/.gitignore +++ b/apps/hip-3-pusher/.gitignore @@ -8,3 +8,4 @@ wheels/ # Virtual environments .venv +config/config.toml \ No newline at end of file diff --git a/apps/hip-3-pusher/README.md b/apps/hip-3-pusher/README.md index a01318e641..715aff4e66 100644 --- a/apps/hip-3-pusher/README.md +++ b/apps/hip-3-pusher/README.md @@ -7,3 +7,66 @@ Currently it: - Sources market data from Hyperliquid, Pyth Lazer, and Pythnet - Supports KMS for signing oracle updates - Provides telemetry to Pyth's internal observability system + +## Prerequisites +#### Required Software +- Python 3.13 (required) +- [uv](https://docs.astral.sh/uv/) +- Hyperliquid wallet +- Docker (optional, for containerized deployment) + +#### Required Accounts & Keys +- Hyperliquid Account: An Ethereum-style private key for the oracle pusher account +- API Keys: + - Pyth Pro API key (for Pro price feeds) + - SEDA API key (optional, if using SEDA feeds) +- AWS KMS (optional): For secure key management if using KMS signing + +## Configuration + +Create a configuration file by copying the sample: + +```bash +cp config/config.sample.toml config/config.toml +# Edit config.toml with your settings + +- Update Hyperliquid `oracle_pusher_key_path`, feed IDs, and URLs. +- Set `enable_publish = true` once you are ready to send real updates. +- If using KMS, set `kms.enable_kms = true` and provide `aws_kms_key_id_path`. +- If using multisig, set `multisig.enable_multisig = true` and `multisig_address`. + +``` + +## SetUp + +### Method 1: Using uv (Recommended) +```bash +# Install uv +curl -LsSf https://astral.sh/uv/install.sh | sh + +cd apps/hip-3-pusher + +# Install dependencies +uv sync + +uv run -m pusher.main -c config/config.toml + +# Set custom log level +LOG_LEVEL=DEBUG uv run -m pusher.main -c config/config.toml +``` + +### Method 2: Using Docker + +```bash +cd apps/hip-3-pusher + +# Build from the repository root +docker build -f Dockerfile -t hip-3-pusher . + +# Run the container +docker run --rm \ + -p 9090:9090 \ + -v "$(pwd)/apps/hip-3-pusher/config/config.toml:/app/config/config.toml" \ + hip-3-pusher +``` + diff --git a/apps/hip-3-pusher/config/config.sample.toml b/apps/hip-3-pusher/config/config.sample.toml index f9b9f45bf4..e26c6fb25d 100644 --- a/apps/hip-3-pusher/config/config.sample.toml +++ b/apps/hip-3-pusher/config/config.sample.toml @@ -30,6 +30,16 @@ feed_ids = [ "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b" # USDT ] +[seda] +# Optional: SEDA is enabled only when `feeds` is non-empty. +# This section is still required for config validation. +url = "https://example.com/seda/endpoint" +api_key_path = "/path/to/seda_api_key.txt" +poll_interval = 5.0 +poll_failure_interval = 5.0 +poll_timeout = 5.0 +feeds = {} + [price.oracle] BTC = [ { source_type = "single", source = { source_name = "hl_oracle", source_id = "BTC" } }, From fa88e1b02c4a12e607580220ce828b26424f42b9 Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Fri, 19 Dec 2025 12:29:45 +0530 Subject: [PATCH 2/3] nits for the instruction --- apps/hip-3-pusher/.gitignore | 4 +++- apps/hip-3-pusher/README.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/hip-3-pusher/.gitignore b/apps/hip-3-pusher/.gitignore index fd41f304a2..e967f900cb 100644 --- a/apps/hip-3-pusher/.gitignore +++ b/apps/hip-3-pusher/.gitignore @@ -8,4 +8,6 @@ wheels/ # Virtual environments .venv -config/config.toml \ No newline at end of file + +# Config files +config/config.toml diff --git a/apps/hip-3-pusher/README.md b/apps/hip-3-pusher/README.md index 715aff4e66..833337629d 100644 --- a/apps/hip-3-pusher/README.md +++ b/apps/hip-3-pusher/README.md @@ -27,6 +27,7 @@ Currently it: Create a configuration file by copying the sample: ```bash +cd apps/hip-3-pusher cp config/config.sample.toml config/config.toml # Edit config.toml with your settings From a28cc76f9af87618149e8d7299518db33dcb935c Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Mon, 22 Dec 2025 11:54:15 +0530 Subject: [PATCH 3/3] add oracle updater private key and revert changes to config toml --- apps/hip-3-pusher/README.md | 5 ++++- apps/hip-3-pusher/config/config.sample.toml | 10 ---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/apps/hip-3-pusher/README.md b/apps/hip-3-pusher/README.md index 833337629d..1c48ad1d33 100644 --- a/apps/hip-3-pusher/README.md +++ b/apps/hip-3-pusher/README.md @@ -67,7 +67,10 @@ docker build -f Dockerfile -t hip-3-pusher . # Run the container docker run --rm \ -p 9090:9090 \ - -v "$(pwd)/apps/hip-3-pusher/config/config.toml:/app/config/config.toml" \ + -v "$(pwd)/config/config.toml:/app/config/config.toml" \ + -v "/path/to/oracle_pusher_key.txt:/private-key.txt" \ hip-3-pusher ``` +Make sure to update `oracle_pusher_key_path` in your `config.toml` to match the mounted path (e.g., `/private-key.txt`). + diff --git a/apps/hip-3-pusher/config/config.sample.toml b/apps/hip-3-pusher/config/config.sample.toml index e26c6fb25d..f9b9f45bf4 100644 --- a/apps/hip-3-pusher/config/config.sample.toml +++ b/apps/hip-3-pusher/config/config.sample.toml @@ -30,16 +30,6 @@ feed_ids = [ "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b" # USDT ] -[seda] -# Optional: SEDA is enabled only when `feeds` is non-empty. -# This section is still required for config validation. -url = "https://example.com/seda/endpoint" -api_key_path = "/path/to/seda_api_key.txt" -poll_interval = 5.0 -poll_failure_interval = 5.0 -poll_timeout = 5.0 -feeds = {} - [price.oracle] BTC = [ { source_type = "single", source = { source_name = "hl_oracle", source_id = "BTC" } },