upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/explanation/grasp-02-proactive-sync.md7
-rw-r--r--docs/reference/configuration.md17
2 files changed, 14 insertions, 10 deletions
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
758 758
759#### Phase 1: Basic Sync (commit b167f1b) 759#### Phase 1: Basic Sync (commit b167f1b)
760- [`SyncManager`](../../src/sync/manager.rs) - Main coordinator for proactive sync 760- [`SyncManager`](../../src/sync/manager.rs) - Main coordinator for proactive sync
761- Single relay sync via `NGIT_SYNC_RELAY_URL` configuration 761- Bootstrap relay sync via `NGIT_SYNC_BOOTSTRAP_RELAY_URL` configuration
762- Dynamic relay discovery from repository announcements that list our service
762- Event validation through existing [`Nip34WritePolicy`](../../src/nostr/builder.rs) 763- Event validation through existing [`Nip34WritePolicy`](../../src/nostr/builder.rs)
763 764
764#### Phase 2: Three-Layer Filters (commit bf558b0) 765#### Phase 2: Three-Layer Filters (commit bf558b0)
@@ -844,12 +845,14 @@ All configuration via environment variables or CLI flags:
844 845
845| Option | Type | Default | Description | 846| Option | Type | Default | Description |
846|--------|------|---------|-------------| 847|--------|------|---------|-------------|
847| `NGIT_SYNC_RELAY_URL` | String | None | Primary sync relay URL | 848| `NGIT_SYNC_BOOTSTRAP_RELAY_URL` | String | None | Bootstrap relay URL for initial sync |
848| `NGIT_SYNC_MAX_BACKOFF_SECS` | u64 | 3600 | Max backoff delay (seconds) | 849| `NGIT_SYNC_MAX_BACKOFF_SECS` | u64 | 3600 | Max backoff delay (seconds) |
849| `NGIT_SYNC_STARTUP_DELAY_SECS` | u64 | 30 | Catchup delay after startup | 850| `NGIT_SYNC_STARTUP_DELAY_SECS` | u64 | 30 | Catchup delay after startup |
850| `NGIT_SYNC_RECONNECT_DELAY_SECS` | u64 | 10 | Catchup delay after reconnect | 851| `NGIT_SYNC_RECONNECT_DELAY_SECS` | u64 | 10 | Catchup delay after reconnect |
851| `NGIT_SYNC_RECONNECT_LOOKBACK_DAYS` | u64 | 3 | Days to look back on reconnect | 852| `NGIT_SYNC_RECONNECT_LOOKBACK_DAYS` | u64 | 3 | Days to look back on reconnect |
852 853
854**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.
855
853### Module Structure (As Implemented) 856### Module Structure (As Implemented)
854 857
855``` 858```
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
269 269
270These options configure the proactive sync feature that synchronizes events from other relays. 270These options configure the proactive sync feature that synchronizes events from other relays.
271 271
272#### `NGIT_SYNC_RELAY_URL` 272#### `NGIT_SYNC_BOOTSTRAP_RELAY_URL`
273 273
274**Description:** URL of the primary relay to sync events from 274**Description:** URL of the bootstrap relay to initially sync events from
275**Type:** String (WebSocket URL) 275**Type:** String (WebSocket URL)
276**Default:** None (sync disabled) 276**Default:** None (relay discovery only)
277**Required:** No 277**Required:** No
278 278
279**Examples:** 279**Examples:**
280```bash 280```bash
281# Sync from a public relay 281# Sync from a public relay
282NGIT_SYNC_RELAY_URL=wss://relay.example.com 282NGIT_SYNC_BOOTSTRAP_RELAY_URL=wss://relay.example.com
283 283
284# Sync from another GRASP relay 284# Sync from another GRASP relay
285NGIT_SYNC_RELAY_URL=wss://git.nostr.dev 285NGIT_SYNC_BOOTSTRAP_RELAY_URL=wss://git.nostr.dev
286 286
287# Local testing 287# Local testing
288NGIT_SYNC_RELAY_URL=ws://127.0.0.1:8081 288NGIT_SYNC_BOOTSTRAP_RELAY_URL=ws://127.0.0.1:8081
289``` 289```
290 290
291**Notes:** 291**Notes:**
292- When set, enables proactive sync feature 292- Bootstrap relay provides initial sync source on startup
293- The relay will discover additional relays from repository announcements 293- Additional relays are **automatically discovered** from repository announcements that list our service
294- Even without a bootstrap relay, sync will discover relays from stored announcements
294- Synced events go through the same validation as directly-submitted events 295- Synced events go through the same validation as directly-submitted events
295- Use WebSocket protocol (`ws://` or `wss://`) 296- Use WebSocket protocol (`ws://` or `wss://`)
296 297