Document deletion request configuration options

This commit is contained in:
DanConwayDev
2026-01-14 10:22:33 +00:00
parent 9327917452
commit c8c385029e
+116
View File
@@ -925,6 +925,122 @@ Event blacklist does **not** affect NIP-11 metadata:
---
### NIP-09 Deletion Request Configuration
These options configure how the relay handles NIP-09 deletion requests.
#### `NGIT_DELETION_REQUEST_DISRESPECTOR`
**Description:** Archival relay mode that ignores NIP-09 deletion requests
**Type:** Boolean
**Default:** `false`
**Required:** No
**Examples:**
```bash
# Enable disrespector mode (ignore all deletion requests)
NGIT_DELETION_REQUEST_DISRESPECTOR=true
# Disable (default - honor deletion requests)
NGIT_DELETION_REQUEST_DISRESPECTOR=false
```
**Behavior:**
- When `true`:
- All NIP-09 deletion requests are ignored
- Events are retained permanently (subject to archive retention policy)
- Prevents "left-pad" scenarios where critical code is deleted from the network
- Useful for archival relays that prioritize data preservation
- When `false` (default):
- NIP-09 deletion requests are honored
- Events are marked for deletion and archived
- Git data is archived and scheduled for cleanup after retention period
**Use Cases:**
```bash
# Public archive that preserves all history
NGIT_DELETION_REQUEST_DISRESPECTOR=true
NGIT_ARCHIVE_ALL=true
# Archival relay for critical projects
NGIT_DELETION_REQUEST_DISRESPECTOR=true
NGIT_ARCHIVE_WHITELIST=npub1torvalds.../linux,npub1satoshi.../bitcoin
# Standard relay that honors deletions (default)
NGIT_DELETION_REQUEST_DISRESPECTOR=false
```
**Notes:**
- Disrespector mode does not prevent the relay from receiving deletion requests
- Deletion requests are still validated and stored, but not acted upon
- This setting is independent of archive mode (can be used with or without GRASP-05)
- Consider legal and ethical implications before enabling in production
---
#### `NGIT_ARCHIVE_RETENTION_SECS`
**Description:** How long to keep archived events and git data before permanent deletion
**Type:** Integer (seconds)
**Default:** `7776000` (90 days)
**Required:** No
**Examples:**
```bash
# Default: 90 days retention
NGIT_ARCHIVE_RETENTION_SECS=7776000
# Short retention (7 days)
NGIT_ARCHIVE_RETENTION_SECS=604800
# Extended retention (180 days)
NGIT_ARCHIVE_RETENTION_SECS=15552000
# Testing: 1 minute retention
NGIT_ARCHIVE_RETENTION_SECS=60
```
**Behavior:**
- When an event is deleted (via NIP-09):
- Event is moved to archive storage with deletion timestamp
- Git data is archived separately
- After retention period expires, archived data is permanently deleted
- Retention period starts from the deletion timestamp
- Cleanup runs periodically (implementation-defined interval)
- If `NGIT_DELETION_REQUEST_DISRESPECTOR=true`, this setting has no effect (events never deleted)
**Use Cases:**
```bash
# Production: 90 day retention (default)
NGIT_ARCHIVE_RETENTION_SECS=7776000
# Compliance: 1 year retention
NGIT_ARCHIVE_RETENTION_SECS=31536000
# Development: 1 hour retention for testing
NGIT_ARCHIVE_RETENTION_SECS=3600
# Testing: 1 minute retention for rapid iteration
NGIT_ARCHIVE_RETENTION_SECS=60
```
**Notes:**
- Retention period is configurable in seconds for testing flexibility
- Default 90 days balances storage costs with recovery needs
- Archived data counts toward storage usage during retention period
- Consider backup strategy before setting short retention periods
- Permanent deletion is irreversible
---
### Logging Configuration
#### `RUST_LOG`