Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: split consensus node page #1472

Merged
merged 6 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,14 @@ function sidebarHome() {
{ text: "Bridge node", link: "/nodes/bridge-node" },
],
},
{ text: "Consensus", link: "/nodes/consensus-node" },
{
text: "Consensus",
collapsed: true,
items: [
{ text: "Full consensus node", link: "/nodes/full-consensus-node" },
{ text: "Validator node", link: "/nodes/validator-node" },
],
},
{
text: "IBC relayers",
collapsed: true,
Expand Down
2 changes: 1 addition & 1 deletion developers/blobstream-proof-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Learn how to query the inclusion proofs used in Blobstream

## Prerequisites

- Access to a Celestia [consensus full node](../nodes/consensus-node.md)
- Access to a Celestia [full consensus node](../nodes/full-consensus-node.md)
RPC endpoint (or full node). The node doesn't need to be a
validating node in order for the proofs to be queried. A full node is enough.

Expand Down
2 changes: 1 addition & 1 deletion nodes/arabica-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ in order to participate in Arabica devnet:

| Node type | Endpoint type | Endpoint |
| -------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **Consensus nodes** ([full](../nodes/consensus-node.md)) | Consensus RPC | `https://rpc.celestia-arabica-11.com` |
| **Consensus nodes** ([full](../nodes/full-consensus-node.md)) | Consensus RPC | `https://rpc.celestia-arabica-11.com` |
| | API | `https://api.celestia-arabica-11.com` |
| | gRPC | `grpc.celestia-arabica-11.com:443` |
| | Direct endpoints with open ports | Open ports: 26656 (p2p), 26657 (RPC), 1317 (API), 9090 (GRPC) |
Expand Down
3 changes: 2 additions & 1 deletion nodes/celestia-app-vesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ celestia-appd tx vesting create-vesting-account $TO_ADDRESS 100000utia 168674805
Running a full consensus node or validator will prevent you from needing
to use an RPC.

You can [set up a validator or full consensus node](../nodes/consensus-node.md)
You can set up a [validator](../nodes/validator-node.md)
or [full consensus node](../nodes/full-consensus-node.md)
for the previous portion of the tutorial.

Note: this may take some time depending on how you choose to sync the
Expand Down
2 changes: 1 addition & 1 deletion nodes/decide-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can also play around with the Data Availability API in
## Advanced

If you are looking to run a consensus node, please follow the
[tutorial for running a consensus node](./consensus-node.md).
[tutorial for running a consensus node](./full-consensus-node.md).
jcstein marked this conversation as resolved.
Show resolved Hide resolved

Note that running a validator means you must also run a bridge node,
which is covered in [this section](./bridge-node.md).
229 changes: 9 additions & 220 deletions nodes/consensus-node.md → nodes/full-consensus-node.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Learn how to set up a Celestia consensus node.
description: Learn how to set up a Celestia full consensus node.
jcstein marked this conversation as resolved.
Show resolved Hide resolved
outline: deep
---

jcstein marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -11,15 +11,11 @@ outline: deep
import constants from '/.vitepress/constants/constants.js'
</script>

This guide covers how to set up a full consensus node or a validator node on
Celestia.
Full consensus nodes allow you to sync blockchain history in the Celestia
consensus layer.
This guide covers how to set up a full consensus node on Celestia.
Full consensus nodes allow you to sync blockchain history in the Celestia consensus layer.

![full consensus node](/img/nodes/full-consensus-node.png)

[[toc]]

## Hardware requirements

The following hardware minimum requirements are recommended for running a
Expand All @@ -43,25 +39,25 @@ the node.
The following tutorial is done on an Ubuntu Linux 20.04 (LTS) x64
instance machine.

### Setup the dependencies
### Set up the dependencies

Follow the instructions on [installing dependencies](./environment.md).

### Install celestia-app

Follow the tutorial on [installing `celestia-app`](./celestia-app.md).

### Setup the P2P networks
### Set up the P2P networks
jcstein marked this conversation as resolved.
Show resolved Hide resolved

Now we will setup the P2P Networks by cloning the networks repository:
Now we will set up the P2P Networks by cloning the networks repository:

```sh
cd $HOME
rm -rf networks
git clone https://github.com/celestiaorg/networks.git
```

To initialize the network pick a "node-name" that describes your
To initialize the network, pick a "node-name" that describes your
node. Keep in mind that this might change if a new testnet is deployed.

::: code-group
Expand Down Expand Up @@ -176,7 +172,7 @@ min-retain-blocks = 0 # retain all block data, this is default setting

### Querying transactions by hash

If you want to query transactions using their hash, transaction
To query transactions using their hash, transaction
indexing must be turned on. Set the `indexer` to `"kv"` in your `config.toml`:

```toml
Expand Down Expand Up @@ -235,7 +231,7 @@ trust_height = 0
trust_hash = ""
```

to their respective fields. At least two different rpc endpoints should be provided.
To their respective fields. At least two different rpc endpoints should be provided.
The more, the greater the chance of detecting any fraudulent behavior.

Once setup, you should be ready to start the node as normal. In the logs, you should
Expand Down Expand Up @@ -300,213 +296,6 @@ Refer to
for information on which ports are required to be open on your machine.
:::

## Optional: Setting up a validator

### Setting up a Celestia validator node

Validator nodes allow you to participate in consensus in the Celestia network.

![validator node](/img/nodes/validator.png)

#### Validator hardware requirements

The following hardware minimum requirements are recommended for running a
validator node:

- Memory: **8 GB RAM**
- CPU: **6 cores**
- Disk: **500 GB SSD Storage**
- Bandwidth: **1 Gbps for Download/1 Gbps for Upload**

The following tutorial is done on an Ubuntu Linux 20.04 (LTS) x64
instance machine.

First, set up your full consensus node by following the instructions in
[the previous section](#setting-up-a-full-consensus-node).

#### Wallet

Follow [the tutorial on creating a wallet](../nodes/celestia-app-wallet.md).

#### Delegate stake to a validator

Create an environment variable for the address:

```bash
VALIDATOR_WALLET=<validator-wallet-name>
```

If you want to delegate more stake to any validator, including your own you
will need the `celesvaloper` address of the validator in question. You can run
the command below to get the `celesvaloper` of your local validator wallet in
case you want to delegate more to it:

```bash
celestia-appd keys show $VALIDATOR_WALLET --bech val -a
```

After entering the wallet passphrase you should see a similar output:

```bash
Enter keyring passphrase:
celesvaloper1q3v5cugc8cdpud87u4zwy0a74uxkk6u43cv6hd
```

To delegate tokens to the `celestiavaloper` validator, as an
example you can run:

```bash-vue
celestia-appd tx staking delegate \
celestiavaloper1q3v5cugc8cdpud87u4zwy0a74uxkk6u4q4gx4p 1000000utia \
--from=$VALIDATOR_WALLET --chain-id={{constants.mochaChainId}} \
--fees=21000utia
```

If successful, you should see a similar output as:

```console
code: 0
codespace: ""
data: ""
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: <tx-hash>
```

You can check if the TX hash went through using the block explorer by
inputting the `txhash` ID that was returned.

### Optional: Deploy the celestia-node

Running a bridge node is critical to the Celestia network as it enables
the data availability and consensus nodes to communicate with one
another. It is recommended to support the data availability network,
but is not required for `celestia-app`.

If you are not running a bridge node, you can skip to
[run a validator node](#run-the-validator-node).

This section describes part 2 of Celestia validator node setup: running a
Celestia bridge node daemon.

#### Install celestia-node

You can [follow the tutorial for installing `celestia-node`](./celestia-node.md)

#### Initialize the bridge node

Run the following:

```bash
celestia bridge init --core.ip <URI>
```

:::tip
Refer to
[the ports section of the celestia-node troubleshooting page](../../nodes/celestia-node-troubleshooting/#ports)
for information on which ports are required to be open on your machine.
:::

If you need a list of RPC endpoints to connect to, you can find the
[list on the Mocha testnet page](./mocha-testnet.md#rpc-endpoints) or
[list on the Arabica devnet page](./arabica-devnet.md#rpc-endpoints).

#### Run the bridge node

Run the following:

```bash
celestia bridge start
```

#### Optional: start the bridge node with SystemD

Follow
[the tutorial on setting up the bridge node as a background process with SystemD](../systemd).

You have successfully set up a bridge node that is syncing with the network.

### Run the validator node

In order to start your validator node, run the following:

```bash
celestia-appd start
```

After completing all the necessary steps, you are now ready to run a validator!
In order to create your validator onchain, follow the instructions below.
Keep in mind that these steps are necessary ONLY if you want to participate
in the consensus.

Pick a `moniker` name of your choice! This is the validator name that will show
up on public dashboards and explorers. `VALIDATOR_WALLET` must be the same you
defined previously. Parameter `--min-self-delegation=1000000` defines the
amount of tokens that are self delegated from your validator wallet.

Now, connect to the network of your choice.

You have the following option of connecting to list of networks shown below:

Continuing the validator tutorial, here are the steps to connect your
validator to Mocha:

```bash-vue
MONIKER="your_moniker"
VALIDATOR_WALLET="validator"

celestia-appd tx staking create-validator \
--amount=1000000utia \
--pubkey=$(celestia-appd tendermint show-validator) \
--moniker=$MONIKER \
--chain-id={{constants.mochaChainId}} \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1000000 \
--from=$VALIDATOR_WALLET \
--keyring-backend=test \
--fees=21000utia \
--gas=220000
```

You will be prompted to confirm the transaction:

```console
confirm transaction before signing and broadcasting [y/N]: y
```

Inputting `y` should provide an output similar to:

```console
code: 0
codespace: ""
data: ""
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: <tx-hash>
```

You should now be able to see your validator from
[a block explorer](./mocha-testnet.md#explorers)

### Submit your validator information

After starting your node, please submit your node as a seed and peer to the
[networks repository](https://github.com/celestiaorg/networks).

## Extra resources for consensus nodes

### Optional: Reset network
Expand Down
2 changes: 1 addition & 1 deletion nodes/instantiate-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ or if you want to test out new features to build as a core developer.
## Hardware requirements

You will need to
[follow hardware requirements](./consensus-node.md#validator-hardware-requirements).
[follow hardware requirements](./validator-node#hardware-requirements).

## Setup dependencies

Expand Down
4 changes: 2 additions & 2 deletions nodes/mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ to participate in Mainnet Beta:

### Consensus nodes

- [Full consensus node](./consensus-node.md)
- [Validator node](./consensus-node.md#optional-setting-up-a-validator)
- [Full consensus node](./full-consensus-node)
- [Validator node](./validator-node)

#### Consensus RPC endpoints

Expand Down
6 changes: 3 additions & 3 deletions nodes/mocha-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ participate in Mocha:

Consensus:

- [Full consensus node](./consensus-node.md)
- [Validator node](./consensus-node.md#optional-setting-up-a-validator)
- [Full consensus node](./full-consensus-node)
- [Validator node](./validator-node)

Data Availability:

Expand Down Expand Up @@ -64,7 +64,7 @@ node.
:::tip Bridge nodes
Mentioned below RPC endpoints do not guarantee you the download of full blocks from
them. We advise that if you are running a bridge node, that you also
run a local [full consensus node](./consensus-node.md) in order to download
run a local [full consensus node](./full-consensus-node.md) in order to download
full blocks from it.
:::

Expand Down
Loading
Loading