Skip to content

Commit 008c0c1

Browse files
authored
docs: version 0.16.0 (#3574)
* docs: version 0.16.0 * address feedback * regen docs
1 parent f365377 commit 008c0c1

25 files changed

Lines changed: 2296 additions & 11 deletions

docs/docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Check out the [Running Juno](running-juno) guide to learn the simplest and faste
2121
<details>
2222
<summary>What are the hardware requirements for running Juno?</summary>
2323

24-
We recommend running Juno with at least 4GB of RAM and 250GB of SSD storage. Check out the [Hardware Requirements](hardware-requirements) for more information.
24+
We recommend running Juno with at least 8GB of RAM. Check out the [Hardware Requirements](hardware-requirements) for more information.
2525

2626
</details>
2727

docs/docs/hardware-requirements.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@ title: Hardware Requirements
44

55
# Hardware Requirements :computer:
66

7-
Juno can be used either as part of a **validator** setup during Starkent staking v2 ([read more](https://nethermindeth.github.io/starknet-staking-v2/)) or as a **full node** serving RPC requests. Hardware requirements will vary depending on the intended usage.
7+
Juno can be used either as part of a **validator** setup during Starknet staking v2 ([read more](https://nethermindeth.github.io/starknet-staking-v2/)) or as a **full node** serving RPC requests. Hardware requirements will vary depending on the intended usage.
88

99
Each hardware component impacts different aspects of node performance:
10-
- **High-speed CPU cores** allow the node to execute Cairo-heavy RPC methods more quickly such as `starknet_traceTransaction` or `starknet_estimateFee`.
10+
11+
- **High-speed CPU cores** allow the node to execute Cairo-heavy RPC methods more quickly such as `starknet_traceTransaction` or `starknet_estimateFee`.
1112
- **Multiple CPU cores** (or threads) enable Juno to perform more tasks concurrently, which becomes especially important when serving a high volume of RPC requests.
1213
- **More RAM** reduces the likelihood of slowdowns when handling multiple data-intensive RPC requests.
13-
- **Fast SSD storage** significantly improves the overall node performance. Nearly all internal processes require reading data (for RPC purposes) and writing data (during syncing). Faster disk I/O directly translates into faster request handling and synchronization.
14+
- **Fast SSD storage** significantly improves the overall node performance. Nearly all internal processes require reading data (for RPC purposes) and writing data (during syncing). Faster disk I/O directly translates into faster request handling and synchronization.
1415

1516
:::tip
16-
Remember to always pair your hardware accordingly. Having a very powerful CPU will provide minimal improvements if paired with a disk with slow read and write speeds.
17+
Remember to always pair your hardware accordingly. Having a very powerful CPU will provide minimal improvements if paired with a disk with slow read and write speeds.
1718
:::
1819

1920
## Minimum requirements (Validators)
2021

21-
These requirements are the absolute minimum to comfortably run a Juno node. They will allow the node to keep in sync as well as performing validation duties. Additionally, it will be well capable of serving RPC request needs for individuals or small groups.
22+
These requirements are the absolute minimum to comfortably run a Juno node. They will allow the node to keep in sync as well as performing validation duties. Additionally, it will be well capable of serving RPC request needs for individuals or small groups.
2223

2324
- **CPU**: 4 CPU cores
2425
- **RAM**: 8GB or more
@@ -28,7 +29,7 @@ These requirements are the absolute minimum to comfortably run a Juno node. They
2829

2930
With this configuration it will be possible for Juno nodes to work as servers to satisfy multiple RPC requests.
3031

31-
- **CPU**: 16 high-speed CPU cores
32+
- **CPU**: 16 high-speed CPU cores
3233
- **RAM**: 64GB of RAM
3334
- **Storage**: Highest speed NVMe SSD drive
3435

docs/docs/running-juno.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,16 @@ You should replace `<YOUR-ETH-NODE>` with your actual Ethereum node address.
8383
If you're using Infura, your Ethereum node address might look something like: `wss://mainnet.infura.io/ws/v3/your-infura-project-id`.
8484
Make sure you are using the WebSockets URL `ws`/`wss` and not the http URL `http`/`https`.
8585

86-
To view logs from the Docker container, use the following command:
86+
When running the standalone binary, logs are written to stdout/stderr. To save them to a file, you can redirect the output:
8787

8888
```shell
89-
docker logs -f juno
89+
./juno \
90+
--http \
91+
--http-port 6060 \
92+
--http-host 0.0.0.0 \
93+
--eth-node <YOUR-ETH-NODE> \
94+
--db-path $HOME/snapshots/juno_mainnet \
95+
> juno.log 2>&1
9096
```
9197

9298
## Building from source

docs/docs/running-on-kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This installs Juno with the default configuration (Sepolia network) and disables
3434
juno:
3535
network: mainnet
3636
image:
37-
tag: "v0.15.19"
37+
tag: "v0.16.0"
3838
extraArgs:
3939
- --eth-node=wss://mainnet.infura.io/ws/v3/<YOUR-PROJECT-ID>
4040
persistence:

docs/docs/tuning.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ The default values of each of these options are set to maximize performance with
1111
Set by the `--db-compression` flag, it applies a compression algorithm over the database **every time** Juno writes to it.
1212

1313
Available options:
14+
1415
- `snappy`: Fast compression with a low compression ratio
1516
- `zstd`: Slower but reduces storage quite a lot
1617
- `minlz`: Alternative compression option
1718

1819
Depending on the compression algorithm used it becomes a trade-off between **disk space** and **CPU** usage every time there is a disk operation.
1920

20-
We recommend `zstd` because it is fast enough that it doesn't delays any process significantly while providing huge database size reduction.
21+
We recommend `zstd` because it is fast enough that it doesn't delay any process significantly while providing huge database size reduction.
2122

2223
:::info
2324
Note that once the compression is changed the new database is not compressed immediately, but gradually through the node usage by writing new information.
@@ -52,6 +53,7 @@ Each additional memtable consumes up to `--db-memtable-size` MB of memory. For e
5253
Set by the `--db-compaction-concurrency` flag, this controls how many concurrent compaction workers the database uses. Compaction is the background process that merges and optimises data on disk.
5354

5455
Format options:
56+
5557
- `N`: Sets the range from 1 to N workers (e.g., `--db-compaction-concurrency=4`)
5658
- `M,N`: Sets the range from M to N workers (e.g., `--db-compaction-concurrency=2,8`)
5759

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!-- This file is generated automatically. Any manual modifications will be overwritten. -->
2+
3+
| Config Option | Default Value | Description |
4+
| --- | --- | --- |
5+
| `cn-core-contract-address` | | Custom network core contract address. |
6+
| `cn-feeder-url` | | Custom network feeder URL. |
7+
| `cn-gateway-url` | | Custom network gateway URL. |
8+
| `cn-l1-chain-id` | | Custom network L1 chain id. |
9+
| `cn-l2-chain-id` | | Custom network L2 chain id. |
10+
| `cn-name` | | Custom network name. |
11+
| `cn-unverifiable-range` | `0,100` | Custom network range of blocks to skip hash verifications (e.g. 0,100). |
12+
| `colour` | `true` | Use `--colour=false` command to disable colourized outputs (ANSI Escape Codes). |
13+
| `config` | | The YAML configuration file. |
14+
| `db-cache-size` | `1024` | Determines the amount of memory (in megabytes) allocated for caching data in the database. |
15+
| `db-compaction-concurrency` | | DB compaction concurrency range. Format: N (lower=1, upper=N) or M,N (lower=M, upper=N). Default: 1,GOMAXPROCS/2 |
16+
| `db-compression` | `"snappy"` | Database compression profile. Options: snappy, zstd, minlz. Use zstd for low storage. |
17+
| `db-max-handles` | `1024` | A soft limit on the number of open files that can be used by the DB |
18+
| `db-memtable-size` | `256` | Determines the amount of memory (in MBs) allocated for database memtables. |
19+
| `db-memtable-count` | `2` | Determines the number of memtables the database can queue before stalling writes. |
20+
| `db-path` | `path to your db location` | Location of the database files. |
21+
| `disable-l1-verification` | | Disables L1 verification since an Ethereum node is not provided. |
22+
| `disable-rpc-batch-requests` | | Disables handling of batched RPC requests. |
23+
| `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. |
24+
| `grpc` | | Enable the HTTP gRPC server on the default port. |
25+
| `grpc-host` | `"localhost"` | The interface on which the gRPC server will listen for requests. |
26+
| `grpc-port` | `6064` | The port on which the gRPC server will listen for requests. |
27+
| `gw-api-key` | | API key for gateway endpoints to avoid throttling |
28+
| `gw-timeouts` | `"5s"` | Timeouts for requests made to the gateway. Can be specified in three ways: - Single value (e.g. '5s'): After each failure, the timeout will increase dynamically. - Comma-separated list (e.g. '5s,10s,20s'): Each value will be used in sequence after failures. - Single value with trailing comma (e.g. '5s,'): Uses a fixed timeout without dynamic adjustment. |
29+
| `help` | | help for juno |
30+
| `http` | | Enables the HTTP RPC server on the default port and interface. |
31+
| `http-host` | `"localhost"` | The interface on which the HTTP RPC server will listen for requests. |
32+
| `http-port` | `6060` | The port on which the HTTP server will listen for requests. |
33+
| `http-update-host` | `"localhost"` | The interface on which the log level and gateway timeouts HTTP server will listen for requests. |
34+
| `http-update-port` | | The port on which the log level and gateway timeouts HTTP server will listen for requests. |
35+
| `log-json` | | Use JSON encoding for log output. |
36+
| `log-level` | `"info"` | Options: trace, debug, info, warn, error. |
37+
| `max-vm-queue` | `72` | Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests |
38+
| `max-vms` | `36` | Maximum number for VM instances to be used for RPC calls concurrently |
39+
| `metrics` | | Enables the Prometheus metrics endpoint on the default port. |
40+
| `metrics-host` | `"localhost"` | The interface on which the Prometheus endpoint will listen for requests. |
41+
| `metrics-port` | `9090` | The port on which the Prometheus endpoint will listen for requests. |
42+
| `network` | `mainnet` | Options: mainnet, sepolia, sepolia-integration. |
43+
| `p2p` | | EXPERIMENTAL: Enables p2p server. |
44+
| `p2p-addr` | | EXPERIMENTAL: Specify p2p listening source address as multiaddr. Example: /ip4/0.0.0.0/tcp/7777 |
45+
| `p2p-feeder-node` | | EXPERIMENTAL: Run juno as a feeder node which will only sync from feeder gateway and gossip the new blocks to the network. |
46+
| `p2p-peers` | | EXPERIMENTAL: Specify list of p2p peers split by a comma. These peers can be either Feeder or regular nodes. |
47+
| `p2p-private-key` | | EXPERIMENTAL: Hexadecimal representation of a private key on the Ed25519 elliptic curve. |
48+
| `p2p-public-addr` | | EXPERIMENTAL: Specify p2p public address as multiaddr. Example: /ip4/35.243.XXX.XXX/tcp/7777 |
49+
| `pending-poll-interval` | `1s` | Sets polling interval for pending block updates before starknet v0.14.0;for pre_latest block updates from starknet v0.14.0 onward.(0s will disable polling). |
50+
| `plugin-path` | | Path to the plugin .so file |
51+
| `pprof` | | Enables the pprof endpoint on the default port. |
52+
| `pprof-host` | `"localhost"` | The interface on which the pprof HTTP server will listen for requests. |
53+
| `pprof-port` | `6062` | The port on which the pprof HTTP server will listen for requests. |
54+
| `preconfirmed-poll-interval` | `500ms` | Sets how frequently pre_confirmed block will be updated(0s will disable fetching of pre_confirmed block). |
55+
| `readiness-block-tolerance` | `6` | Maximum blocks behind latest for /ready endpoints to return 200 OK |
56+
| `remote-db` | | gRPC URL of a remote Juno node |
57+
| `rpc-call-max-gas` | `100000000` | Maximum number of Sierra gas to be executed in starknet_call requests |
58+
| `rpc-call-max-steps` | `4000000` | Maximum number of steps to be executed in starknet_call requests |
59+
| `rpc-cors-enable` | | Enable CORS on RPC endpoints |
60+
| `rpc-max-block-scan` | `18446744073709551615` | Maximum number of blocks scanned in single starknet_getEvents call |
61+
| `seq-block-time` | `60` | Time to build a block, in seconds |
62+
| `seq-disable-fees` | | Skip charge fee for sequencer execution |
63+
| `seq-enable` | | Enables sequencer mode of operation |
64+
| `seq-genesis-file` | | Path to the genesis file |
65+
| `submitted-transactions-cache-entry-ttl` | `5m0s` | Time-to-live for each entry in the submitted transactions cache |
66+
| `submitted-transactions-cache-size` | `10000` | Maximum number of entries in the submitted transactions cache |
67+
| `transaction-combined-layout` | | EXPERIMENTAL: Enable combined (per-block) transaction storage layout. Once enabled, cannot be disabled. |
68+
| `version` | | version for juno |
69+
| `versioned-constants-file` | | Use custom versioned constants from provided file |
70+
| `ws` | | Enables the WebSocket RPC server on the default port. |
71+
| `ws-host` | `"localhost"` | The interface on which the WebSocket RPC server will listen for requests. |
72+
| `ws-port` | `6061` | The port on which the WebSocket server will listen for requests. | |
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
title: Configuring Juno
3+
---
4+
5+
# Configuring Juno :gear:
6+
7+
Juno can be configured using several methods, with the following order of precedence:
8+
9+
1. [Command line parameters (flags)](#command-line-params)
10+
2. [Environment variables](#environment-variables)
11+
3. [Configuration file](#configuration-file)
12+
13+
## Command line params
14+
15+
Juno can be configured directly on the command line by prefixing `--` to each option name:
16+
17+
```bash
18+
./build/juno --http --http-port 6060 --http-host 0.0.0.0 --eth-node <YOUR-ETH-NODE>
19+
```
20+
21+
When using Docker, append the command line parameters after the image name to configure Juno:
22+
23+
```bash
24+
docker run nethermind/juno --http --http-port 6060 --http-host 0.0.0.0 --eth-node <YOUR-ETH-NODE>
25+
```
26+
27+
:::tip
28+
Command line parameters override [environment variables](#environment-variables) and [configuration file](#configuration-file).
29+
:::
30+
31+
## Environment variables
32+
33+
Juno can be configured through environment variables by prefixing the variable names with `JUNO_` and using the configuration options in [SCREAMING_SNAKE_CASE](https://en.wiktionary.org/wiki/screaming_snake_case) format.
34+
35+
To set the `http`, `http-port`, and `http-host` configurations, Juno should be run in this format:
36+
37+
```bash
38+
JUNO_HTTP=true JUNO_HTTP_PORT=6060 JUNO_HTTP_HOST=0.0.0.0 JUNO_ETH_NODE=<YOUR-ETH-NODE> ./build/juno
39+
```
40+
41+
When using Docker, start Juno using the `-e` command option:
42+
43+
```bash
44+
docker run \
45+
-e "JUNO_HTTP=true JUNO_HTTP_PORT=6060 JUNO_HTTP_HOST=0.0.0.0 JUNO_ETH_NODE=<YOUR-ETH-NODE>" \
46+
nethermind/juno
47+
```
48+
49+
:::tip
50+
Environment variables rank second in configuration precedence. [Command line parameters](#command-line-params) override environment variables.
51+
:::
52+
53+
## Configuration file
54+
55+
Juno can be configured using a [YAML](https://en.wikipedia.org/wiki/YAML) file:
56+
57+
```yaml title="Sample YAML File" showLineNumbers
58+
log-level: info
59+
network: mainnet
60+
http: true
61+
http-port: 6060
62+
metrics: true
63+
metrics-port: 9090
64+
eth-node: <YOUR-ETH-NODE>
65+
```
66+
67+
To run Juno with a configuration file, use the `config` option to specify the path of the configuration file:
68+
69+
```bash
70+
# Standalone binary
71+
./build/juno --config <CONFIG FILE PATH>
72+
73+
# Docker container
74+
docker run nethermind/juno --config <CONFIG FILE PATH>
75+
```
76+
77+
:::info
78+
By default, Juno looks for the configuration file in the `$XDG_CONFIG_HOME` directory.
79+
:::
80+
81+
:::tip
82+
Configuration file rank third in configuration precedence. [Command line parameters](#command-line-params) and [environment variables](#environment-variables) override configuration file.
83+
:::
84+
85+
## Configuration options
86+
87+
To list all available command line options, you can use the `--help` parameter:
88+
89+
```bash
90+
# Standalone binary
91+
./build/juno --help
92+
93+
# Docker container
94+
docker run nethermind/juno --help
95+
```
96+
97+
Below is a list of all configuration options available in Juno, along with their default values and descriptions:
98+
99+
```mdx-code-block
100+
import ConfigOptions from "./_config-options.md";
101+
102+
<ConfigOptions />
103+
```
104+
105+
## Subcommands
106+
107+
Juno provides several subcommands to perform specific tasks or operations. Here are the available ones:
108+
109+
- `genp2pkeypair`: Generate a private key pair for p2p.
110+
- `db`: Perform database-related operations
111+
- `db info`: Retrieve information about the database.
112+
- `db size`: Calculate database size information for each data type.
113+
- `db revert`: Reverts the database to a specific block number.
114+
115+
To use a subcommand, append it when running Juno:
116+
117+
```bash
118+
# Running a subcommand
119+
./build/juno <subcommand>
120+
121+
# Running the genp2pkeypair subcommand
122+
./build/juno genp2pkeypair
123+
124+
# Running the db info subcommand
125+
./build/juno db info
126+
```

0 commit comments

Comments
 (0)