Skip to content
Merged
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
10 changes: 5 additions & 5 deletions app/build/rpc/components/DynamicRPCTOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @breaking-change-risk MEDIUM - Relies on Nextra's CSS class structure and selectors
*
* === HOW IT WORKS ===
* 1. MDX has a hidden "## Loading" heading → Nextra renders a TOC with one item
* 1. MDX has a hidden "## Celestia Node API" heading → Nextra renders a TOC with one item
* 2. This component finds that TOC list, caches its styling, and replaces items with dynamic content
* 3. MutationObserver watches for content changes (e.g., version switches) and updates the TOC
* 4. IntersectionObserver provides scroll-spy functionality for active highlighting
Expand All @@ -36,7 +36,7 @@
*
* 2. **Selector Changes** (see TOC_CONFIG below):
* - .nextra-toc ul (the TOC list container)
* - .nextra-toc a[href="#loading"] (placeholder item)
* - .nextra-toc a[href="#celestia-node-api"] (placeholder item)
* - main h2[id] (content headings)
*
* 3. **New Nextra TOC API**:
Expand Down Expand Up @@ -67,10 +67,10 @@ interface Heading {

// Configuration - centralized to reduce brittleness
const TOC_CONFIG = {
placeholderHeadingId: 'loading',
placeholderHeadingId: 'celestia-node-api',
selectors: {
tocList: '.nextra-toc ul',
placeholderItem: '.nextra-toc a[href="#loading"]',
placeholderItem: '.nextra-toc a[href="#celestia-node-api"]',
contentHeadings: 'main h2[id]',
scrollButton: '.nextra-toc button[type="button"]',
mainContent: 'main',
Expand Down Expand Up @@ -110,7 +110,7 @@ const toggleScrollButton = (button: HTMLButtonElement, show: boolean) => {

export function DynamicRPCTOC() {
useEffect(() => {
// Cache the classes from Nextra's rendered "Loading" item
// Cache the classes from Nextra's rendered "celestia-node-api" item
// We need to grab these ONCE before we remove it
let cachedLinkClasses = ''
let cachedLiClasses = ''
Expand Down
2 changes: 1 addition & 1 deletion app/build/rpc/components/NodeAPIContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export default function RPCDocumentation() {
<div className="x:text-sm x:text-gray-600 x:dark:text-gray-200 x:mb-8">
The Celestia Node API is the collection of RPC methods that can be used to interact with the services provided by Celestia Data Availability Nodes. Node API uses auth tokens to control access to this API.{' '}
<a
href={`https://node-rpc-docs.celestia.org/?version=${spec.info.version}`}
href={`https://github.com/celestiaorg/celestia-node/releases/tag/${spec.info.version}`}
target='_blank'
rel='noopener noreferrer'
className="x:text-primary-600 x:dark:text-primary-500 x:no-underline x:hover:underline"
Expand Down
2 changes: 1 addition & 1 deletion app/build/rpc/node-api/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DynamicRPCTOC } from "../components/DynamicRPCTOC";

<div style={{ display: 'none' }}>

Loading...
## Celestia Node API

The Celestia Node API is the collection of RPC methods that can be used to interact with the services provided by Celestia Data Availability Nodes. Node API uses auth tokens to control access to this API.

Expand Down
1 change: 1 addition & 0 deletions app/learn/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const meta = {
features: "Features",
TIA: "TIA",
"code-of-conduct": "Code of Conduct",
audits: "Audits",
};

export default meta;
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ This page provides a comprehensive list of audits conducted on various Celestia
| Blobstream X | Veridise | [Link](https://docs.celestia.org/audits/Blobstream_X-Veridise_Audit.pdf) |
| Blobstream X | Zellic | [Link](https://docs.celestia.org/audits/Blobstream_X-Zellic_Audit.pdf) |
| Shwap | OtterSec | [Link](https://docs.celestia.org/audits/celestia_shwap_audit_final.pdf) |
| v4 celestia-app | TBD | TBD |
| v5 celestia-app | TBD | TBD |
| ZK Sync | TBD | TBD |
| High throughput recovery | Informal Systems | [Link](https://github.com/celestiaorg/celestia-app/blob/main/docs/audit/informal-systems-recovery.pdf) |
1 change: 0 additions & 1 deletion app/operate/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const meta = {
"consensus-validators": "Consensus & validators",
maintenance: "Maintenance",
"keys-wallets": "Keys & wallets",
"optional-services": "Optional operator services",
};

export default meta;
1 change: 1 addition & 0 deletions app/operate/data-availability/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const meta = {
"bridge-node": "Run a bridge node",
"config-reference": "Configuration reference",
"custom-networks": "Custom networks & values",
"ibc-relayer": "IBC relayer setup",
metrics: "Metrics & dashboards",
"storage-optimization": "Storage optimization (ZFS)",
};
Expand Down
186 changes: 108 additions & 78 deletions app/operate/networks/local-devnet/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,25 @@
description: Learn how to set up a local devnet with Celestia consensus and bridge nodes.
---

import { Steps } from 'nextra/components'
import { Steps, Tabs } from 'nextra/components'

# Local devnet setup

This guide covers how to set up a local devnet with both consensus and bridge
nodes for development and testing purposes. A local devnet allows you to run a
complete Celestia network environment on your local machine.

## Prerequisites
## Choose your setup method

- [Install celestia-app](/operate/consensus-validators/install-celestia-app)
- [Install celestia-node](/operate/data-availability/install-celestia-node)
- [Install Docker and Docker Compose](https://docs.docker.com/get-docker)
(for Docker setup)

## Script-based setup

### Single consensus node

To start a local consensus node using the provided script:

1. Clone and build celestia-app:

```bash
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
make install
```

2. Run the single node script:

```bash
./scripts/single-node.sh
```

This script will:

- Initialize a new chain with a single validator
- Create a genesis file with pre-funded accounts
- Start the consensus node
- Make RPC endpoints available at `localhost:26657`

### Single consensus node + bridge node

To set up both a consensus node and a bridge node together:

1. Follow the consensus node setup above

2. In a new terminal, run the bridge node script:

```bash
./scripts/single-bridge-node.sh
```

This will:
Pick the approach you want to follow:

- Start a bridge node that connects to your local consensus node
- Enable data availability sampling
- Make the bridge node API available at `localhost:26658`
<Tabs items={['Docker Compose', 'From source (scripts)']}>
<Tabs.Tab>
<Steps>

## Docker setup
### Install Docker

For a containerized setup using Docker Compose, you can use a simplified
configuration based on the Celestia ZKEVM IBC demo repository.

<Steps>
Install [Docker and Docker Compose](https://docs.docker.com/get-docker).

### Create a Docker Compose file

Expand Down Expand Up @@ -135,58 +88,135 @@ Create a `docker-compose.yml` file with the following content:
docker-compose logs celestia-validator
docker-compose logs celestia-bridge
```
</Steps>
### Test your setup

## Default endpoints
1. Check consensus node status:

Once your local devnet is running, you can access these endpoints:
```bash
curl http://localhost:26657/status
```

| Service | Endpoint |
| --------------- | ------------------------ |
| Consensus RPC | `http://localhost:26657` |
| Consensus gRPC | `http://localhost:9090` |
| Consensus P2P | `http://localhost:26656` |
| Bridge node API | `http://localhost:26658` |
2. Query the latest block:

## Testing your setup
```bash
curl http://localhost:26657/block
```

3. Check the bridge node head:

You can test that your local devnet is working by:
```bash
curl http://localhost:26658/head
```

### Stop the devnet

Stop and remove containers:

```bash
docker-compose down
```

1. Checking node status:
### Reset / start fresh

Stop and remove containers **and wipe chain data** (volumes):

```bash
docker-compose down -v
```

</Steps>
</Tabs.Tab>

<Tabs.Tab>
<Steps>

### Install dependencies

- [Install celestia-app](/operate/consensus-validators/install-celestia-app)
- [Install celestia-node](/operate/data-availability/install-celestia-node)

### Start a single consensus node

1. Clone and build celestia-app:

```bash
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
make install
```

2. Run the single node script:

```bash
./scripts/single-node.sh
```

### Start a bridge node

In a new terminal, run the bridge node script:

```bash
./scripts/single-bridge-node.sh
```

### Test your setup

1. Check consensus node status:

```bash
curl http://localhost:26657/status
```

2. Querying the latest block:
2. Query the latest block:

```bash
curl http://localhost:26657/block
```

3. For bridge nodes, check the DA network info:
3. Check the bridge node head:

```bash
curl http://localhost:26658/head
```

## Stopping the devnet

### Stopping script-based setup
### Stop the devnet

Stop the processes with `Ctrl+C` in each terminal.

### Stopping Docker setup
### Reset / start fresh

Stop the node(s) with `Ctrl+C`, then reset the local chain state (be careful if you’re
running a real validator):

```bash
docker-compose down
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
```

To also remove the volumes:
For more reset options and safety notes (especially if you are running a validator), see
[Reset network](/operate/consensus-validators/consensus-node#optional-reset-network).

```bash
docker-compose down -v
```
</Steps>
</Tabs.Tab>
</Tabs>

## Default endpoints

Once your local devnet is running, you can access these endpoints:

| Service | Endpoint |
| --------------- | ------------------------ |
| Consensus RPC | `http://localhost:26657` |
| Consensus gRPC | `http://localhost:9090` |
| Consensus P2P | `http://localhost:26656` |
| Bridge node API | `http://localhost:26658` |

## Multi-validator private networks (not local-only)

This page focuses on a single-machine devnet. If you instead want to create a private
testnet across multiple machines/participants (genesis + gentx flow), start from:

- [Signing genesis for a new network](/operate/consensus-validators/cli-reference#signing-genesis-for-a-new-network)
- [Optional: Set persistent peers](/operate/consensus-validators/consensus-node#optional-set-persistent-peers)

## Next steps

Expand Down
7 changes: 0 additions & 7 deletions app/operate/optional-services/_meta.js

This file was deleted.

Loading
Loading