Skip to content

Commit

Permalink
Implement docs feedback (#1875)
Browse files Browse the repository at this point in the history
* add db-path info to updating

* update releases link

* fix the search functionality

* update node endpoints URL
  • Loading branch information
LordGhostX authored May 24, 2024
1 parent c64bac4 commit 1f15377
Show file tree
Hide file tree
Showing 11 changed files with 1,657 additions and 179 deletions.
5 changes: 3 additions & 2 deletions cmd/juno/juno.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ const (
dbMaxHandlesUsage = "A soft limit on the number of open files that can be used by the DB"
gwAPIKeyUsage = "API key for gateway endpoints to avoid throttling" //nolint: gosec
gwTimeoutUsage = "Timeout for requests made to the gateway" //nolint: gosec
callMaxStepsUsage = "Maximum number of steps to be executed in starknet_call requests"
corsEnableUsage = "Enable CORS on RPC endpoints"
callMaxStepsUsage = "Maximum number of steps to be executed in starknet_call requests. " +
"The upper limit is 4 million steps, and any higher value will still be capped at 4 million."
corsEnableUsage = "Enable CORS on RPC endpoints"
)

var Version string
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/_config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
| `http-host` | `localhost` | The interface on which the HTTP RPC server will listen for requests |
| `http-port` | `6060` | The port on which the HTTP server will listen for requests |
| `log-level` | `info` | Options: trace, debug, info, warn, error |
| `max-vm-queue` | | Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests. Default is set to double the value of `max-vms` |
| `max-vms` | | Maximum number for VM instances to be used for RPC calls concurrently. Default is set to three times the number of CPU cores |
| `max-vm-queue` | `2 * max-vms` | Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests |
| `max-vms` | `3 * CPU Cores` | Maximum number for VM instances to be used for RPC calls concurrently |
| `metrics` | `false` | Enables the Prometheus metrics endpoint on the default port |
| `metrics-host` | `localhost` | The interface on which the Prometheus endpoint will listen for requests |
| `metrics-port` | `9090` | The port on which the Prometheus endpoint will listen for requests |
Expand All @@ -40,7 +40,7 @@
| `pprof-host` | `localhost` | The interface on which the pprof HTTP server will listen for requests |
| `pprof-port` | `6062` | The port on which the pprof HTTP server will listen for requests |
| `remote-db` | | gRPC URL of a remote Juno node |
| `rpc-call-max-steps` | `4000000` | Maximum number of steps to be executed in starknet_call requests |
| `rpc-call-max-steps` | `4000000` | Maximum number of steps to be executed in starknet_call requests. The upper limit is 4 million steps, and any higher value will still be capped at 4 million |
| `rpc-cors-enable` | `false` | Enable CORS on RPC endpoints |
| `rpc-max-block-scan` | `18446744073709551615` | Maximum number of blocks scanned in single starknet_getEvents call |
| `ws` | `false` | Enables the WebSocket RPC server on the default port |
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: JSON-RPC Interface

# JSON-RPC Interface :globe_with_meridians:

Interacting with Juno requires sending requests to specific JSON-RPC API methods. Juno supports all of [Starknet's Node API Endpoints](https://playground.open-rpc.org/?uiSchema[appBar][ui:splitView]=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/master/api/starknet_api_openrpc.json&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false) over HTTP and [WebSocket](websocket).
Interacting with Juno requires sending requests to specific JSON-RPC API methods. Juno supports all of [Starknet's Node API Endpoints](https://playground.open-rpc.org/?uiSchema%5BappBar%5D%5Bui:splitView%5D=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/v0.7.0/api/starknet_api_openrpc.json&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:darkMode%5D=true&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false) over HTTP and [WebSocket](websocket).

## Enable the JSON-RPC server

Expand All @@ -30,7 +30,7 @@ docker run -d \

## Making JSON-RPC requests

You can use any of [Starknet's Node API Endpoints](https://playground.open-rpc.org/?uiSchema[appBar][ui:splitView]=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/master/api/starknet_api_openrpc.json&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false) with Juno. Check the availability of Juno with the `juno_version` method:
You can use any of [Starknet's Node API Endpoints](https://playground.open-rpc.org/?uiSchema%5BappBar%5D%5Bui:splitView%5D=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/v0.7.0/api/starknet_api_openrpc.json&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:darkMode%5D=true&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false) with Juno. Check the availability of Juno with the `juno_version` method:

```mdx-code-block
import Tabs from "@theme/Tabs";
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/running-juno.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ docker logs -f juno

## Standalone binary

Download standalone binaries from [Juno's GitHub Releases](https://github.com/NethermindEth/juno/releases) as ZIP archives for Linux (amd64 and arm64) and macOS (amd64). For macOS (arm64) or Windows users, consider [running Juno using Docker](#docker-container).
Download standalone binaries from [Juno's GitHub Releases](https://github.com/NethermindEth/juno/releases/latest) as ZIP archives for Linux (amd64 and arm64) and macOS (amd64). For macOS (arm64) or Windows users, consider [running Juno using Docker](#docker-container).

```bash
# Prepare the snapshots directory
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/running-on-gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ curl --location 'http://localhost:6060' \
</TabItem>
</Tabs>
:::tip
To learn how to configure Juno, check out the [Configuring Juno](configuring) guide.
:::
10 changes: 9 additions & 1 deletion docs/docs/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ It is important to run the latest version of Juno as each update brings new feat
- [Standalone binary](#standalone-binary)
- [Updating from source](#updating-from-source)

:::info
When running an updated node, use the same `db-path` as before to avoid restarting the sync and use the already synced database.
:::

## Docker container

### 1. Get the latest Docker image
Expand Down Expand Up @@ -62,7 +66,7 @@ docker logs juno

## Standalone binary

Download the latest binary from the [Juno GitHub Releases](https://github.com/NethermindEth/juno/releases) page and replace the existing one.
Download the latest binary from the [Juno GitHub Releases](https://github.com/NethermindEth/juno/releases/latest) page and replace the existing one.

## Updating from source

Expand All @@ -78,3 +82,7 @@ make juno
# Rebuild the Docker image
docker build -t nethermind/juno:latest .
```

:::tip
To learn how to configure Juno, check out the [Configuring Juno](configuring) guide.
:::
4 changes: 2 additions & 2 deletions docs/docs/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: WebSocket Interface

# WebSocket Interface :globe_with_meridians:

Juno provides a WebSocket RPC interface that supports all of [Starknet's JSON-RPC API](https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json) endpoints and allows you to [subscribe to newly created blocks](#subscribe-to-newly-created-blocks).
Juno provides a WebSocket RPC interface that supports all of [Starknet's JSON-RPC API](https://playground.open-rpc.org/?uiSchema%5BappBar%5D%5Bui:splitView%5D=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/v0.7.0/api/starknet_api_openrpc.json&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:darkMode%5D=true&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false) endpoints and allows you to [subscribe to newly created blocks](#subscribe-to-newly-created-blocks).

## Enable the WebSocket server

Expand All @@ -30,7 +30,7 @@ docker run -d \

## Making WebSocket requests

You can use any of [Starknet's Node API Endpoints](https://playground.open-rpc.org/?uiSchema[appBar][ui:splitView]=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/master/api/starknet_api_openrpc.json&uiSchema[appBar][ui:input]=false&uiSchema[appBar][ui:darkMode]=true&uiSchema[appBar][ui:examplesDropdown]=false) with Juno. Check the availability of Juno with the `juno_version` method:
You can use any of [Starknet's Node API Endpoints](https://playground.open-rpc.org/?uiSchema%5BappBar%5D%5Bui:splitView%5D=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/v0.7.0/api/starknet_api_openrpc.json&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:darkMode%5D=true&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false) with Juno. Check the availability of Juno with the `juno_version` method:

```mdx-code-block
import Tabs from "@theme/Tabs";
Expand Down
5 changes: 3 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const config = {
[
"@easyops-cn/docusaurus-search-local",
{
hashed: true,
docsRouteBasePath: "/",
removeDefaultStopWordFilter: true,
highlightSearchTermsOnTargetPage: true,
},
],
Expand Down Expand Up @@ -130,7 +131,7 @@ const config = {
},
{
label: "Juno Releases",
href: "https://github.com/NethermindEth/juno/releases",
href: "https://github.com/NethermindEth/juno/releases/latest",
},
],
},
Expand Down
5 changes: 2 additions & 3 deletions docs/generate-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ const extractConfigs = (codebase) => {

// Additional descriptions based on specific configurations
if (configName === "max-vms") {
description +=
". Default is set to three times the number of CPU cores";
defaultValue = "3 * CPU Cores";
}
if (configName === "max-vm-queue") {
description += ". Default is set to double the value of `max-vms`";
defaultValue = "2 * max-vms";
}

configs.push({
Expand Down
Loading

0 comments on commit 1f15377

Please sign in to comment.