Skip to content

Commit

Permalink
chore: add mainnet chain id context to troubleshooting page and backl…
Browse files Browse the repository at this point in the history
…inks (#1246)

* chore: standardize use of :::blocks

* chore: add mainnet chain id context to troubleshooting page and backlinks
  • Loading branch information
jcstein authored Nov 6, 2023
1 parent 980f088 commit 4250f24
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 43 deletions.
46 changes: 34 additions & 12 deletions developers/celestia-node-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<!-- markdownlint-disable MD013 -->

```bash-vue [Bridge]
./cel-key add <key-name> --keyring-backend test --node.type bridge --p2p.network <network>
./cel-key add <key-name> --keyring-backend test --node.type bridge \
--p2p.network <network>
```

```bash-vue [Full]
./cel-key add <key-name> --keyring-backend test --node.type full --p2p.network <network>
./cel-key add <key-name> --keyring-backend test --node.type full \
--p2p.network <network>
```

```bash-vue [Light]
./cel-key add <key-name> --keyring-backend test --node.type light --p2p.network <network>
./cel-key add <key-name> --keyring-backend test --node.type light \
--p2p.network <network>
```

<!-- markdownlint-enable MD013 -->
Expand Down Expand Up @@ -101,15 +109,18 @@ ASCII-armored format.
<!-- markdownlint-disable MD013 -->

```bash-vue [Bridge]
./cel-key export <key-name> --keyring-backend test --node.type bridge --p2p.network <network>
./cel-key export <key-name> --keyring-backend test --node.type bridge \
--p2p.network <network>
```

```bash-vue [Full]
./cel-key export <key-name> --keyring-backend test --node.type full --p2p.network <network>
./cel-key export <key-name> --keyring-backend test --node.type full \
--p2p.network <network>
```

```bash-vue [Light]
./cel-key export <key-name> --keyring-backend test --node.type light --p2p.network <network>
./cel-key export <key-name> --keyring-backend test --node.type light \
--p2p.network <network>
```

<!-- markdownlint-enable MD013 -->
Expand All @@ -126,15 +137,18 @@ then enter your bip39 mnemonic:
<!-- markdownlint-disable MD013 -->

```bash-vue [Bridge]
./cel-key add <key-name> --recover --keyring-backend test --node.type bridge --p2p.network <network>
./cel-key add <key-name> --recover --keyring-backend test \
--node.type bridge --p2p.network <network>
```

```bash-vue [Full]
./cel-key add <key-name> --recover --keyring-backend test --node.type full --p2p.network <network>
./cel-key add <key-name> --recover --keyring-backend test \
--node.type full --p2p.network <network>
```

```bash-vue [Light]
./cel-key add <key-name> --recover --keyring-backend test --node.type light --p2p.network <network>
./cel-key add <key-name> --recover --keyring-backend test \
--node.type light --p2p.network <network>
```

<!-- markdownlint-enable MD013 -->
Expand All @@ -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):

<!-- markdownlint-disable MD013 -->
<!-- markdownlint-disable MD033 -->
<script setup>
import mochaVersions from "/.vitepress/constants/mocha_versions.js";
</script>

```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
```

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion developers/node-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
11 changes: 8 additions & 3 deletions developers/node-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

Expand All @@ -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).
Expand Down Expand Up @@ -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.
:::
Expand Down Expand Up @@ -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 <key-name> --keyring-backend test --node.type light \
--p2p.network <network>
Expand Down
2 changes: 1 addition & 1 deletion developers/optimism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
:::
Expand Down
4 changes: 2 additions & 2 deletions nodes/arabica-9.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion nodes/arabica-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions nodes/bridge-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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)
Expand Down
2 changes: 1 addition & 1 deletion nodes/celestia-node-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Here is an example for Mainnet Beta:
```sh
celestia <node-type> start --metrics.tls=true \
--metrics --metrics.endpoint otel.celestia.observer \
--p2p.network <network> --core.ip <URI>
--core.ip <URI>
```

Add metrics flags to your node start command and restart your node to apply it.
Expand Down
59 changes: 38 additions & 21 deletions nodes/celestia-node-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,43 @@ description: A guide to troubleshooting common issues with Celestia Node.
# Troubleshooting

<!-- markdownlint-disable MD013 -->
<!-- markdownlint-disable MD033 -->
<script setup>
import constants from '/.vitepress/constants/constants.js'
</script>

## Network selection

Note: If you do not select a network, the default network will be Mainnet Beta.

```sh
celestia <node-type> init --p2p.network <network>
celestia <node-type> start --p2p.network <network> --core.ip <URI>
```

:::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

Expand All @@ -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).
Expand Down Expand Up @@ -73,26 +110,6 @@ To show the keys you should add `--keyring-dir` like this example:
--keyring-dir /home/user/celestia-<node-type>-location/keys/
```

## Network selection

Note: If you do not select a network, the default network will be 'Mocha'.

```sh
celestia <node-type> init --p2p.network <network>
celestia <node-type> start --p2p.network <network> --core.ip <URI>
```

:::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:
Expand Down
5 changes: 5 additions & 0 deletions nodes/full-storage-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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)
Expand Down
5 changes: 5 additions & 0 deletions nodes/light-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ To start the light node with a connection to a validator node's gRPC endpoint
celestia light start --core.ip <URI> --p2p.network <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),
Expand Down
2 changes: 1 addition & 1 deletion nodes/mocha-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4250f24

Please sign in to comment.