Skip to content

Commit

Permalink
docs (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyCharlesBlake authored Nov 30, 2024
1 parent 538e4e6 commit f5c0f04
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 25 deletions.
4 changes: 2 additions & 2 deletions charts/erpc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.1
version: 0.2.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.0.31
appVersion: 0.0.32

dependencies:
- name: redis
Expand Down
8 changes: 5 additions & 3 deletions charts/erpc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# erpc

![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: 0.0.31](https://img.shields.io/badge/AppVersion-0.0.31-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: 0.0.32](https://img.shields.io/badge/AppVersion-0.0.32-informational?style=flat-square)

A Helm chart for deploying eRPC — fault-tolerant evm rpc proxy with reorg-aware permanent caching to Kubernetes

Expand All @@ -23,8 +23,10 @@ A Helm chart for deploying eRPC — fault-tolerant evm rpc proxy with reorg-awar
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Enable autoscaling / HPA |
| env | list | `[{"name":"ROUTING_POLICY_MAX_ERROR_RATE","value":"0.7"},{"name":"ROUTING_POLICY_MAX_BLOCK_HEAD_LAG","value":"10"},{"name":"ROUTING_POLICY_MIN_HEALTHY_THRESHOLD","value":"1"}]` | create env vars from secrets, eg RPC provider API keys (eg, Blast API, DRPC, Infura, Alchemy, etc. ) |
| erpc.cacheConfig | object | `{"driver":"memory"}` | provides a DB backend for caching. must be one of `memory`, `redis`, or `postgresql`. ref: https://docs.erpc.cloud/config/database |
| env | object | `{}` | create env vars from secrets, eg RPC provider API keys (eg, Blast API, DRPC, Infura, Alchemy, etc. ) |
| erpc.cacheConfig | object | `{"connectors":[{"driver":"memory","id":"memory-cache","memory":{"maxItems":100000}}],"policies":[{"connector":"memory-cache","empty":"allow","finality":"finalized","method":"*","network":"*","ttl":0},{"connector":"memory-cache","empty":"ignore","finality":"unfinalized","method":"*","network":"*","ttl":"5s"},{"connector":"memory-cache","empty":"ignore","finality":"unknown","method":"*","network":"*","ttl":"10s"},{"connector":"memory-cache","driver":"memory","empty":"ignore","finality":"realtime","method":"*","network":"*","ttl":"2s"}]}` | provides a DB backend for caching. must be one of `memory`, `redis`, or `postgresql`. ref: https://docs.erpc.cloud/config/database/drivers |
| erpc.cacheConfig.connectors | list | `[{"driver":"memory","id":"memory-cache","memory":{"maxItems":100000}}]` | can provide multiple connectors |
| erpc.cacheConfig.policies | list | `[{"connector":"memory-cache","empty":"allow","finality":"finalized","method":"*","network":"*","ttl":0},{"connector":"memory-cache","empty":"ignore","finality":"unfinalized","method":"*","network":"*","ttl":"5s"},{"connector":"memory-cache","empty":"ignore","finality":"unknown","method":"*","network":"*","ttl":"10s"},{"connector":"memory-cache","driver":"memory","empty":"ignore","finality":"realtime","method":"*","network":"*","ttl":"2s"}]` | can provide multiple policies to work with all connectors configured |
| erpc.listenV4 | bool | `true` | |
| erpc.listenV6 | bool | `false` | |
| erpc.logLevel | string | `"info"` | Log level for eRPC. Must be one of `debug`, `info`, `warn`, `error`, `fatal`, or `panic`. |
Expand Down
65 changes: 45 additions & 20 deletions charts/erpc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ redis:
size: 8Gi

# -- create env vars from secrets, eg RPC provider API keys (eg, Blast API, DRPC, Infura, Alchemy, etc. )
env:
- name: ROUTING_POLICY_MAX_ERROR_RATE
value: "0.7"
- name: ROUTING_POLICY_MAX_BLOCK_HEAD_LAG
value: "10"
- name: ROUTING_POLICY_MIN_HEALTHY_THRESHOLD
value: "1"
env: {}
# - name: ROUTING_POLICY_MAX_ERROR_RATE
# value: "0.7"
# - name: ROUTING_POLICY_MAX_BLOCK_HEAD_LAG
# value: "10"
# - name: ROUTING_POLICY_MIN_HEALTHY_THRESHOLD
# value: "1"
# - name: DRPC_API_KEY
# valueFrom:
# secretKeyRef:
Expand All @@ -166,20 +166,45 @@ erpc:
metrics: true
# -- Log level for eRPC. Must be one of `debug`, `info`, `warn`, `error`, `fatal`, or `panic`.
logLevel: info
# -- provides a DB backend for caching. must be one of `memory`, `redis`, or `postgresql`. ref: https://docs.erpc.cloud/config/database
# -- provides a DB backend for caching. must be one of `memory`, `redis`, or `postgresql`. ref: https://docs.erpc.cloud/config/database/drivers
cacheConfig:
driver: memory
# driver: redis
# redis:
# addr: erpc-k8s-redis-headless:6379
# password: yourRedisSecret
# db: 0
# driver: postgresql
# postgresql:
# connectionUri: >-
# postgres://YOUR_USERNAME_HERE:[email protected]:5432/your_database_name
# table: rpc_cache

# -- can provide multiple connectors
connectors:
- id: memory-cache
driver: memory
memory:
maxItems: 100000
# -- can provide multiple policies to work with all connectors configured
policies:
# Example: Cache all methods with finalized data including empty responses
- network: "*"
method: "*"
finality: finalized
empty: allow
connector: memory-cache
ttl: 0
# Example: Cache unfinalized data only for 5 seconds (getLogs of a recent block) except empty responses
- network: "*"
method: "*"
finality: unfinalized
empty: ignore
connector: memory-cache
ttl: 5s
# Example: Cache unknown finalization data (eth_trace*) only for 10 seconds
- network: "*"
method: "*"
finality: unknown
empty: ignore
connector: memory-cache
ttl: 10s
# Example: Cache realtime data only for 2 seconds (eth_blockNumber, eth_gasPrice, etc) to reduce costs yet fresh enough data
- network: "*"
method: "*"
finality: realtime
empty: ignore
connector: memory-cache
ttl: 2s
driver: memory

# -- Projects define the networks and chains that eRPC will proxy for. ref: https://docs.erpc.cloud/config/projects
projects:
Expand Down

0 comments on commit f5c0f04

Please sign in to comment.