Skip to content

Commit 85f53c5

Browse files
feat(proxyd): add eth_blobBaseFee, improve config options (#563)
1 parent 42cc269 commit 85f53c5

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

charts/proxyd/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.6.14
18+
version: 0.6.15
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/proxyd/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Deploy and scale [proxyd](https://github.com/ethereum-optimism/infra/tree/main/proxyd) inside Kubernetes with ease
44

5-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.6.14](https://img.shields.io/badge/Version-0.6.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.18.0](https://img.shields.io/badge/AppVersion-v4.18.0-informational?style=flat-square)
5+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.6.15](https://img.shields.io/badge/Version-0.6.15-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.18.0](https://img.shields.io/badge/AppVersion-v4.18.0-informational?style=flat-square)
66

77
## Introduction
88

@@ -128,12 +128,16 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
128128
|-----|-------------|------|---------|
129129
| backendConfigTemplate | TOML configuration for backend | string | `"# How long proxyd should wait for a backend response before timing out.\nresponse_timeout_seconds = 300\n# Maximum response size, in bytes, that proxyd will accept from a backend.\nmax_response_size_bytes = 10737420000 # 10 GiB\n# Maximum number of times proxyd will try a backend before giving up.\nmax_retries = 3\n# Number of seconds to wait before trying an unhealthy backend again.\nout_of_service_seconds = 10\n"` |
130130
| backendGroups.routing_strategy | Set the routing strategy (consensus_aware \| multicall \| fallback) | string | `"consensus_aware"` |
131-
| backends.example-backend | Example backend configuration, keep disabled | object | `{"enabled":false,"extraConfig":{},"groups":["main"],"rpcUrl":"http://your-node:8545","wsUrl":"ws://your-node:8545"}` |
131+
| backendGroups.weighted_routing | Enable weighted routing | bool | `true` |
132+
| backends.example-backend | Example backend configuration, keep disabled | object | `{"enabled":false,"extraConfig":{},"groups":["main"],"rpcUrl":"http://your-node:8545","weight":1,"wsUrl":"ws://your-node:8545"}` |
132133
| backends.example-backend.enabled | Enable the backend | bool | `false` |
133134
| backends.example-backend.extraConfig | Define additional configuration keys for the backend (see [proxyd config](https://github.com/ethereum-optimism/optimism/blob/5d309e6a6d5e1ef6a88c1ce827b7e6d47f033bbb/proxyd/example.config.toml#L47)) | object | `{}` |
134135
| backends.example-backend.groups | Define which backend groups the backend is part of | list | `["main"]` |
135136
| backends.example-backend.rpcUrl | Define the JSON-RPC URL for the backend | string | `"http://your-node:8545"` |
137+
| backends.example-backend.weight | Define an weight for weighted routing | int | `1` |
136138
| backends.example-backend.wsUrl | Define the JSON-RPC Websocket URL for the backend | string | `"ws://your-node:8545"` |
139+
| batchConfigTemplate | TOML configuration for batch | string | `"# Set maximum batch size (hard limit of 1000)\nmax_size = {{ .Values.batchMaxSize }}\n"` |
140+
| batchMaxSize | Max batch size (hard limit is 1000) | int | `250` |
137141
| cacheConfigTemplate | TOML configuration for cache | string | `"# Whether or not to enable caching.\nenabled = {{ .Values.cacheEnabled }}\n"` |
138142
| cacheEnabled | Enable caching | bool | `false` |
139143
| configTemplate | The configuration template that is rendered by Helm | string | See default template in [values.yaml](values.yaml) |
@@ -172,7 +176,7 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
172176
| redisEnabled | Enable configuring Redis | bool | `false` |
173177
| redisNamespace | Redis namespace to use for keys | string | `""` |
174178
| redisUrl | URL to a Redis instance | string | `""` |
175-
| rpcMethodMappings | Mapping JSON-RPC method name to a particular group of backends (method_name -> group_name) | object | `{"eth_blockNumber":"main","eth_call":"main","eth_chainId":"main","eth_coinbase":"main","eth_estimateGas":"main","eth_feeHistory":"main","eth_gasPrice":"main","eth_getBalance":"main","eth_getBlockByHash":"main","eth_getBlockByNumber":"main","eth_getBlockReceipts":"main","eth_getBlockTransactionCountByHash":"main","eth_getBlockTransactionCountByNumber":"main","eth_getCode":"main","eth_getFilterChanges":"main","eth_getLogs":"main","eth_getStorageAt":"main","eth_getTransactionByBlockHashAndIndex":"main","eth_getTransactionByBlockNumberAndIndex":"main","eth_getTransactionByHash":"main","eth_getTransactionCount":"main","eth_getTransactionReceipt":"main","eth_getUncleByBlockHashAndIndex":"main","eth_getUncleByBlockNumberAndIndex":"main","eth_newBlockFilter":"main","eth_newFilter":"main","eth_newPendingTransactionFilter":"main","eth_protocolVersion":"main","eth_sendRawTransaction":"main","eth_sendTransaction":"main","eth_sign":"main","eth_syncing":"main","eth_uninstallFilter":"main","net_peerCount":"main","net_version":"main","trace_block":"main","trace_call":"main","trace_callMany":"main","trace_filter":"main","trace_rawTransaction":"main","trace_replayBlockTransactions":"main","trace_replayTransaction":"main","trace_transaction":"main","web3_clientVersion":"main","web3_sha3":"main"}` |
179+
| rpcMethodMappings | Mapping JSON-RPC method name to a particular group of backends (method_name -> group_name) | object | `{"eth_blobBaseFee":"main","eth_blockNumber":"main","eth_call":"main","eth_chainId":"main","eth_coinbase":"main","eth_estimateGas":"main","eth_feeHistory":"main","eth_gasPrice":"main","eth_getBalance":"main","eth_getBlockByHash":"main","eth_getBlockByNumber":"main","eth_getBlockReceipts":"main","eth_getBlockTransactionCountByHash":"main","eth_getBlockTransactionCountByNumber":"main","eth_getCode":"main","eth_getFilterChanges":"main","eth_getLogs":"main","eth_getStorageAt":"main","eth_getTransactionByBlockHashAndIndex":"main","eth_getTransactionByBlockNumberAndIndex":"main","eth_getTransactionByHash":"main","eth_getTransactionCount":"main","eth_getTransactionReceipt":"main","eth_getUncleByBlockHashAndIndex":"main","eth_getUncleByBlockNumberAndIndex":"main","eth_newBlockFilter":"main","eth_newFilter":"main","eth_newPendingTransactionFilter":"main","eth_protocolVersion":"main","eth_sendRawTransaction":"main","eth_sendTransaction":"main","eth_sign":"main","eth_syncing":"main","eth_uninstallFilter":"main","net_peerCount":"main","net_version":"main","trace_block":"main","trace_call":"main","trace_callMany":"main","trace_filter":"main","trace_rawTransaction":"main","trace_replayBlockTransactions":"main","trace_replayTransaction":"main","trace_transaction":"main","web3_clientVersion":"main","web3_sha3":"main"}` |
176180
| serverConfigTemplate | TOML configuration for server | string | `"# Host for the proxyd RPC server to listen on\nrpc_host = \"0.0.0.0\"\n# Port for the above.\nrpc_port = 8545\n# Host for the proxyd WebSocket server to listen on\nws_host = \"0.0.0.0\"\n# Port for the above.\nws_port = 8546\n# Maximum client body size, in bytes, that the server will accept\nmax_body_size_bytes = 10737420000 # 10 GiB\n# Maximum number of concurrent RPCs that the server will accept\nmax_concurrent_rpcs = 0 # unlimited\n# Timeout for requests\ntimeout_seconds = 300\n"` |
177181
| serviceAccount.annotations | Annotations to add to the service account | object | `{}` |
178182
| serviceAccount.create | Specifies whether a service account should be created | bool | `true` |

charts/proxyd/values.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ backends:
115115
rpcUrl: http://your-node:8545
116116
# -- Define the JSON-RPC Websocket URL for the backend
117117
wsUrl: ws://your-node:8545
118+
# -- Define an weight for weighted routing
119+
weight: 1
118120
# -- Define additional configuration keys for the backend (see [proxyd config](https://github.com/ethereum-optimism/optimism/blob/5d309e6a6d5e1ef6a88c1ce827b7e6d47f033bbb/proxyd/example.config.toml#L47))
119121
extraConfig: {}
120122
# -- Define which backend groups the backend is part of
@@ -125,6 +127,8 @@ backends:
125127
backendGroups:
126128
# -- Set the routing strategy (consensus_aware \| multicall \| fallback)
127129
routing_strategy: consensus_aware
130+
# -- Enable weighted routing
131+
weighted_routing: true
128132

129133
# -- Mapping JSON-RPC method name to a particular group of backends (method_name -> group_name)
130134
rpcMethodMappings:
@@ -139,6 +143,7 @@ rpcMethodMappings:
139143
eth_feeHistory: main
140144
eth_gasPrice: main
141145
eth_blockNumber: main
146+
eth_blobBaseFee: main
142147
eth_getBalance: main
143148
eth_getStorageAt: main
144149
eth_getTransactionCount: main
@@ -190,6 +195,9 @@ redisNamespace: ""
190195
# -- Enable caching
191196
cacheEnabled: false
192197

198+
# -- Max batch size (hard limit is 1000)
199+
batchMaxSize: 250
200+
193201
# -- TOML configuration for server
194202
serverConfigTemplate: |
195203
# Host for the proxyd RPC server to listen on
@@ -245,7 +253,12 @@ redisConfigTemplate: |
245253
url = {{ .Values.redisUrl | quote }}
246254
# Redis namespace to use for keys.
247255
namespace = {{ .Values.redisNamespace | quote }}
248-
256+
257+
# -- TOML configuration for batch
258+
batchConfigTemplate: |
259+
# Set maximum batch size (hard limit of 1000)
260+
max_size = {{ .Values.batchMaxSize }}
261+
249262
# -- The configuration template that is rendered by Helm
250263
# @default -- See default template in [values.yaml](values.yaml)
251264
configTemplate: |
@@ -269,6 +282,7 @@ configTemplate: |
269282
rpc_url = {{ default "" $backendValues.rpcUrl | quote }}
270283
ws_url = {{ default "ws://dummy-host-ws-disabled" $backendValues.wsUrl | quote }}
271284
max_rps = {{ default 0 $backendValues.maxRps }}
285+
weight = {{ default 1 $backendValues.weight }}
272286
{{- with $backendValues.extraConfig }}
273287
{{ toToml . }}
274288
{{- end }}
@@ -292,3 +306,6 @@ configTemplate: |
292306
[redis]
293307
{{ tpl .Values.redisConfigTemplate $ }}
294308
{{- end }}
309+
310+
[batch]
311+
{{ tpl .Values.batchConfigTemplate $ }}

0 commit comments

Comments
 (0)