diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-10 22:06:51 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-10 22:06:51 +0000 |
| commit | 2b082868713cb889677332344b559e45cf6a3c6c (patch) | |
| tree | bf553f1d27528c3ba75d22cc47de8bb153b48ae7 | |
| parent | 3ac8c0cc93b7e07881ce9ba036dd9d8f8b09cb4c (diff) | |
fix: sync .env.example with actual config in src/config.rs
Removed outdated options that don't exist in code:
- NGIT_SYNC_STARTUP_DELAY_SECS
- NGIT_SYNC_RECONNECT_DELAY_SECS
- NGIT_SYNC_RECONNECT_LOOKBACK_DAYS
- NGIT_SYNC_STARTUP_JITTER_MS
- NGIT_ARCHIVE_MODE (future/planned)
Added missing options that exist in code:
- NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS
- NGIT_SYNC_BASE_BACKOFF_SECS
- NGIT_SYNC_DISABLE_NEGENTROPY
- NGIT_REJECTED_HOT_CACHE_DURATION_SECS
- NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS
- NGIT_NAUGHTY_LIST_EXPIRATION_HOURS
All environment variables now match exactly between src/config.rs
and .env.example, with consistent defaults and descriptions.
| -rw-r--r-- | .env.example | 72 |
1 files changed, 45 insertions, 27 deletions
diff --git a/.env.example b/.env.example index 95db3c2..6a93d78 100644 --- a/.env.example +++ b/.env.example | |||
| @@ -121,30 +121,48 @@ | |||
| 121 | # Default: 3600 (1 hour) | 121 | # Default: 3600 (1 hour) |
| 122 | # NGIT_SYNC_MAX_BACKOFF_SECS=3600 | 122 | # NGIT_SYNC_MAX_BACKOFF_SECS=3600 |
| 123 | 123 | ||
| 124 | # Delay in seconds before running startup catchup | 124 | # Interval in seconds for checking disconnected relays and attempting reconnection |
| 125 | # CLI: --sync-startup-delay-secs <seconds> | 125 | # Set to lower value for faster reconnection testing |
| 126 | # Default: 30 | 126 | # CLI: --sync-disconnect-check-interval-secs <seconds> |
| 127 | # NGIT_SYNC_STARTUP_DELAY_SECS=30 | 127 | # Default: 60 |
| 128 | 128 | # NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS=60 | |
| 129 | # Delay in seconds before running reconnect catchup | 129 | |
| 130 | # CLI: --sync-reconnect-delay-secs <seconds> | 130 | # Base backoff time in seconds for relay reconnection |
| 131 | # Default: 10 | 131 | # Used for exponential backoff: base * 2^(failures-1) |
| 132 | # NGIT_SYNC_RECONNECT_DELAY_SECS=10 | 132 | # Set to 1 for faster test cycles |
| 133 | 133 | # Note: The connection timeout is capped at this value | |
| 134 | # Number of days to look back for reconnect catchup | 134 | # CLI: --sync-base-backoff-secs <seconds> |
| 135 | # CLI: --sync-reconnect-lookback-days <days> | 135 | # Default: 5 |
| 136 | # Default: 3 | 136 | # NGIT_SYNC_BASE_BACKOFF_SECS=5 |
| 137 | # NGIT_SYNC_RECONNECT_LOOKBACK_DAYS=3 | 137 | |
| 138 | 138 | # Disable NIP-77 negentropy sync (use REQ+EOSE instead) | |
| 139 | # Maximum startup jitter in milliseconds for sync connections | 139 | # When enabled, sync will use REQ+EOSE instead of negentropy for history sync |
| 140 | # Set to 0 to disable jitter (useful for testing) | 140 | # Primarily useful for testing that sync works without negentropy support |
| 141 | # CLI: --sync-startup-jitter-ms <ms> | 141 | # CLI: --sync-disable-negentropy |
| 142 | # Default: 10000 (10 seconds) | 142 | # Default: false |
| 143 | # NGIT_SYNC_STARTUP_JITTER_MS=10000 | 143 | # NGIT_SYNC_DISABLE_NEGENTROPY=false |
| 144 | 144 | ||
| 145 | # ============================================================================ | 145 | # ============================================================================ |
| 146 | # FUTURE/PLANNED OPTIONS (not yet implemented) | 146 | # REJECTED EVENTS INDEX |
| 147 | # ============================================================================ | 147 | # ============================================================================ |
| 148 | 148 | ||
| 149 | # Archive mode (GRASP-05) | 149 | # Hot cache duration in seconds for rejected announcements |
| 150 | # NGIT_ARCHIVE_MODE=false \ No newline at end of file | 150 | # Stores full event objects for immediate re-processing when dependencies resolve |
| 151 | # Too short (<30s): Miss events from slow relays | ||
| 152 | # Too long (>5min): Waste memory | ||
| 153 | # CLI: --rejected-hot-cache-duration-secs <seconds> | ||
| 154 | # Default: 120 (2 minutes) | ||
| 155 | # NGIT_REJECTED_HOT_CACHE_DURATION_SECS=120 | ||
| 156 | |||
| 157 | # Cold index expiry in seconds for rejected announcements | ||
| 158 | # Stores metadata only to prevent repeated downloads of rejected events | ||
| 159 | # CLI: --rejected-cold-index-expiry-secs <seconds> | ||
| 160 | # Default: 604800 (7 days) | ||
| 161 | # NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS=604800 | ||
| 162 | |||
| 163 | # Hours before removing relay from naughty list | ||
| 164 | # Relays with persistent infrastructure issues (DNS, TLS, protocol errors) are | ||
| 165 | # tracked separately and retried after this expiration period | ||
| 166 | # CLI: --naughty-list-expiration-hours <hours> | ||
| 167 | # Default: 12 | ||
| 168 | # NGIT_NAUGHTY_LIST_EXPIRATION_HOURS=12 \ No newline at end of file | ||