From b39e652ea543f0d0e7727c525ca9346e002e18c1 Mon Sep 17 00:00:00 2001 From: LordGhostX Date: Fri, 17 May 2024 16:03:01 +0100 Subject: [PATCH] update juno configs --- docs/docs/_config-options.md | 29 ++++++++++++++--------------- docs/docs/introduction.md | 2 +- docs/docs/monitoring.md | 12 ++++++------ docs/docs/running-juno.md | 2 +- docs/docs/updating.md | 2 +- docs/generate-config.js | 8 +------- 6 files changed, 24 insertions(+), 31 deletions(-) diff --git a/docs/docs/_config-options.md b/docs/docs/_config-options.md index 706801ff3e..6f07b110d8 100644 --- a/docs/docs/_config-options.md +++ b/docs/docs/_config-options.md @@ -9,27 +9,26 @@ | `cn-l2-chain-id` | | Custom network L2 chain id | | `cn-name` | | Custom network name | | `cn-unverifiable-range` | `[]` | Custom network range of blocks to skip hash verifications (e.g. `0,100`) | -| `colour` | `true` | Uses --colour=false command to disable colourized outputs (ANSI Escape Codes) | -| `config` | | The yaml configuration file | +| `colour` | `true` | Use `--colour=false` command to disable colourized outputs (ANSI Escape Codes) | +| `config` | | The YAML configuration file | | `db-cache-size` | `8` | Determines the amount of memory (in megabytes) allocated for caching data in the database | | `db-max-handles` | `1024` | A soft limit on the number of open files that can be used by the DB | | `db-path` | `juno` | Location of the database files | -| `eth-node` | | Websocket endpoint of the Ethereum node. In order to verify the correctness of the L2 chain, Juno must connect to an Ethereum node and parse events in the Starknet contract | -| `grpc` | `false` | Enable the HTTP GRPC server on the default port | -| `grpc-host` | `localhost` | The interface on which the GRPC server will listen for requests | -| `grpc-port` | `6064` | The port on which the GRPC server will listen for requests | +| `eth-node` | | WebSocket endpoint of the Ethereum node. To verify the correctness of the L2 chain, Juno must connect to an Ethereum node and parse events in the Starknet contract | +| `grpc` | `false` | Enable the HTTP gRPC server on the default port | +| `grpc-host` | `localhost` | The interface on which the gRPC server will listen for requests | +| `grpc-port` | `6064` | The port on which the gRPC server will listen for requests | | `gw-api-key` | | API key for gateway endpoints to avoid throttling | | `gw-timeout` | `5` | Timeout for requests made to the gateway | -| `help` | | help for Juno | | `http` | `false` | Enables the HTTP RPC server on the default port and interface | | `http-host` | `localhost` | The interface on which the HTTP RPC server will listen for requests | | `http-port` | `6060` | The port on which the HTTP server will listen for requests | -| `log-level` | `info` | Options: debug, info, warn, error | -| `max-vm-queue` | | Maximum number for requests to queue after reaching max-vms before starting to reject incoming requets. Default is set to double the value of `max-vms` | +| `log-level` | `info` | Options: trace, debug, info, warn, error | +| `max-vm-queue` | | Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests. Default is set to double the value of `max-vms` | | `max-vms` | | Maximum number for VM instances to be used for RPC calls concurrently. Default is set to three times the number of CPU cores | -| `metrics` | `false` | Enables the prometheus metrics endpoint on the default port | -| `metrics-host` | `localhost` | The interface on which the prometheus endpoint will listen for requests | -| `metrics-port` | `9090` | The port on which the prometheus endpoint will listen for requests | +| `metrics` | `false` | Enables the Prometheus metrics endpoint on the default port | +| `metrics-host` | `localhost` | The interface on which the Prometheus endpoint will listen for requests | +| `metrics-port` | `9090` | The port on which the Prometheus endpoint will listen for requests | | `network` | `mainnet` | Options: mainnet, sepolia, sepolia-integration | | `p2p` | `false` | EXPERIMENTAL: Enables p2p server | | `p2p-addr` | | EXPERIMENTAL: Specify p2p source address as multiaddr | @@ -44,6 +43,6 @@ | `rpc-call-max-steps` | `4000000` | Maximum number of steps to be executed in starknet_call requests | | `rpc-cors-enable` | `false` | Enable CORS on RPC endpoints | | `rpc-max-block-scan` | `18446744073709551615` | Maximum number of blocks scanned in single starknet_getEvents call | -| `ws` | `false` | Enables the Websocket RPC server on the default port | -| `ws-host` | `localhost` | The interface on which the Websocket RPC server will listen for requests | -| `ws-port` | `6061` | The port on which the websocket server will listen for requests | +| `ws` | `false` | Enables the WebSocket RPC server on the default port | +| `ws-host` | `localhost` | The interface on which the WebSocket RPC server will listen for requests | +| `ws-port` | `6061` | The port on which the WebSocket server will listen for requests | diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 2bc94932bf..aef2710569 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -11,7 +11,7 @@ Juno is a Starknet full-node client developed by Nethermind to allow node operat - :zap: **Ultra-fast synchronisation**: Limited only by your hardware and the sequencer. - :100: **Complete [JSON-RPC spec](https://github.com/starkware-libs/starknet-specs/tree/master) compliance**: Everything Starknet, accessible from a single point. - :racing_car: **Minimal RPC response latency**: Ensuring your applications run smoothly. -- :globe_with_meridians: **Websocket interface**: For seamless real-time updates. +- :globe_with_meridians: **Websocket interface**: For seamless real-time updates of the network. ## Getting started diff --git a/docs/docs/monitoring.md b/docs/docs/monitoring.md index e9efe2f3bd..4dba47c6bd 100644 --- a/docs/docs/monitoring.md +++ b/docs/docs/monitoring.md @@ -10,9 +10,9 @@ Juno uses [Prometheus](https://prometheus.io/) to monitor and collect metrics da To enable the metrics server, use the following configuration options: -- `metrics`: Enables the prometheus metrics endpoint on the default port (disabled by default). -- `metrics-host`: The interface on which the prometheus endpoint will listen for requests. If skipped, it defaults to `localhost`. -- `metrics-port`: The port on which the prometheus endpoint will listen for requests. If skipped, it defaults to `9090`. +- `metrics`: Enables the Prometheus metrics endpoint on the default port (disabled by default). +- `metrics-host`: The interface on which the Prometheus endpoint will listen for requests. If skipped, it defaults to `localhost`. +- `metrics-port`: The port on which the Prometheus endpoint will listen for requests. If skipped, it defaults to `9090`. ```bash # Docker container @@ -32,7 +32,7 @@ docker run -d \ ### 1. Set up Grafana -Follow the [Set up Grafana](https://grafana.com/docs/grafana/latest/setup-grafana/) guide to set up Grafana locally. You also need to download and [configure](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#configuration-file-location) the [Grafana dashboard file](/juno_grafana.json). +Follow the [Set up Grafana](https://grafana.com/docs/grafana/latest/setup-grafana/) guide to set up Grafana. You also need to download and [configure](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#configuration-file-location) the [Grafana dashboard file](/juno_grafana.json). ### 2. Set up Prometheus @@ -47,9 +47,9 @@ scrape_configs: ### 3. Set up Grafana Loki -Follow the [Get started with Grafana Loki](https://grafana.com/docs/loki/latest/get-started/) guide to set up [Loki](https://grafana.com/oss/loki/) locally. Then, you need to set up Loki to [collect logs](https://grafana.com/docs/loki/latest/send-data/) from Juno. +Follow the [Get started with Grafana Loki](https://grafana.com/docs/loki/latest/get-started/) guide to set up [Loki](https://grafana.com/oss/loki/). Then, you need to configure Loki to [collect logs](https://grafana.com/docs/loki/latest/send-data/) from Juno. -You might need to configure log paths or use [Promtail](https://grafana.com/docs/loki/latest/send-data/promtail/) (Loki's agent) to push logs to Loki: +You might need to configure log paths or use [Promtail](https://grafana.com/docs/loki/latest/send-data/promtail/) (Loki's agent) to send logs to Loki: ```yaml title="Sample Loki Configuration" showLineNumbers scrape_configs: diff --git a/docs/docs/running-juno.md b/docs/docs/running-juno.md index a6b783c21a..0a31693a88 100644 --- a/docs/docs/running-juno.md +++ b/docs/docs/running-juno.md @@ -61,7 +61,7 @@ docker logs -f juno ## Standalone binary -Download standalone binaries from [Juno's GitHub Releases](https://github.com/NethermindEth/juno/tags) as ZIP archives for Linux (amd64 and arm64) and macOS (amd64). +Download standalone binaries from [Juno's GitHub Releases](https://github.com/NethermindEth/juno/releases) as ZIP archives for Linux (amd64 and arm64) and macOS (amd64). For macOS (arm64) or Windows users, consider [running Juno using Docker](#docker-container). diff --git a/docs/docs/updating.md b/docs/docs/updating.md index 0ad9e6fc28..f01194c868 100644 --- a/docs/docs/updating.md +++ b/docs/docs/updating.md @@ -56,7 +56,7 @@ docker logs juno ## Standalone binary -Download the latest binary from [Juno's GitHub Releases](https://github.com/NethermindEth/juno/tags) page and replace the existing one. +Download the latest binary from [Juno's GitHub Releases](https://github.com/NethermindEth/juno/releases) page and replace the existing one. ## Updating from source diff --git a/docs/generate-config.js b/docs/generate-config.js index 635e33a5fe..504e2d5413 100644 --- a/docs/generate-config.js +++ b/docs/generate-config.js @@ -48,13 +48,7 @@ const extractConfigs = (codebase) => { // Pattern to find flags used in Juno's command-line configurations const flagPattern = /junoCmd\.Flags\(\)\.[A-Za-z\d]+\((.*)\)/g; const argsPattern = /([^\s,]+)/g; - const configs = [ - { - configName: "help", - defaultValue: "", - description: "help for Juno", - }, - ]; + const configs = []; while ((match = flagPattern.exec(codebase)) !== null) { const flags = match[1];