Skip to content

Commit

Permalink
Add docs for v0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciechos committed Jan 26, 2024
1 parent c8c1b1c commit 2fcd80d
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 0 deletions.
127 changes: 127 additions & 0 deletions docs/versioned_docs/version-0.9.3/example_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
slug: /config
sidebar_position: 3
title: Example Configuration
---

The Juno binary uses reasonable defaults and can be used without configuration.
For basic fine-tuning, the `--db-path` and `--http-port` options are usually sufficient.

All available options are in the YAML file below with their default values.
Provide the config using the `--config <filename>` option (Juno looks in `$XDG_CONFIG_HOME` by default).

Juno can also be configured using command line params by prepending `--` to the option name (e.g., `--log-level info`).
Command line params override values in the configuration file.

```yaml
# The yaml configuration file
config: ""

# Options: debug, info, warn, error
log-level: info

# Enables the HTTP RPC server on the default port and interface
http: false

# The interface on which the HTTP RPC server will listen for requests
http-host: localhost

# The port on which the HTTP server will listen for requests
http-port: 6060

# Enables the Websocket RPC server on the default port
ws: false

# The interface on which the Websocket RPC server will listen for requests
ws-host: localhost

# The port on which the websocket server will listen for requests
ws-port: 6061

# Location of the database files
db-path: /home/<user>/.local/share/juno

# Options: mainnet, goerli, goerli2, integration, sepolia, sepolia-integration
network: mainnet

# Custom network configuration
custom-network: ""
cn-name: ""
cn-feeder-url: ""
cn-gateway-url: ""
cn-l1-chain-id: ""
cn-l2-chain-id: ""
cn-core-contract-address: ""
cn-unverifiable-range: ""

# Websocket endpoint of the Ethereum node
eth-node: ""

# Enables the pprof endpoint on the default port
pprof: false

# The interface on which the pprof HTTP server will listen for requests
pprof-host: localhost

# The port on which the pprof HTTP server will listen for requests
pprof-port: 6062

# Uses --colour=false command to disable colourized outputs (ANSI Escape Codes)
colour: true

# Sets how frequently pending block will be updated (disabled by default)
pending-poll-interval: 0s

# Enables the prometheus metrics endpoint on the default port
metrics: false

# The interface on which the prometheus endpoint will listen for requests
metrics-host: localhost

# The port on which the prometheus endpoint will listen for requests
metrics-port: 9090

# Enable the HTTP GRPC server on the default port
grpc: false

# The interface on which the GRPC server will listen for requests
grpc-host: localhost

# The port on which the GRPC server will listen for requests
grpc-port: 6064

# Maximum number of VM instances for concurrent RPC calls.
# Default is set to three times the number of CPU cores.
max-vms: 48

# Maximum number of requests to queue for RPC calls after reaching max-vms.
# Default is set to double the value of max-vms.
max-vm-queue: 96

# gRPC URL of a remote Juno node
remote-db: ""

# Maximum number of blocks scanned in single starknet_getEvents call
rpc-max-block-scan: 18446744073709551615

# Determines the amount of memory (in megabytes) allocated for caching data in the database
db-cache-size: 8

# A soft limit on the number of open files that can be used by the DB
db-max-handles: 1024

# API key for gateway/feeder to avoid throttling
gw-api-key: ""

# Maximum number of steps to be executed in starknet_call requests
rpc-call-max-steps: 4000000

# Experimental
# Enable p2p server
p2p: false

# Specify p2p source address as multiaddr
p2p-addr: ""

# Specify list of p2p boot peers splitted by a comma
p2p-boot-peers: ""
54 changes: 54 additions & 0 deletions docs/versioned_docs/version-0.9.3/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
slug: /
sidebar_position: 1
title: Quick Start
---

*Juno is your fast and featureful Starknet client implementation.*

Suitable for casual setups, production-grade indexers, and everything in between.

- :floppy_disk: **Tiny database size**: ~156Gb on mainnet
- :zap: **Blazing fast sync**: constrained only by hardware and the sequencer
- :100: **100% [JSON-RPC spec](https://github.com/starkware-libs/starknet-specs/tree/master) compliance**: all things Starknet, in one place
- :racing_car: **Minimal RPC response latency**: to keep your applications moving
- :mag_right: **Low-level GRPC database API**: for the most demanding workloads

# Sync Starknet in Two Commands

```shell
# Juno's database directory. Can be any directory on the machine.
mkdir -p junodb

