Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
34 changes: 19 additions & 15 deletions docs/nodes/_run-a-validator/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
---

import vidThumbnail from './images/vid_thumb_become_producer.png';
import vidThumbnail from "./images/vid_thumb_become_producer.png";

# Become a Midnight Block Producer

Expand All @@ -20,19 +20,23 @@ This documentation is designed to guide you through the process of becoming a Mi
## Prerequisites

#### Must-have skills

- Proficiency in setting up, running, and monitoring blockchain nodes consistently
- Proficiency in CLI usage, system administration, and networking
- Experience with blockchain technologies, especially Cardano stake pool operations

#### Nice-to-have skills

- Familiarity with scripting languages (e.g., Bash, Python) for automation
- Understanding of security best practices for blockchain infrastructure

#### Must-have gear

- Reliable internet connection with minimal downtime. 50 MB/s or more is sufficient.
- Adequate hardware to run a full node (CPU, RAM, and storage requirements as per the latest documentation)

#### Nice-to-have gear

- Redundant internet connection to ensure high availability
- Backup power supply to prevent downtime during power outages

Expand All @@ -48,7 +52,7 @@ To let Midnight evolve without resetting the chain, new versions of node softwar

:::

## Midnight Block Production Overview
## Midnight Block Production Overview

```mermaid
sequenceDiagram
Expand Down Expand Up @@ -129,8 +133,8 @@ Most node operators manage their servers and infrastructure remotely from their

If you are using WSL, then please use:

* Ubuntu 22.04 (or equivalent)
* [GLIBC](https://www.gnu.org/software/libc/) 2.35
- Ubuntu 22.04 (or equivalent)
- [GLIBC](https://www.gnu.org/software/libc/) 2.35

Check current GLIBC version in WSL:

Expand All @@ -152,26 +156,26 @@ These are estimated system requirements for each service used within Midnight va

Here's the updated table with the versions filled in:

| Service | Quantity | CPU `testnet` | CPU `mainnet` | Memory `testnet` | Memory `mainnet` | Storage `testnet` | Storage `mainnet` |
|--------------------|----------|---------------|---------------|------------------|------------------|-------------------|--------------------------|
| **Cardano DB Sync**| 1 | 4 VCPU | 4 VCPU | 32 GB RAM | 32 GB RAM | 20 GB free | 320 GB free |
| **Cardano Node** | 2 | 2 VCPU | 4 VCPU | 4 GB RAM | 16 GB RAM | 20 GB free | 250 GB free |
| **PostgreSQL** | 1 | 0.5 VCPU | 1 VCPU | 1 GB RAM | 1 GB RAM | - | - |
| **Midnight Node** | 1 | 4 VCPU | 8 VCPU | 16 GB RAM | 32 GB RAM | 40 GB free | TBD |
| **Ogmios** | 1 | 0.5 VCPU | 1 VCPU | 1 GB RAM | 2 GB RAM | - | - |

| Service | Quantity | CPU `testnet` | CPU `mainnet` | Memory `testnet` | Memory `mainnet` | Storage `testnet` | Storage `mainnet` |
| ------------------- | -------- | ------------- | ------------- | ---------------- | ---------------- | ----------------- | ----------------- |
| **Cardano DB Sync** | 1 | 4 VCPU | 4 VCPU | 32 GB RAM | 32 GB RAM | 20 GB free | 320 GB free |
| **Cardano Node** | 2 | 2 VCPU | 4 VCPU | 4 GB RAM | 16 GB RAM | 20 GB free | 250 GB free |
| **PostgreSQL** | 1 | 0.5 VCPU | 1 VCPU | 1 GB RAM | 1 GB RAM | - | - |
| **Midnight Node** | 1 | 4 VCPU | 8 VCPU | 16 GB RAM | 32 GB RAM | 40 GB free | TBD |
| **Ogmios** | 1 | 0.5 VCPU | 1 VCPU | 1 GB RAM | 2 GB RAM | - | - |

:::tip
:::tip

An existing Cardano relay node can be repurposed for `cardano-db-sync` if the operational setup permits.

:::

## Public endpoints

Midnight-node uses partner-chains CLI commands which require on an Ogmios connect. While you may run Ogmios locally, we provide a public endpoint for the service.
Midnight-node uses partner-chains CLI commands which require on an Ogmios connect. While you may run Ogmios locally, we provide public endpoints for the service.

* [ogmios.testnet-02.midnight.network](https://ogmios.testnet-02.midnight.network)
- [ogmios.preview.midnight.network](https://ogmios.preview.midnight.network)
- [ogmios.preprod.midnight.network](https://ogmios.preprod.midnight.network)

### Network and Security Considerations for Testnet:

Expand Down
18 changes: 9 additions & 9 deletions docs/nodes/_run-a-validator/step-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ To embark on the path of becoming a Midnight validator, one must either be, or b

## Supported environments

| Cardano env. | Status | Midnight env.
|----------|----------|----------|
| `preview` | ✅ | `testnet-02` |
| `preprod` | ❌ | N/A |
| `mainnet` | ❌ | N/A |
| Cardano env. | Status | Midnight env. |
| ------------ | ------ | ------------- |
| `preview` | ✅ | `preview` |
| `preprod` | ✅ | `preprod` |
| `mainnet` | ❌ | N/A |

## Become a Cardano SPO

Expand All @@ -24,8 +24,8 @@ To embark on the path of becoming a Midnight validator, one must either be, or b
1. Cardano node version [`10.1.4`](https://github.com/IntersectMBO/cardano-node/releases/tag/10.1.4). Please use this version.
2. 500 `tAda` + fee for stake pool pledge.
3. A UTXO for the Midnight validator registration fee, with its `payment.skey`.
3. SPO `cold.skey` will also be needed within the Midnight validator registration process.
4. Air-gapped device for secret storage (optional for testnets).
4. SPO `cold.skey` will also be needed within the Midnight validator registration process.
5. Air-gapped device for secret storage (optional for testnets).

:::info

Expand All @@ -48,5 +48,5 @@ graph TD;

---

- [Preview testnet configuration files](https://book.world.dev.cardano.org/env-preview.html#configuration-files)
- [Testnets faucet to request tADA](https://docs.cardano.org/cardano-testnet/tools/faucet/)
- [Preview testnet configuration files](https://book.world.dev.cardano.org/env-preview.html#configuration-files)
- [Testnets faucet to request tADA](https://docs.cardano.org/cardano-testnet/tools/faucet/)
101 changes: 75 additions & 26 deletions docs/nodes/boot-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,69 +19,118 @@ A **boot node** is a specialized type of node that helps other nodes connect to

Before setting up your Midnight boot node, ensure you have the following:

* [Docker](https://docs.docker.com/engine/install/) installed and configured.
* [Cardano-db-sync instance set up](./cardano-db-sync) with accessible PostgreSQL port.
* Sufficient resources (CPU, memory, and storage).
- [Cardano-db-sync instance set up](./cardano-db-sync) with accessible PostgreSQL port.
- Sufficient resources (CPU, memory, and storage).
- Either a precompiled binary or Rust toolchain (for building from source).

## Setting Up a Boot Node

### Step 1: Configure PostgreSQL Database
### Option 1: Using Binary Distribution (Recommended)

Set up a PostgreSQL instance with the following parameters:
The binary distribution method is the recommended approach for most users.

* **Host:** PostgreSQL server address.
* **Port:** Default 5432.
* *Username:** Database user.
* **Password:** Database password.
* **Database Name:** Name of the database (e.g., cexplorer).
#### Step 1: Download the Binary

### Step 2: Run the Docker Command for a Boot Node
Download the latest Midnight node binary from the [GitHub releases page](https://github.com/midnight-network/node/releases).

Use the following Docker command to set up your boot node:
```bash
# Example for Linux x86_64
wget https://github.com/midnight-network/node/releases/download/v<VERSION>/midnight-node-x86_64-linux
chmod +x midnight-node-x86_64-linux
```

Replace `<VERSION>` with the required version according to the [release compatibility matrix](../../relnotes/support-matrix).

#### Step 2: Run the Boot Node

To start a boot node for a network of your choice:

```bash
./midnight-node-x86_64-linux \
--chain preview \
--base-path ./chain-data \
--listen-addr /ip4/0.0.0.0/tcp/30333
```

Or for the preprod network:

```bash
./midnight-node-x86_64-linux \
--chain preprod \
--base-path ./chain-data \
--listen-addr /ip4/0.0.0.0/tcp/30333
```

### Option 2: Building from Source

For users who prefer to build from source:

#### Step 1: Clone the Repository

```bash
git clone https://github.com/midnight-network/node.git
cd node
```

#### Step 2: Build the Binary

```bash
cargo build --release
```

#### Step 3: Run the Boot Node

```bash
./target/release/midnight-node \
--chain preview \
--base-path ./chain-data \
--listen-addr /ip4/0.0.0.0/tcp/30333
```

### Option 3: Docker (Alternative)

If you prefer containerized deployment:

```bash
docker run \
--name midnight-boot-node \
--platform linux/amd64 \
-p 30333:30333 \
-v midnight-data:/node \
-e MIDNIGHT_NODE_IMAGE="midnightnetwork/midnight-node:<VERSION>" \
-e BASE_PATH="./node/chain/" \
-e CFG_PRESET="testnet" \
midnightnetwork/midnight-node:<VERSION> \
--chain=preview \
--listen-addr /ip4/0.0.0.0/tcp/30333 \
--bootnodes \
/dns/boot-node-01.testnet-02.midnight.network/tcp/30333/ws/p2p/12D3KooWMjUq13USCvQR9Y6yFzYNYgTQBLNAcmc8psAuPx2UUdnB \
--no-private-ip
```

Replace `<VERSION>` with the required version of the node according to the [release compatibility matrix](../../relnotes/support-matrix).

## Known Environment Boot Nodes

Use the corresponding boot nodes for your target environment.
Use the corresponding boot nodes for your target environment when starting a fallback or regular node.

### Preprod
### Preview

```bash
--bootnodes /dns/bootnode-1.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWQxxUgq7ndPfAaCFNbAxtcKYxrAzTxDfRGNktF75SxdX5 \
--bootnodes /dns/bootnode-2.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWNrUBs22FfmgjqFMa9ZqKED2jnxwsXWw5E4q2XVwN35TJ
--bootnodes /dns/bootnode-1.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \
--bootnodes /dns/bootnode-2.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWHqFfXFwb7WW4jwR8pr4BEf562v5M6c8K3CXAJq4Wx6ym
```

### Preview
### Preprod

```bash
--bootnodes /dns/bootnode-1.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \
--bootnodes /dns/bootnode-2.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWHqFfXFwb7WW4jwR8pr4BEf562v5M6c8K3CXAJq4Wx6ym
--bootnodes /dns/bootnode-1.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWQxxUgq7ndPfAaCFNbAxtcKYxrAzTxDfRGNktF75SxdX5 \
--bootnodes /dns/bootnode-2.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWNrUBs22FfmgjqFMa9ZqKED2jnxwsXWw5E4q2XVwN35TJ
```

## Verifying the Node

### Check Logs

Monitor the node's logs to ensure it syncs with the network:
Monitor the node's output to ensure it's running:

```bash
# Binary output logs to stdout
# For Docker:
docker logs -f <node-name>
```

Expand Down
Loading