From 2b082868713cb889677332344b559e45cf6a3c6c Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Sat, 10 Jan 2026 22:06:51 +0000 Subject: 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. --- .env.example | 72 +++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 27 deletions(-) (limited to '.env.example') diff --git a/.env.example b/.env.example index 95db3c2..6a93d78 100644 --- a/.env.example +++ b/.env.example @@ -121,30 +121,48 @@ # Default: 3600 (1 hour) # NGIT_SYNC_MAX_BACKOFF_SECS=3600 -# Delay in seconds before running startup catchup -# CLI: --sync-startup-delay-secs -# Default: 30 -# NGIT_SYNC_STARTUP_DELAY_SECS=30 - -# Delay in seconds before running reconnect catchup -# CLI: --sync-reconnect-delay-secs -# Default: 10 -# NGIT_SYNC_RECONNECT_DELAY_SECS=10 - -# Number of days to look back for reconnect catchup -# CLI: --sync-reconnect-lookback-days -# Default: 3 -# NGIT_SYNC_RECONNECT_LOOKBACK_DAYS=3 - -# Maximum startup jitter in milliseconds for sync connections -# Set to 0 to disable jitter (useful for testing) -# CLI: --sync-startup-jitter-ms -# Default: 10000 (10 seconds) -# NGIT_SYNC_STARTUP_JITTER_MS=10000 - -# ============================================================================ -# FUTURE/PLANNED OPTIONS (not yet implemented) -# ============================================================================ - -# Archive mode (GRASP-05) -# NGIT_ARCHIVE_MODE=false \ No newline at end of file +# Interval in seconds for checking disconnected relays and attempting reconnection +# Set to lower value for faster reconnection testing +# CLI: --sync-disconnect-check-interval-secs +# Default: 60 +# NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS=60 + +# Base backoff time in seconds for relay reconnection +# Used for exponential backoff: base * 2^(failures-1) +# Set to 1 for faster test cycles +# Note: The connection timeout is capped at this value +# CLI: --sync-base-backoff-secs +# Default: 5 +# NGIT_SYNC_BASE_BACKOFF_SECS=5 + +# Disable NIP-77 negentropy sync (use REQ+EOSE instead) +# When enabled, sync will use REQ+EOSE instead of negentropy for history sync +# Primarily useful for testing that sync works without negentropy support +# CLI: --sync-disable-negentropy +# Default: false +# NGIT_SYNC_DISABLE_NEGENTROPY=false + +# ============================================================================ +# REJECTED EVENTS INDEX +# ============================================================================ + +# Hot cache duration in seconds for rejected announcements +# Stores full event objects for immediate re-processing when dependencies resolve +# Too short (<30s): Miss events from slow relays +# Too long (>5min): Waste memory +# CLI: --rejected-hot-cache-duration-secs +# Default: 120 (2 minutes) +# NGIT_REJECTED_HOT_CACHE_DURATION_SECS=120 + +# Cold index expiry in seconds for rejected announcements +# Stores metadata only to prevent repeated downloads of rejected events +# CLI: --rejected-cold-index-expiry-secs +# Default: 604800 (7 days) +# NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS=604800 + +# Hours before removing relay from naughty list +# Relays with persistent infrastructure issues (DNS, TLS, protocol errors) are +# tracked separately and retried after this expiration period +# CLI: --naughty-list-expiration-hours +# Default: 12 +# NGIT_NAUGHTY_LIST_EXPIRATION_HOURS=12 \ No newline at end of file -- cgit v1.2.3