Skip to content

Commit

Permalink
Add doc for v0.8.0 with updated snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciechos authored and omerfirmak committed Dec 5, 2023
1 parent a9e3439 commit 96acb93
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,13 @@ Use the provided snapshots to quickly sync your Juno node with the current state

| Version | Size | Block | Download Link |
| ------- | ---- | ----- | ------------- |
| **>=v0.6.0** | **92 GB** | **313975** | [**juno_mainnet_313975.tar**](https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.6.5_313975.tar) |
| **>=v0.6.0** | **121 GB** | **449406** | [**juno_mainnet.tar**](https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.7.5_449406.tar) |

#### Goerli

| Version | Size | Block | Download Link |
| ------- | ---- | ----- | ------------- |
| **>=v0.6.0** | **36 GB** | **850192** | [**juno_goerli_850192.tar**](https://juno-snapshots.nethermind.dev/goerli/juno_goerli_v0.6.0_850192.tar) |

#### Goerli2

| Version | Size | Block | Download Link |
| ------- | ---- | ----- | ------------- |
| **>=v0.6.0** | **4.6 GB** | **139043** | [**juno_goerli2_135973.tar**](https://juno-snapshots.nethermind.dev/goerli2/juno_goerli2_v0.6.0_139043.tar) |
| **>=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

Expand All @@ -115,7 +109,7 @@ Use the provided snapshots to quickly sync your Juno node with the current state
Fetch the snapshot from the provided URL:

```bash
wget -O juno_mainnet_313975.tar https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.6.5_313975.tar
wget -O juno_mainnet.tar https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.7.5_449406.tar
```

2. **Prepare Directory**
Expand All @@ -131,7 +125,7 @@ Use the provided snapshots to quickly sync your Juno node with the current state
Extract the contents of the `.tar` file:

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

4. **Run Juno**
Expand Down
78 changes: 78 additions & 0 deletions docs/versioned_docs/version-0.8.0/example_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
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
# Enable colored logs
colour: true

# Path to the database.
# Juno uses `$XDG_DATA_HOME/juno` by default, which is usually something like the value below on Linux.
db-path: /home/<user>/.local/share/juno

# Websocket endpoint of the Ethereum node used to verify the L2 chain.
# If using Infura, it looks something like `wss://mainnet.infura.io/ws/v3/your-infura-project-id`
eth-node: ""

# Enables the HTTP RPC server.
http: false
# Interface on which the HTTP RPC server will listen for requests.
http-host: localhost
# Port on which the HTTP RPC server will listen for requests.
http-port: 6060

# The options below are similar to the HTTP RPC options above.
ws: false # Websocket RPC server
ws-host: localhost
ws-port: 6061
pprof: false
pprof-host: localhost
pprof-port: 6062
metrics: false
metrics-host: localhost
metrics-port: 9090
grpc: false
grpc-host: localhost
grpc-port: 6064

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

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

# How often to fetch the pending block when synced to the head of the chain.
# Provide a duration like 5s (five seconds) or 10m (10 minutes).
# Disabled by default.
pending-poll-interval: 0s

# Experimental p2p options; there is currently no standardized Starknet p2p testnet.
p2p: false # Enable the p2p server
p2p-addr: "" # Source address
p2p-boot-peers: "" # Boot nodes

# Determines the memory allocated for database caching (in MB).
db-cache-size: 8

# The maximum number of VM instances for concurrent RPC calls.
max-vms: 48

# Maximum number of requests to queue for RPC calls.
max-vm-queue: 96

# GRPC URL of a remote Juno node.
remote-db: ""

# Maximum number of blocks to scan in a single starknet_getEvents call.
rpc-max-block-scan: 18446744073709551615
54 changes: 54 additions & 0 deletions docs/versioned_docs/version-0.8.0/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**: ~121Gb 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`)
- **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/v0_6 -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)
64 changes: 64 additions & 0 deletions docs/versioned_docs/version-0.8.0/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.6.0** | **121 GB** | **449406** | [**juno_mainnet.tar**](https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.7.5_449406.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.7.5_449406.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.8.0-sidebars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tutorialSidebar": [
{
"type": "autogenerated",
"dirName": "."
}
]
}
1 change: 1 addition & 0 deletions docs/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"0.8.0",
"0.7.0",
"0.6.3",
"0.6.2",
Expand Down

0 comments on commit 96acb93

Please sign in to comment.