upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.rs
AgeCommit message (Collapse)Author
9 daysFix discovery: use fetch_events_from with index_relays onlyYour Name
The nostr-sdk pool fetch_events returns empty when most relays are dead. Target only the known-working index relays for discovery queries.
9 daysFix discovery: wait for relay connections, add per-npub logging, suppress ↵Your Name
relay pool spam
9 daysFix compile issues for NIP-46 buildYour Name
- nip46.rs: match on owned RelayPoolNotification (not .as_ref()) - git_mirror.rs: accept shared nostr_sdk::Client for state event publishing - main.rs: pass nostr_client to mirror_repo_to_servers - NIP46-PLAN.md: full implementation checklist and roadmap - PLAN.md: updated
9 daysAdd NIP-46 remote signing for kind:30618 state eventsYour Name
- nip46.rs: full NIP-46 client with session management, NIP-04 encrypted relay-based communication, oneshot response awaiting - db.rs: nip46_sessions table, upsert/get methods - config.rs: Nip46Config with relays + signing_timeout_secs - git_mirror.rs: builds unsigned kind:30618 state event from bare repo refs, signs via NIP-46 before push, publishes to target server relay - http_health.rs: exposes NIP-46 session status in health endpoint - main.rs: wires NIP-46 client into daemon startup, passes to mirror_cycle
9 daysFix push_target remote reuse and non-fatal per-repo errorsYour Name
- git_mirror: reuse existing push_target remote via remote_set_url instead of failing on 'remote already exists' on subsequent cycles - mirror_cycle: catch per-repo errors instead of propagating with ? so one failed clone doesn't abort the remaining 87 repos - Add PLAN.md with bug tracking checklist
10 daysAdd HTTP health endpoint on /health and /api/mirror-healthYour Name
- New axum-based health server on port 7335 (configurable via health_port) - Reports status, uptime, cycle_count, last_cycle_ok as JSON - Status is 'ok' on startup and after successful cycles, 'degraded' after failures - Config: storage.health_port defaults to 7335 - Spawned alongside daemon loop, independent of mirror cycles
10 daysfeat: initial implementation of grasp-mirror daemonYour Name
GRASP mirror daemon that discovers repos from watched npubs and mirrors git data + Nostr events across all known GRASP servers for redundancy. Features: - Configurable npub watch list via .env (MIRROR_NPUBS) - TOML config for GRASP server list, index relays, storage paths - NIP-11 verification of GRASP servers on startup - Discovery of repos via kind:30617 announcements on index relays - Git mirroring (bare clone + push --mirror) to missing GRASP servers - Nostr event forwarding to all GRASP server embedded relays - SQLite state tracking for sync status and event dedup - Optional signing key for updating announcements with new clone URLs - CLI subcommands: daemon, status, verify, mirror-once Architecture: config.rs - TOML + .env config loading db.rs - SQLite state tracking health.rs - NIP-11 GRASP server verification discovery.rs - Relay subscription, kind:30617 parsing git_mirror.rs - Bare clone + push to GRASP servers nostr_mirror.rs - Event forwarding to all GRASP relays signing.rs - Optional announcement updates main.rs - CLI entry point, daemon loop