# Juno's HTTP server listens on port 6060.
docker run -d --name juno -p 6060:6060 -v junodb:/var/lib/juno nethermind/juno:latest --db-path /var/lib/juno --http --http-host 0.0.0.0
```

For a complete list of options and their explanations, see the [Example Configuration](config) or run:

```shell
docker run nethermind/juno --help
```

# Juno is compatible with the following Starknet API versions:

- **v0.6.0** (Endpoint: `/v0_6` or default `/`)
- **v0.5.0** (Endpoint: `/v0_5`)

To interact with a specific API version, you can specify the version endpoint in your RPC calls. For example:

```shell
curl -X POST http://localhost:6060 -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"juno_version","id":1}'
```

# Looking for a Starknet RPC Provider?

Access Nethermind's Starknet RPC service for free at [data.voyager.online](https://data.voyager.online).

# Questions, Discussions, Community

Find active Juno team members and users in the following places.

- [GitHub](https://github.com/NethermindEth/juno)
- [Discord](https://discord.gg/SZkKcmmChJ)
- [Telegram](https://t.me/+LHRF4H8iQ3c5MDY0)
21 changes: 21 additions & 0 deletions docs/versioned_docs/version-0.9.3/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
slug: /hardware-requirements
sidebar_position: 5
title: Hardware Requirements
---

This outlines the hardware specifications required to run a Juno full node, including both minimal and recommended requirements.

## Minimal

- **CPU**: 2+ cores
- **RAM**: 4GB+
- **Storage**: 200GB (SSD recommended; note: storage requirements will increase over time)

## Recommended

- **CPU**: Fast CPU with 4+ cores
- **RAM**: 8GB or more
- **Storage**: High-performance SSD with more than 200GB, to accommodate future growth

**Note**: The above specifications serve as a guideline. While the minimal requirements are sufficient for basic operations, the recommended specifications ensure optimal performance and future scalability.
64 changes: 64 additions & 0 deletions docs/versioned_docs/version-0.9.3/snapshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
slug: /snapshots
sidebar_position: 4
title: Database Snapshots
---

To decrease sync times, users may opt to download a Juno database snapshot.
After downloading a snapshot and starting a Juno node, only recent blocks must be synced.

## Mainnet

| Version | Size | Block | Download Link |
| ------- | ---- | ----- | ------------- |
| **>=v0.9.2** | **156 GB** | **519634** | [**juno_mainnet.tar**](https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.9.3_519634.tar) |

## Goerli

| Version | Size | Block | Download Link |
| ------- | ---- | ----- | ------------- |
| **>=v0.6.0** | **41.4 GB** | **911580** | [**juno_goerli.tar**](https://juno-snapshots.nethermind.dev/goerli/juno_goerli_v0.7.5_911580.tar) |

## Run Juno Using Snapshot

1. **Download Snapshot**

Fetch a snapshot from one of the provided URLs:

```bash
wget -O juno_mainnet.tar https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.9.3_519634.tar
```

2. **Prepare Directory**

Ensure you have a directory where you will store the snapshots. We will use `$HOME/snapshots`.

```bash
mkdir -p $HOME/snapshots
```

3. **Extract Tarball**

Extract the contents of the `.tar` file:

```bash
tar -xvf juno_mainnet.tar -C $HOME/snapshots
```

4. **Run Juno**

Execute the Docker command to run Juno, ensuring that you're using the correct snapshot path `$HOME/snapshots/juno_mainnet`:

```bash
docker run -d \
--name juno \
-p 6060:6060 \
-v $HOME/snapshots/juno_mainnet:/var/lib/juno \
nethermind/juno \
--http \
--http-port 6060 \
--http-host 0.0.0.0 \
--db-path /var/lib/juno
```

After following these steps, Juno should be up and running on your machine, utilizing the provided snapshot.
8 changes: 8 additions & 0 deletions docs/versioned_sidebars/version-0.9.3-sidebars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tutorialSidebar": [
{
"type": "autogenerated",
"dirName": "."
}
]
}
2 changes: 2 additions & 0 deletions docs/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

[
"0.9.3",
"0.9.2",
"0.9.1",
"0.8.0",
Expand Down

0 comments on commit 2fcd80d

Please sign in to comment.