From e395112435dde7af89b6f8c59cc04189c67f488f Mon Sep 17 00:00:00 2001 From: wojciechos Date: Thu, 21 Dec 2023 12:38:02 +0100 Subject: [PATCH] Update docs with v0.9.1 (#1590) --- .../version-0.9.1/example_config.md | 113 ++++++++++++++++++ docs/versioned_docs/version-0.9.1/intro.md | 55 +++++++++ .../versioned_docs/version-0.9.1/snapshots.md | 64 ++++++++++ .../version-0.9.1-sidebars.json | 8 ++ docs/versions.json | 1 + 5 files changed, 241 insertions(+) create mode 100644 docs/versioned_docs/version-0.9.1/example_config.md create mode 100644 docs/versioned_docs/version-0.9.1/intro.md create mode 100644 docs/versioned_docs/version-0.9.1/snapshots.md create mode 100644 docs/versioned_sidebars/version-0.9.1-sidebars.json diff --git a/docs/versioned_docs/version-0.9.1/example_config.md b/docs/versioned_docs/version-0.9.1/example_config.md new file mode 100644 index 0000000000..a6cb9486de --- /dev/null +++ b/docs/versioned_docs/version-0.9.1/example_config.md @@ -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 ` 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//.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: "" \ No newline at end of file diff --git a/docs/versioned_docs/version-0.9.1/intro.md b/docs/versioned_docs/version-0.9.1/intro.md new file mode 100644 index 0000000000..1a7be829f7 --- /dev/null +++ b/docs/versioned_docs/version-0.9.1/intro.md @@ -0,0 +1,55 @@ +--- +slug: / +sidebar_position: 1 +title: Quick Start +--- +:warning: **Warning**: Version v0.9.x+ is only compatible with Starknet v0.13.0 and above. :warning: + +*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**: ~131Gb 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) diff --git a/docs/versioned_docs/version-0.9.1/snapshots.md b/docs/versioned_docs/version-0.9.1/snapshots.md new file mode 100644 index 0000000000..c52ac639f1 --- /dev/null +++ b/docs/versioned_docs/version-0.9.1/snapshots.md @@ -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. diff --git a/docs/versioned_sidebars/version-0.9.1-sidebars.json b/docs/versioned_sidebars/version-0.9.1-sidebars.json new file mode 100644 index 0000000000..caea0c03ba --- /dev/null +++ b/docs/versioned_sidebars/version-0.9.1-sidebars.json @@ -0,0 +1,8 @@ +{ + "tutorialSidebar": [ + { + "type": "autogenerated", + "dirName": "." + } + ] +} diff --git a/docs/versions.json b/docs/versions.json index 1eba57c8db..59426be88e 100644 --- a/docs/versions.json +++ b/docs/versions.json @@ -1,4 +1,5 @@ [ + "0.9.1", "0.8.0", "0.7.0", "0.6.3",