diff options
| author | Your Name <you@example.com> | 2026-05-27 17:49:26 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-27 17:49:26 +0530 |
| commit | 6081e562050ff85dfb3c7804766c0a6a20640df9 (patch) | |
| tree | afd3d1494b099a6e15064ec5ba8d9ff1bcd5336e | |
| parent | c21100ad4868cbe03124b61c411394a7ae2d078c (diff) | |
| -rw-r--r-- | PROGRESS.md | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/PROGRESS.md b/PROGRESS.md new file mode 100644 index 0000000..abab7c4 --- /dev/null +++ b/PROGRESS.md | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | # GRASP Mirror Daemon — Progress Tracker | ||
| 2 | |||
| 3 | ## Current Status: **Running, discovery working, push blocked** | ||
| 4 | |||
| 5 | The daemon is deployed and running on `23.182.128.226`. It discovers 75 repos across 3 npubs, clones them from source servers, but git push to `git.orangesync.tech` fails — likely needs authenticated `kind:30618` state event (requires NIP-46 pairing). | ||
| 6 | |||
| 7 | --- | ||
| 8 | |||
| 9 | ## Checklist | ||
| 10 | |||
| 11 | ### Phase 1: Build & Deploy | ||
| 12 | - [x] Rust project structure created (`/tmp/grasp-mirror/`) | ||
| 13 | - [x] All source modules implemented (config, db, git_mirror, nostr_mirror, discovery, health, nip46, signing) | ||
| 14 | - [x] NIP-46 remote signing client (session management, NIP-04 encryption, relay listener) | ||
| 15 | - [x] Fix compile errors (nip04/nip46 features, API mismatches, borrow checker) | ||
| 16 | - [x] Fix `secret_key()` → `to_secret_hex()`, `EventBuilder::new` args, async map_err | ||
| 17 | - [x] Build succeeds on VPS with Rust 1.95.0 (warnings only, no errors) | ||
| 18 | - [x] Binary installed at `/usr/local/bin/grasp-mirror` | ||
| 19 | - [x] Systemd service configured and enabled (`grasp-mirror.service`) | ||
| 20 | - [x] Config at `/etc/grasp-mirror/config.toml` | ||
| 21 | - [x] Env file at `/etc/grasp-mirror/env` with `MIRROR_NPUBS` | ||
| 22 | |||
| 23 | ### Phase 2: Discovery & Relay Connectivity | ||
| 24 | - [x] Service starts and connects to relays | ||
| 25 | - [x] NIP-46 sessions initialized (3 sessions, all unpaired) | ||
| 26 | - [x] Health endpoint live at `http://localhost:7335/health` | ||
| 27 | - [x] Fix: relay pool returns empty when most relays dead | ||
| 28 | - Root cause: `relay.orangesync.tech` and `ngit.orangesync.tech` have no event data | ||
| 29 | - Data lives on `git.orangesync.tech` (the GRASP server relay) | ||
| 30 | - Fix: use dedicated discovery client with only `wss://git.orangesync.tech` | ||
| 31 | - [x] Fix: suppress noisy relay pool retry logs (`nostr_relay_pool=warn`) | ||
| 32 | - [x] **75 repos discovered** (33 + 29 + 13 across 3 npubs) | ||
| 33 | - [x] NIP-11 server verification: `git.orangesync.tech` verified (GRASP-01, GRASP-02, GRASP-05, v1.0.2) | ||
| 34 | |||
| 35 | ### Phase 3: Git Mirror (In Progress) | ||
| 36 | - [x] Repos cloned from source URLs (some succeed, some fail — source URLs down) | ||
| 37 | - [ ] **Git push to `git.orangesync.tech` failing** — all pushes rejected | ||
| 38 | - Likely cause: GRASP server requires authenticated push (kind:30618 state event) | ||
| 39 | - State event signing requires NIP-46 pairing (Amber) | ||
| 40 | - Error: `failed to push mirror to https://git.orangesync.tech/...` | ||
| 41 | - [ ] Investigate GRASP server push auth requirements | ||
| 42 | - [ ] Verify clone URL format matches what GRASP expects | ||
| 43 | |||
| 44 | ### Phase 4: NIP-46 Pairing (Blocked — requires user action) | ||
| 45 | - [ ] Pair npub `c3e23eb5...` via Amber | ||
| 46 | - URI: `nostrconnect://2839411006e06e1c83b9cbd29a63ae7f58444e2fe03fa04e720e4eaff6e28fd2?metadata={"name":"grasp-mirror"}&relay=wss://relay.orangesync.tech&relay=wss://ngit.orangesync.tech` | ||
| 47 | - [ ] Pair npub `2c8db3b4...` via Amber | ||
| 48 | - URI: `nostrconnect://92d7842be1b30c4ea627447c30ec6fe555b6b0139136436233e2ee0aaa72990f?metadata={"name":"grasp-mirror"}&relay=wss://relay.orangesync.tech&relay=wss://ngit.orangesync.tech` | ||
| 49 | - [ ] Pair npub `56e9936d...` via Amber | ||
| 50 | - URI: `nostrconnect://9c273012cd08569fe3e8081643243b58a863707dff90c06cf156cf65703f50a4?metadata={"name":"grasp-mirror"}&relay=wss://relay.orangesync.tech&relay=wss://ngit.orangesync.tech` | ||
| 51 | - [ ] Verify pairing in health endpoint (`connected: true`) | ||
| 52 | - [ ] End-to-end test: sign kind:30618, push succeeds | ||
| 53 | |||
| 54 | ### Phase 5: Nostr Event Mirror | ||
| 55 | - [ ] Forward repo events (kind:30617, issues, PRs, comments) to target servers | ||
| 56 | - [ ] Sync all events for tracked npubs | ||
| 57 | - [ ] Verify event persistence in target server relays | ||
| 58 | |||
| 59 | ### Phase 6: Production Hardening | ||
| 60 | - [ ] Fix NIP-46 relay config (use `wss://git.orangesync.tech` instead of `relay.orangesync.tech`) | ||
| 61 | - [ ] Add more GRASP servers when they come online | ||
| 62 | - [ ] Test retry/backoff on failed clones | ||
| 63 | - [ ] Add monitoring/alerting | ||
| 64 | - [ ] Switch to Ansible-based deployment for ongoing updates | ||
| 65 | |||
| 66 | --- | ||
| 67 | |||
| 68 | ## Key Findings | ||
| 69 | |||
| 70 | 1. **Relay data location**: Event data for these npubs lives on `wss://git.orangesync.tech` (the GRASP server relay), NOT on `wss://relay.orangesync.tech` or `wss://ngit.orangesync.tech`. These relays appear to be different services (Tollgate Infrastructure Relay, ngit relay) that don't carry GRASP event data. | ||
| 71 | |||
| 72 | 2. **nostr-sdk pool behavior**: `fetch_events()` returns empty when most relays in the pool are dead. Use a separate client with only working relays, or use `fetch_events_from()` with known-good URLs. | ||
| 73 | |||
| 74 | 3. **Push auth**: GRASP servers likely require `kind:30618` state events for push authorization. Without NIP-46 pairing, the daemon can't sign state events, so all pushes fail. | ||
| 75 | |||
| 76 | --- | ||
| 77 | |||
| 78 | ## Architecture | ||
| 79 | |||
| 80 | ``` | ||
| 81 | VPS (23.182.128.226) | ||
| 82 | ├── grasp-mirror binary (/usr/local/bin/) | ||
| 83 | ├── config.toml (/etc/grasp-mirror/) | ||
| 84 | ├── env file (/etc/grasp-mirror/env) | ||
| 85 | ├── SQLite DB (/var/lib/grasp-mirror/mirror.db) | ||
| 86 | ├── Bare repos (/var/lib/grasp-mirror/repos/) | ||
| 87 | └── systemd service (grasp-mirror.service) | ||
| 88 | ├── Polls every 300s | ||
| 89 | ├── Discovers repos via wss://git.orangesync.tech | ||
| 90 | ├── Clones from source URLs (relay.ngit.dev, gitnostr.com, etc.) | ||
| 91 | ├── Signs state events via NIP-46 (Amber on phone) | ||
| 92 | └── Pushes to target GRASP servers | ||
| 93 | ``` | ||