From fa01a3b0c7565227eae6b2084df9bdc71190566c Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Thu, 5 Oct 2023 19:32:45 +0200 Subject: [PATCH] feat(hermes): add ws whitelist config --- charts/hermes/Chart.yaml | 4 ++-- charts/hermes/README.md | 3 ++- charts/hermes/templates/deployment.yaml | 4 ++++ charts/hermes/values.yaml | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/charts/hermes/Chart.yaml b/charts/hermes/Chart.yaml index 0b21b0a..597b5ff 100644 --- a/charts/hermes/Chart.yaml +++ b/charts/hermes/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: hermes description: Pyth cross-chain server type: application -version: 0.2.1 -appVersion: v0.2.0 +version: 0.2.2 +appVersion: v0.2.1 diff --git a/charts/hermes/README.md b/charts/hermes/README.md index daa14d2..539cfa9 100644 --- a/charts/hermes/README.md +++ b/charts/hermes/README.md @@ -1,6 +1,6 @@ # hermes -![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.2.0](https://img.shields.io/badge/AppVersion-v0.2.0-informational?style=flat-square) +![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.2.1](https://img.shields.io/badge/AppVersion-v0.2.1-informational?style=flat-square) Pyth cross-chain server @@ -15,6 +15,7 @@ Pyth cross-chain server | hermes.logLevel | string | `"warn"` | Hermes log level. Valid values are: trace, debug, info, warn, error | | hermes.pythnetHttpAddr | string | `nil` | Pythnet Http RPC address. Must be set. Example: http://localhost:8899 | | hermes.pythnetWsAddr | string | `nil` | Pythnet Websocket RPC address. Must be set. Example: ws://localhost:8900 | +| hermes.rpcWsWhitelist | string | `nil` | Whitelisted ip network addresses (in CIDR notation) against websocket ratelimit (separated by comma). Example: 1.2.0.0/24, | | hermes.wormholeBootstrapAddrs | string | `"/dns4/wormhole-mainnet-v2-bootstrap.certus.one/udp/8999/quic/p2p/12D3KooWQp644DK27fd3d4Km3jr7gHiuJJ5ZGmy8hH4py7fP4FP7,/dns4/wormhole-v2-mainnet-bootstrap.xlabs.xyz/udp/8999/quic/p2p/12D3KooWNQ9tVrcb64tw6bNs2CaNrUGPM7yRrKvBBheQ5yCyPHKC"` | Wormhole bootstrap addresses | | hermes.wormholeContractAddr | string | `"H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"` | Wormhole contract address | | hermes.wormholeNetworkId | string | `"/wormhole/mainnet/2"` | Wormhole network id | diff --git a/charts/hermes/templates/deployment.yaml b/charts/hermes/templates/deployment.yaml index 1ef5d5f..c569bd8 100644 --- a/charts/hermes/templates/deployment.yaml +++ b/charts/hermes/templates/deployment.yaml @@ -37,6 +37,10 @@ spec: - {{ required "hermes.pythnetWsAddr is required" .Values.hermes.pythnetWsAddr }} - --rpc-listen-addr - 0.0.0.0:8080 + {{- if .Values.hermes.rpcWsWhitelist }} + - --rpc-ws-whitelist + - {{ .Values.hermes.rpcWsWhitelist }} + {{- end }} - --wormhole-bootstrap-addrs - {{ .Values.hermes.wormholeBootstrapAddrs }} - --wormhole-network-id diff --git a/charts/hermes/values.yaml b/charts/hermes/values.yaml index 8645821..178b010 100644 --- a/charts/hermes/values.yaml +++ b/charts/hermes/values.yaml @@ -14,6 +14,9 @@ hermes: # -- Benchmarks endpoint. endpoint: https://benchmarks.pyth.network + # -- Whitelisted ip network addresses (in CIDR notation) against websocket ratelimit (separated by comma). Example: 1.2.0.0/24, + rpcWsWhitelist: + # -- Wormhole bootstrap addresses wormholeBootstrapAddrs: /dns4/wormhole-mainnet-v2-bootstrap.certus.one/udp/8999/quic/p2p/12D3KooWQp644DK27fd3d4Km3jr7gHiuJJ5ZGmy8hH4py7fP4FP7,/dns4/wormhole-v2-mainnet-bootstrap.xlabs.xyz/udp/8999/quic/p2p/12D3KooWNQ9tVrcb64tw6bNs2CaNrUGPM7yRrKvBBheQ5yCyPHKC # -- Wormhole network id