From 4250f2419d1554a175047e4aa1310e3ecfbce5d7 Mon Sep 17 00:00:00 2001 From: Josh Stein <46639943+jcstein@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:30:46 +0100 Subject: [PATCH] chore: add mainnet chain id context to troubleshooting page and backlinks (#1246) * chore: standardize use of :::blocks * chore: add mainnet chain id context to troubleshooting page and backlinks --- developers/celestia-node-key.md | 46 ++++++++++++++------ developers/node-api.md | 2 +- developers/node-tutorial.md | 11 +++-- developers/optimism.md | 2 +- nodes/arabica-9.md | 4 +- nodes/arabica-devnet.md | 2 +- nodes/bridge-node.md | 5 +++ nodes/celestia-node-metrics.md | 2 +- nodes/celestia-node-troubleshooting.md | 59 +++++++++++++++++--------- nodes/full-storage-node.md | 5 +++ nodes/light-node.md | 5 +++ nodes/mocha-testnet.md | 2 +- 12 files changed, 102 insertions(+), 43 deletions(-) diff --git a/developers/celestia-node-key.md b/developers/celestia-node-key.md index 7086b7abb11..7f9f23e14f8 100644 --- a/developers/celestia-node-key.md +++ b/developers/celestia-node-key.md @@ -53,20 +53,28 @@ For the purpose of this guide, we will use the `make cel-key` command. To generate a key for a Celestia node, select the tab for your node type: +:::tip +You do not need to declare a network for Mainnet Beta. Refer to +[the chain ID section on the troubleshooting page for more information](../nodes/celestia-node-troubleshooting.md) +::: + ::: code-group ```bash-vue [Bridge] -./cel-key add --keyring-backend test --node.type bridge --p2p.network +./cel-key add --keyring-backend test --node.type bridge \ + --p2p.network ``` ```bash-vue [Full] -./cel-key add --keyring-backend test --node.type full --p2p.network +./cel-key add --keyring-backend test --node.type full \ + --p2p.network ``` ```bash-vue [Light] -./cel-key add --keyring-backend test --node.type light --p2p.network +./cel-key add --keyring-backend test --node.type light \ + --p2p.network ``` @@ -101,15 +109,18 @@ ASCII-armored format. ```bash-vue [Bridge] -./cel-key export --keyring-backend test --node.type bridge --p2p.network +./cel-key export --keyring-backend test --node.type bridge \ + --p2p.network ``` ```bash-vue [Full] -./cel-key export --keyring-backend test --node.type full --p2p.network +./cel-key export --keyring-backend test --node.type full \ + --p2p.network ``` ```bash-vue [Light] -./cel-key export --keyring-backend test --node.type light --p2p.network +./cel-key export --keyring-backend test --node.type light \ + --p2p.network ``` @@ -126,15 +137,18 @@ then enter your bip39 mnemonic: ```bash-vue [Bridge] -./cel-key add --recover --keyring-backend test --node.type bridge --p2p.network +./cel-key add --recover --keyring-backend test \ + --node.type bridge --p2p.network ``` ```bash-vue [Full] -./cel-key add --recover --keyring-backend test --node.type full --p2p.network +./cel-key add --recover --keyring-backend test \ + --node.type full --p2p.network ``` ```bash-vue [Light] -./cel-key add --recover --keyring-backend test --node.type light --p2p.network +./cel-key add --recover --keyring-backend test \ + --node.type light --p2p.network ``` @@ -157,13 +171,18 @@ then enter your bip39 mnemonic: ### Running your node -Run the Docker image (in this example, we are using a light node): +Run the Docker image (in this example, we are using a light node on Mocha +testnet): + + -```bash +```bash-vue docker run --name celestia-node -e NODE_TYPE=light -e P2P_NETWORK=mocha -p 26659:26659 \ -ghcr.io/celestiaorg/celestia-node:sha-747c9e5 celestia light start \ +ghcr.io/celestiaorg/celestia-node:{{mochaVersions['node-latest-tag']}} celestia light start \ --core.ip rpc-mocha.pops.one --p2p.network mocha ``` @@ -173,6 +192,9 @@ ghcr.io/celestiaorg/celestia-node:sha-747c9e5 celestia light start \ Refer to [the ports section of the celestia-node troubleshooting page](../nodes/celestia-node-troubleshooting.md#ports) for information on which ports are required to be open on your machine. + +You do not need to declare a network for Mainnet Beta. Refer to +[the chain ID section on the troubleshooting page for more information](../nodes/celestia-node-troubleshooting.md) ::: List active containers in another window with: diff --git a/developers/node-api.md b/developers/node-api.md index a928e799b79..1bce08a8c5e 100644 --- a/developers/node-api.md +++ b/developers/node-api.md @@ -41,7 +41,7 @@ to get started interacting with your Celestia node. ## Gateway API -::: warning +:::warning The gateway endpoints have been deprecated and will be removed in the future. If you would like to use them anyway, you can [find more details on GitHub](https://github.com/celestiaorg/celestia-node/pull/2360). diff --git a/developers/node-tutorial.md b/developers/node-tutorial.md index c08fb3baa03..f67261f07fb 100644 --- a/developers/node-tutorial.md +++ b/developers/node-tutorial.md @@ -17,7 +17,7 @@ import mainnetVersions from '/.vitepress/constants/mainnet_versions.js' In this tutorial, we will cover how to use the celestia-node RPC API to submit and retrieve data (blobs) from the data availability layer by their namespace. -::: details Table of contents +:::details Table of contents [[toc]] @@ -44,7 +44,7 @@ If you already have a running and funded node, you can skip to the [RPC CLI guide section](#rpc-cli-guide). ::: -::: warning +:::warning The gateway endpoints have been deprecated and will be removed in the future. If you would like to use them anyway, you can [find more details on GitHub](https://github.com/celestiaorg/celestia-node/pull/2360). @@ -273,7 +273,7 @@ commit hash, build date, system version, and Golang version. Now, let's instantiate a Celestia Light node: -::: tip +:::tip RPC endpoints are exposed in all celestia-node types such as light, bridge and full nodes. ::: @@ -363,6 +363,11 @@ celestia light start --core.ip consensus-full.celestia-arabica-10.com \ You can create your key for your node by running the following command from the celestia-node directory: +:::tip +You do not need to declare a network for Mainnet Beta. Refer to +[the chain ID section on the troubleshooting page for more information](../nodes/celestia-node-troubleshooting.md) +::: + ```bash ./cel-key add --keyring-backend test --node.type light \ --p2p.network diff --git a/developers/optimism.md b/developers/optimism.md index b97d029a0ce..521d955cd93 100644 --- a/developers/optimism.md +++ b/developers/optimism.md @@ -88,7 +88,7 @@ $HOME/.celestia-light-{{constants.arabicaChainId}} This is the default location of the node store when you initialize and run a new Celestia node. -::: warning +:::warning The user in the `docker-compose-testnet.yml` is the `root` user, but this is not meant to be used in production. ::: diff --git a/nodes/arabica-9.md b/nodes/arabica-9.md index 83e81e32b0f..8b6ac3bacec 100644 --- a/nodes/arabica-9.md +++ b/nodes/arabica-9.md @@ -6,7 +6,7 @@ description: A guide to Arabica-9 devnet. ![arabica-devnet](/img/arabica-devnet.png) -::: warning +:::warning This page is maintained for developers still using the `arabica-9` devnet. Refer to the [Arabica devnet](./arabica-devnet.md) page for the latest @@ -92,7 +92,7 @@ broadcast transactions. ## Arabica devnet faucet -::: danger WARNING +:::danger WARNING USING THIS FAUCET DOES NOT ENTITLE YOU TO ANY AIRDROP OR OTHER DISTRIBUTION OF MAINNET CELESTIA TOKENS. THERE ARE NO PUBLIC SALES OF ANY MAINNET CELESTIA TOKENS. diff --git a/nodes/arabica-devnet.md b/nodes/arabica-devnet.md index f2aec7fa48d..393dd29d1e9 100644 --- a/nodes/arabica-devnet.md +++ b/nodes/arabica-devnet.md @@ -105,7 +105,7 @@ broadcast transactions. ## Arabica devnet faucet -::: danger WARNING +:::danger WARNING USING THIS FAUCET DOES NOT ENTITLE YOU TO ANY AIRDROP OR OTHER DISTRIBUTION OF MAINNET CELESTIA TOKENS. THERE ARE NO PUBLIC SALES OF ANY MAINNET CELESTIA TOKENS. diff --git a/nodes/bridge-node.md b/nodes/bridge-node.md index 20fb544c2a4..f55ebc387d4 100644 --- a/nodes/bridge-node.md +++ b/nodes/bridge-node.md @@ -143,6 +143,11 @@ You can find the address by running the following command: ./cel-key list --node.type bridge --keyring-backend test --p2p.network ``` +:::tip +You do not need to declare a network for Mainnet Beta. Refer to +[the chain ID section on the troubleshooting page for more information](./celestia-node-troubleshooting.md) +::: + You can get testnet tokens from: - [Mocha](./mocha-testnet.md) diff --git a/nodes/celestia-node-metrics.md b/nodes/celestia-node-metrics.md index dbe041f271c..fadf873f125 100644 --- a/nodes/celestia-node-metrics.md +++ b/nodes/celestia-node-metrics.md @@ -27,7 +27,7 @@ Here is an example for Mainnet Beta: ```sh celestia start --metrics.tls=true \ --metrics --metrics.endpoint otel.celestia.observer \ - --p2p.network --core.ip + --core.ip ``` Add metrics flags to your node start command and restart your node to apply it. diff --git a/nodes/celestia-node-troubleshooting.md b/nodes/celestia-node-troubleshooting.md index 6e71e0a426b..a4cdeaaf547 100644 --- a/nodes/celestia-node-troubleshooting.md +++ b/nodes/celestia-node-troubleshooting.md @@ -5,6 +5,43 @@ description: A guide to troubleshooting common issues with Celestia Node. # Troubleshooting + + + +## Network selection + +Note: If you do not select a network, the default network will be Mainnet Beta. + +```sh +celestia init --p2p.network +celestia start --p2p.network --core.ip +``` + +:::tip +Refer to [the ports section of this page](#ports) +for information on which ports are required to be open on your machine. +::: + +:::tip NOTE +It is advised before switching networks to reinitialize +your node via `init` command. This is due to an old config being present. +Re-initialisation will reset the config. +::: + +### Chain ID + +When interacting with celestia-node, it is important to take into account +the different chain IDs for different networks. For Mainnet Beta, there is +no need to declare a chain ID, as the default is {{ constants.mainnetChainId }}, +_i.e._ no `--p2p.network string` flag is required for Mainnet Beta. + +| Network | Chain ID | `--p2p.network string` | +|---------|----------|------------------------| +| Mainnet Beta | {{ constants.mainnetChainId }} | not required (`--p2p.network celestia`) | +| Mocha | {{ constants.mochaChainId }} | `--p2p.network mocha` | +| Arabica | {{ constants.arabicaChainId }} | `--p2p.network arabica` | ## Ports @@ -30,7 +67,7 @@ The following ports are used by Celestia nodes: | 26658 | HTTP | localhost | RPC | true | `--rpc.port string` | | 26659 | HTTP | localhost | REST Gateway | false | `--gateway.port string` | -:::caution +:::warning The gateway endpoints have been deprecated and will be removed in the future. If you would like to use them anyway, you can [find more details on GitHub](https://github.com/celestiaorg/celestia-node/pull/2360). @@ -73,26 +110,6 @@ To show the keys you should add `--keyring-dir` like this example: --keyring-dir /home/user/celestia--location/keys/ ``` -## Network selection - -Note: If you do not select a network, the default network will be 'Mocha'. - -```sh -celestia init --p2p.network -celestia start --p2p.network --core.ip -``` - -:::tip -Refer to [the ports section of this page](#ports) -for information on which ports are required to be open on your machine. -::: - -:::tip NOTE -It is advised before switching networks to reinitialize -your node via `init` command. This is due to an old config being present. -Re-initialisation will reset the config. -::: - ## Resetting your config If you an encounter an error, it is likely that an old config file is present: diff --git a/nodes/full-storage-node.md b/nodes/full-storage-node.md index 8d2764c3d3a..22d9de0c5ff 100644 --- a/nodes/full-storage-node.md +++ b/nodes/full-storage-node.md @@ -97,6 +97,11 @@ You can find the address by running the following command: ./cel-key list --node.type full --keyring-backend test --p2p.network ``` +:::tip +You do not need to declare a network for Mainnet Beta. Refer to +[the chain ID section on the troubleshooting page for more information](./celestia-node-troubleshooting.md) +::: + You can get testnet tokens from: - [Mocha](./mocha-testnet.md) diff --git a/nodes/light-node.md b/nodes/light-node.md index 9f12c8bb03f..8a13ddfa02e 100644 --- a/nodes/light-node.md +++ b/nodes/light-node.md @@ -88,6 +88,11 @@ To start the light node with a connection to a validator node's gRPC endpoint celestia light start --core.ip --p2p.network ``` +:::tip +You do not need to declare a network for Mainnet Beta. Refer to +[the chain ID section on the troubleshooting page for more information](./celestia-node-troubleshooting.md) +::: + Using an RPC of your own, or one from the [list on the Mocha testnet page](../mocha-testnet#rpc-endpoints) or [list on the Arabica devnet page](../arabica-devnet#rpc-endpoints), diff --git a/nodes/mocha-testnet.md b/nodes/mocha-testnet.md index f5791cd5324..dfad33572c8 100644 --- a/nodes/mocha-testnet.md +++ b/nodes/mocha-testnet.md @@ -135,7 +135,7 @@ Full node 2: ## Mocha testnet faucet -::: danger WARNING +:::danger WARNING USING THIS FAUCET DOES NOT ENTITLE YOU TO ANY AIRDROP OR OTHER DISTRIBUTION OF MAINNET CELESTIA TOKENS. THERE ARE NO PUBLIC SALES OF ANY MAINNET CELESTIA TOKENS.