From 9f3b897cfb05ac2b081ddf79c72d6f36d71bfdcf Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 12:15:42 +0100 Subject: [PATCH] docs: add home node and exit node guides for home users Co-Authored-By: Charon --- Home.md | 9 +++- Run-a-Node.md | 92 +++++++++++++++++++++++++++++++ Run-an-Exit-Node.md | 129 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 228 insertions(+), 2 deletions(-) create mode 100644 Run-a-Node.md create mode 100644 Run-an-Exit-Node.md diff --git a/Home.md b/Home.md index 952a74d..2f45788 100644 --- a/Home.md +++ b/Home.md @@ -2,12 +2,17 @@ Lethean blockchain — Zano fork with ProgPoWZ mining, confidential assets, and the Lethean Name Service. -## Quick Links +## For Home Users + +- [Run a Node](Run-a-Node) — support the network and earn staking rewards +- [Run an Exit Node](Run-an-Exit-Node) — provide VPN bandwidth and earn LTHN +- [Mining Guide](Mining-Guide) — mine with your GPU + +## Reference - [Getting Started](Getting-Started) — what Lethean is, specifications, and tokenomics - [Ecosystem](Ecosystem) — all repos, images, ports, and architecture - [Docker Deployment](Docker-Deployment) — run the full ecosystem in Docker -- [Mining Guide](Mining-Guide) — connect a miner to the pool - [Staking Guide](Staking-Guide) — earn rewards through Proof-of-Stake - [Chain Status](Chain-Status) — current testnet state - [Services](Services) — all ecosystem services and ports diff --git a/Run-a-Node.md b/Run-a-Node.md new file mode 100644 index 0000000..67e9954 --- /dev/null +++ b/Run-a-Node.md @@ -0,0 +1,92 @@ +# Run a Home Node + +Support the Lethean network and earn staking rewards from home. + +## What You Get + +- A full chain node that syncs and validates the blockchain +- Automatic PoS (Proof of Stake) staking — earn LTHN for securing the network +- P2P peering — other nodes connect to yours + +## Requirements + +- Linux with Docker installed +- 2GB RAM, 10GB disk space +- Internet connection (no static IP needed for basic node) + +## Quick Start + +```bash +# Download the compose file +curl -O https://forge.lthn.ai/lthn/blockchain/raw/branch/dev/docker/docker-compose.node.yml +curl -O https://forge.lthn.ai/lthn/blockchain/raw/branch/dev/docker/.env.example + +# Configure +cp .env.example .env +# Edit .env — set WALLET_PASSWORD + +# Start +docker compose -f docker-compose.node.yml up -d +``` + +## Check Status + +```bash +# Chain sync progress +docker logs lthn-node --tail 5 + +# Wallet balance (staking rewards accumulate here) +curl -s http://localhost:46944/json_rpc \ + -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' \ + -H 'Content-Type: application/json' + +# Your wallet address (share this to receive LTHN) +curl -s http://localhost:46944/json_rpc \ + -d '{"jsonrpc":"2.0","id":"0","method":"getaddress"}' \ + -H 'Content-Type: application/json' +``` + +## Optional: Open P2P Port + +For a full node that helps the network, open port **46942 TCP** on your router. This lets other nodes connect to you directly. + +Without port forwarding your node still works — it connects outward to other nodes but can't accept incoming connections. + +## Optional: GPU Mining + +Connect a ProgPoWZ miner to earn additional block rewards: + +```bash +progminer -P stratum+tcp://YOUR_WALLET_ADDRESS@localhost:5555 +``` + +This requires running the mining pool alongside your node. See the [Mining Guide](Mining-Guide). + +## Staking Rewards + +Your wallet stakes automatically via `--do-pos-mining`. Rewards are proportional to your balance — the more LTHN you hold, the more frequently you'll earn PoS blocks. + +| Metric | Value | +|--------|-------| +| Block reward | 1 LTHN | +| Block time | ~120 seconds | +| PoS blocks per day | ~720 | +| Minimum stake | Any amount (no minimum) | +| Lock time | None (stake and spend freely) | + +## Backup Your Wallet + +```bash +docker compose -f docker-compose.node.yml stop wallet +docker cp lthn-wallet:/wallet ./wallet-backup-$(date +%Y%m%d) +docker compose -f docker-compose.node.yml start wallet +``` + +**Keep your wallet backup safe.** If you lose it, you lose your LTHN. + +## Stopping + +```bash +docker compose -f docker-compose.node.yml down # stop (keeps data) +docker compose -f docker-compose.node.yml down -v # stop + delete everything +``` diff --git a/Run-an-Exit-Node.md b/Run-an-Exit-Node.md new file mode 100644 index 0000000..9a40f07 --- /dev/null +++ b/Run-an-Exit-Node.md @@ -0,0 +1,129 @@ +# Run a VPN Exit Node + +Earn LTHN by providing bandwidth to the Lethean dVPN network. + +## How It Works + +1. You run a WireGuard VPN server on your home connection +2. Your node registers itself on the Lethean blockchain +3. Gateway nodes discover your exit node and route VPN traffic through it +4. You earn LTHN for every session served + +``` +VPN User → Gateway → [encrypted tunnel] → Your Exit Node → Internet +``` + +## What You Get + +- Full chain node with PoS staking rewards +- WireGuard VPN exit server +- Automatic gateway peering via on-chain discovery +- LTHN earnings from bandwidth + staking + +## Requirements + +- Linux with Docker installed +- **Public IP address** (or port forwarding on your router) +- Open ports: **46942 TCP** (P2P) and **51820 UDP** (WireGuard) +- 2GB RAM, 10GB disk space +- Stable internet connection + +## Quick Start + +```bash +# Download compose and config +curl -O https://forge.lthn.ai/lthn/blockchain/raw/branch/dev/docker/docker-compose.exit.yml +curl -O https://forge.lthn.ai/lthn/blockchain/raw/branch/dev/docker/.env.example + +# Configure +cp .env.example .env +``` + +Edit `.env` with your details: + +```bash +WALLET_PASSWORD=your-secure-password +EXIT_PUBLIC_IP=203.0.113.50 # Your public IP +EXIT_NAME=my-exit # Your node name (optional) +EXIT_MAX_PEERS=25 # Max simultaneous VPN users +``` + +Start: + +```bash +docker compose -f docker-compose.exit.yml up -d +``` + +## Check Status + +```bash +# Controller logs (shows height, balance, peers) +docker logs lthn-exit-controller --tail 10 + +# WireGuard status +docker exec lthn-exit-wireguard wg show + +# Wallet balance +curl -s http://localhost:46944/json_rpc \ + -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' \ + -H 'Content-Type: application/json' +``` + +## Router Setup + +Open these ports on your home router: + +| Port | Protocol | Service | +|------|----------|---------| +| 46942 | TCP | Chain P2P (node peering) | +| 51820 | UDP | WireGuard VPN | + +### Finding Your Public IP + +```bash +curl -s ifconfig.me +``` + +Use this IP as `EXIT_PUBLIC_IP` in your `.env`. + +## On-Chain Registration + +When your wallet has at least 1 LTHN, the exit node can register an on-chain alias. This makes your node discoverable by gateways. + +The alias comment follows the Lethean service discovery protocol: + +``` +v=lthn1;type=exit;cap=vpn,proxy;ip=YOUR_PUBLIC_IP +``` + +Gateways query the chain for aliases with `type=exit` and route VPN sessions to your node. + +## Earnings + +| Source | How | +|--------|-----| +| PoS staking | Automatic — proportional to balance | +| VPN bandwidth | Per-session payments from gateways | +| Block rewards | Optional — connect a GPU miner | + +## Security + +- VPN traffic passes through your internet connection. You are the exit point. +- WireGuard encrypts all tunnel traffic between gateway and your node. +- The controller never exposes your wallet keys. +- Your ISP sees generic encrypted UDP traffic (WireGuard), not the tunnelled content. + +## Backup + +```bash +docker compose -f docker-compose.exit.yml stop wallet +docker cp lthn-exit-wallet:/wallet ./wallet-backup-$(date +%Y%m%d) +docker compose -f docker-compose.exit.yml start wallet +``` + +## Stopping + +```bash +docker compose -f docker-compose.exit.yml down # stop (keeps data) +docker compose -f docker-compose.exit.yml down -v # stop + delete everything +```