From 258582ce4bcf9a23826c9fcd1c4f10df3237cf3e Mon Sep 17 00:00:00 2001 From: wcatz Date: Fri, 13 Mar 2026 09:50:49 -0400 Subject: [PATCH] docs: fix README inaccuracies from code review - Stake snapshots: NtC primary, Koios fallback (was "Koios API") - Add ntcHost to full mode config example - Fix stability window table: formulas were swapped with freeze points - Remove dead ticker config key from quick start and config.yaml.example - Add /menu command to Telegram commands table - Add localquery.go and securekey.go to architecture table --- README.md | 17 ++++++++++------- config.yaml.example | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cf8d5c7..c53525f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Edit `config.yaml`: ```yaml mode: "lite" poolId: "YOUR_POOL_ID_HEX" -ticker: "DUCK" poolName: "My Pool" nodeAddress: host1: "your-node:3001" @@ -63,7 +62,8 @@ Adds full chain sync, self-computed nonces, and local leader schedule calculatio ```yaml mode: "full" nodeAddress: - host1: "your-node:3001" + host1: "your-node:3001" # NtN (chain sync) + ntcHost: "your-node:30000" # NtC (stake queries, tip) — or UNIX socket path leaderlog: enabled: true @@ -139,10 +139,10 @@ Epoch 259's nonce is hardcoded because it is the only mainnet epoch where the `e The next epoch's nonce becomes deterministic after the stability window. duckBot triggers leader schedule calculation automatically at this point. -| Era | Stability Window | Slots Before Epoch End | -|-----|-----------------|----------------------| -| Shelley–Babbage | `3k/f` = 302,400 slots | 129,600 (~1.5 days) | -| Conway | `4k/f` = 259,200 slots | 172,800 (~2 days) | +| Era | Margin (`k`/`f`) | Freeze Point | Slots Before Epoch End | +|-----|-------------------|-------------|----------------------| +| Shelley–Babbage | `3k/f` = 129,600 | 302,400 (70%) | 129,600 (~1.5 days) | +| Conway | `4k/f` = 172,800 | 259,200 (60%) | 172,800 (~2 days) | ### Historical Sync Pipeline @@ -172,7 +172,7 @@ sync.go (NtN ChainSync) → blockCh [10,000 buf] → batch writer → InsertBloc | **Set** | End of epoch N-2 | Current epoch | | **Go** | End of epoch N-3 | Previous epoch | -Queried via Koios API. +Queried via NtC `QueryPoolStakeSnapshots` (primary) with Koios API fallback. ### DB Integrity Check @@ -188,6 +188,7 @@ If nonce is stale but blocks valid: recompute from `blocks` table. | Command | Description | |---------|-------------| +| `/menu` | Inline keyboard with all commands (primary group chat interface) | | `/help` | Available commands | | `/status` | DB sync status | | `/tip` | Current chain tip | @@ -254,8 +255,10 @@ helm install goduckbot oci://ghcr.io/wcatz/helm-charts/goduckbot | `cli.go` | CLI subcommands (version, leaderlog, nonce, history) | | `commands.go` | Telegram bot command handlers | | `integrity.go` | Startup DB validation (FindIntersect + nonce repair) | +| `localquery.go` | NtC local state queries (QueryTip, QueryPoolStakeSnapshots) | | `store.go` | Store interface + SQLite implementation | | `db.go` | PostgreSQL implementation (pgx CopyFrom) | +| `securekey.go` | mmap/mlock/mprotect for VRF key material | ### Key Dependencies diff --git a/config.yaml.example b/config.yaml.example index 056a255..24c0f34 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -6,7 +6,6 @@ mode: "lite" poolId: "YOUR_POOL_ID" -ticker: "TICKER" poolName: "Pool Name" nodeAddress: # Docker Compose (UNIX socket — recommended):