You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`log-writer`|`stderr`| Output method for logs (`stderr`, `console`) |
198
+
|`stream-limit`|`10`| Rate-limit for client events sent per second |
199
+
|`rate-limit`|`50`| Requests per second limit for clients over any protocol (ws/http) |
200
+
|`address-header`|`""`| Header for client IP when server is behind a proxy |
201
+
|`heartbeat-interval`|`100`| Interval for AN event subscription heartbeats |
202
+
|`stream-timeout`|`3`| Timeout in seconds for sending events to clients |
203
+
|`force-start-height`|`0`| Force-set starting Cadence height (local/testing use only) |
204
+
|`wallet-api-key`|`""`| ECDSA private key for wallet APIs (local/testing use only) |
205
+
|`filter-expiry`|`5m`| Expiry time for idle filters |
206
+
|`traces-gcp-bucket`|`""`| GCP bucket name for transaction traces |
207
+
|`prometheus-config-file-path`|`./metrics/prometheus.yml`| Path to the Prometheus configuration file |
208
+
|`index-only`|`false`| Run in index-only mode, allowing state queries and indexing but no transaction sending |
209
+
|`profiler-enabled`|`false`| Enable the pprof profiler server |
210
+
|`profiler-host`|`localhost`| Host for the pprof profiler |
211
+
|`profiler-port`|`6060`| Port for the pprof profiler |
209
212
210
213
# Deploying
211
214
Deploying the EVM Gateway node comes with some prerequisites as well as expectations and they are best explained in the WIP document: https://flowfoundation.notion.site/EVM-Gateway-Deployment-3c41da6710af40acbaf971e22ce0a9fd
@@ -252,6 +255,25 @@ The EVM Gateway implements APIs according to the Ethereum specification: https:/
252
255
- Access Lists: we don't yet support creating access lists as they don't affect the fees we charge. We might support this in the future
253
256
to optimize fees, but it currently is not part of our priorities.
254
257
258
+
# Debugging
259
+
260
+
## Profiler
261
+
262
+
The EVM Gateway supports profiling via the `pprof` package. To enable profiling, add the following flags to the command line:
263
+
```
264
+
--profiler-enabled=true
265
+
--profiler-host=localhost
266
+
--profiler-port=6060
267
+
```
268
+
269
+
This will start a pprof server on the provided `host` and `port`. You can generate profiles using the following `go tool` commands
270
+
```
271
+
go tool pprof -http :2000 http://localhost:6060/debug/pprof/profile
flag.StringVar(&walletKey, "wallet-api-key", "", "ECDSA private key used for wallet APIs. WARNING: This should only be used locally or for testing, never in production.")
160
166
flag.IntVar(&cfg.MetricsPort, "metrics-port", 9091, "Port for the metrics server")
161
167
flag.BoolVar(&cfg.IndexOnly, "index-only", false, "Run the gateway in index-only mode which only allows querying the state and indexing, but disallows sending transactions.")
168
+
flag.BoolVar(&cfg.ProfilerEnabled, "profiler-enabled", false, "Run the profiler server to capture pprof data.")
169
+
flag.StringVar(&cfg.ProfilerHost, "profiler-host", "localhost", "Host for the Profiler server")
170
+
flag.IntVar(&cfg.ProfilerPort, "profiler-port", 6060, "Port for the Profiler server")
0 commit comments