From 339b0c02f2cec25ae804dc882f5ce7d1dd58b9a6 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 5 Dec 2025 12:03:52 +0000 Subject: rename sunc_bootstrap_relay_url --- docs/explanation/grasp-02-proactive-sync.md | 7 +++++-- docs/reference/configuration.md | 17 +++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'docs') diff --git a/docs/explanation/grasp-02-proactive-sync.md b/docs/explanation/grasp-02-proactive-sync.md index 98531ec..666b048 100644 --- a/docs/explanation/grasp-02-proactive-sync.md +++ b/docs/explanation/grasp-02-proactive-sync.md @@ -758,7 +758,8 @@ The implementation closely follows the design document with the following comple #### Phase 1: Basic Sync (commit b167f1b) - [`SyncManager`](../../src/sync/manager.rs) - Main coordinator for proactive sync -- Single relay sync via `NGIT_SYNC_RELAY_URL` configuration +- Bootstrap relay sync via `NGIT_SYNC_BOOTSTRAP_RELAY_URL` configuration +- Dynamic relay discovery from repository announcements that list our service - Event validation through existing [`Nip34WritePolicy`](../../src/nostr/builder.rs) #### Phase 2: Three-Layer Filters (commit bf558b0) @@ -844,12 +845,14 @@ All configuration via environment variables or CLI flags: | Option | Type | Default | Description | |--------|------|---------|-------------| -| `NGIT_SYNC_RELAY_URL` | String | None | Primary sync relay URL | +| `NGIT_SYNC_BOOTSTRAP_RELAY_URL` | String | None | Bootstrap relay URL for initial sync | | `NGIT_SYNC_MAX_BACKOFF_SECS` | u64 | 3600 | Max backoff delay (seconds) | | `NGIT_SYNC_STARTUP_DELAY_SECS` | u64 | 30 | Catchup delay after startup | | `NGIT_SYNC_RECONNECT_DELAY_SECS` | u64 | 10 | Catchup delay after reconnect | | `NGIT_SYNC_RECONNECT_LOOKBACK_DAYS` | u64 | 3 | Days to look back on reconnect | +**Note:** Additional relays are automatically discovered from repository announcements (kind 30617) that list our service domain. The bootstrap relay provides an initial sync source but is not required - sync will discover relays from stored announcements. + ### Module Structure (As Implemented) ``` diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 80ae45c..204fbd1 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -269,28 +269,29 @@ NGIT_DATABASE_BACKEND=lmdb These options configure the proactive sync feature that synchronizes events from other relays. -#### `NGIT_SYNC_RELAY_URL` +#### `NGIT_SYNC_BOOTSTRAP_RELAY_URL` -**Description:** URL of the primary relay to sync events from +**Description:** URL of the bootstrap relay to initially sync events from **Type:** String (WebSocket URL) -**Default:** None (sync disabled) +**Default:** None (relay discovery only) **Required:** No **Examples:** ```bash # Sync from a public relay -NGIT_SYNC_RELAY_URL=wss://relay.example.com +NGIT_SYNC_BOOTSTRAP_RELAY_URL=wss://relay.example.com # Sync from another GRASP relay -NGIT_SYNC_RELAY_URL=wss://git.nostr.dev +NGIT_SYNC_BOOTSTRAP_RELAY_URL=wss://git.nostr.dev # Local testing -NGIT_SYNC_RELAY_URL=ws://127.0.0.1:8081 +NGIT_SYNC_BOOTSTRAP_RELAY_URL=ws://127.0.0.1:8081 ``` **Notes:** -- When set, enables proactive sync feature -- The relay will discover additional relays from repository announcements +- Bootstrap relay provides initial sync source on startup +- Additional relays are **automatically discovered** from repository announcements that list our service +- Even without a bootstrap relay, sync will discover relays from stored announcements - Synced events go through the same validation as directly-submitted events - Use WebSocket protocol (`ws://` or `wss://`) -- cgit v1.2.3