-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01101a3
commit ef131d1
Showing
6 changed files
with
243 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
--- | ||
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 | ||
|
||
# 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 | ||
|
||
# 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: "" | ||
|
||
# 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: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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**: ~135Gb 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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** | **135 GB** | **501593** | [**juno_mainnet.tar**](https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.9.2_501593.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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"tutorialSidebar": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[ | ||
"0.9.2", | ||
"0.9.1", | ||
"0.8.0", | ||
"0.7.0", | ||
|