Skip to content

Commit

Permalink
feat(website): add sepolia node running guide (#14028)
Browse files Browse the repository at this point in the history
  • Loading branch information
d1onys1us committed Jun 22, 2023
1 parent a5085a1 commit e5e7b0e
Show file tree
Hide file tree
Showing 6 changed files with 5,341 additions and 1,033 deletions.
4 changes: 2 additions & 2 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@vercel/analytics": "^1.0.1",
"next": "^13.4.5",
"next": "^13.4.6",
"next-themes": "^0.2.1",
"nextra": "^2.7.1",
"nextra-theme-docs": "^2.7.1",
Expand All @@ -19,7 +19,7 @@
"devDependencies": {
"@heroicons/react": "^2.0.18",
"@types/node": "^20.3.1",
"@types/react": "^18.2.12",
"@types/react": "^18.2.13",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.24",
"tailwindcss": "^3.3.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/website/pages/docs/guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ You can leave feedback [here](https://docs.google.com/forms/d/1Vn10tqZW0bPvNUItz
- 🎈 [Receive tokens](/docs/guides/receive-tokens)
- 🌉 [Use the bridge](/docs/guides/use-the-bridge)
- 🔄 [Swap tokens](/docs/guides/swap-tokens)
- 🌐 [Run a node](/docs/guides/run-a-node)
- 🌐 [Run a Taiko node](/docs/guides/run-a-node)
- 🌳 [Run a Sepolia node](/docs/guides/run-a-sepolia-node)
- 📤 [Enable a proposer](/docs/guides/enable-a-proposer)
-[Enable a prover](/docs/guides/enable-a-prover)
- 🚀 [Deploy a contract](/docs/guides/deploy-a-contract)
Expand Down
5 changes: 4 additions & 1 deletion packages/website/pages/docs/guides/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"title": "🔄 Swap tokens"
},
"run-a-node": {
"title": "🌐 Run a node"
"title": "🌐 Run a Taiko node"
},
"run-a-sepolia-node": {
"title": "🌳 Run a Sepolia node"
},
"enable-a-proposer": {
"title": "📤 Enable a proposer"
Expand Down
15 changes: 12 additions & 3 deletions packages/website/pages/docs/guides/run-a-node.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs";

# Run a node
# Run a Taiko node

## Overview

Expand All @@ -13,7 +13,7 @@ This guide will walk you through the process of operating a Taiko node via [simp

- [Docker](https://docs.docker.com/engine/install/) is installed and **running**.
- [Git](https://github.com/git-guides/install-git/) is installed.
- Consult the [Geth minimum hardware requirements](https://github.com/ethereum/go-ethereum#hardware-requirements), with the exception of 1TB of free space (~50GB should be more than enough initially, but over time it could become insufficient as the chain grows).
- Consult the [Geth minimum hardware requirements](https://github.com/ethereum/go-ethereum#hardware-requirements), but ignore the storage requirement as Taiko nodes will require less storage. Around 50GB should be more than enough initially, but over time it could become insufficient as the chain grows. As of `2023-06-21T16:59:11+00:00` a Taiko node sync takes **17.3 GB**.

## Steps

Expand Down Expand Up @@ -59,9 +59,18 @@ Finally, set the following environment variables:
- L1_ENDPOINT_HTTP
- L1_ENDPOINT_WS

If you are running a local Sepolia node, you cannot reference the L1 endpoints as `http://127.0.0.1:8545` and `ws://127.0.0.1:8546` because that is local to inside the simple-taiko-node Docker image. Depending on your firewall setup, you can do a few things. You can try:
- Using `host.docker.internal` (see: https://stackoverflow.com/questions/24319662)
- Using the local ip address of your machine (use something like `ip addr show` to get the ip address)

<Callout>
You can get a Sepolia L1 endpoint from a few places, but it **must point to an archive node** to access the state trie beyond the last 128 blocks.
[Alchemy](https://www.alchemy.com/) and [Infura](https://www.infura.io/) are two popular RPC providers. **Make sure you select the RPC as Sepolia testnet, and not Ethereum mainnet**.

**Recommended**:
Run your own Sepolia archive node, see: [Run a Sepolia node](/docs/guides/run-a-sepolia-node). This is recommended because you will eventually be rate-limited by public RPC providers.

**Alternative**:
[Alchemy](https://www.alchemy.com/) and [Infura](https://www.infura.io/) are two popular RPC providers. Make sure you select the RPC as Sepolia testnet, and not Ethereum mainnet.
</Callout>

### Enable your node as a proposer (optional)
Expand Down
46 changes: 46 additions & 0 deletions packages/website/pages/docs/guides/run-a-sepolia-node.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs";

# Run a Sepolia node

## Overview

This guide will help you get a Sepolia archive node up and running.

## Prerequisites

- [Docker](https://docs.docker.com/engine/install/) is installed and **running**.
- [Git](https://github.com/git-guides/install-git/) is installed.
- As of `2023-06-21T16:59:11+00:00` a full archive node sync takes **207.3 GB** with geth + lighthouse. Consult the hardware requirements of the execution + consensus clients you are using.

## Steps

<Steps>
### Clone eth-docker
```sh
git clone https://github.com/eth-educators/eth-docker
cd eth-docker
```

### Enable archive mode

First, copy `default.env` to `.env`:
```
cp default.env .env
```

Next, open the `.env` file in your preferred text editor and set:
```filename=e
ARCHIVE_NODE=true
```

### Complete the eth-docker quickstart

Complete the eth-docker quickstart: https://eth-docker.net/Usage/QuickStart/.
</Steps>

### Harden your network

This is important especially if you `ssh` into machine or open ports to the internet (be careful about that). Here are some recommended resources:
- https://eth-docker.net/Usage/LinuxSecurity
- https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/guide-or-security-best-practices-for-a-eth2-validator-beaconchain-node
- https://tailscale.com/kb/1077/secure-server-ubuntu-18-04/ (but also see: https://danthesalmon.com/ufw-docker-tailscale/, `tailscale0` may not behave as you think)
Loading

0 comments on commit e5e7b0e

Please sign in to comment.