Seeder
The Seeder is a one-shot service that bootstraps the relay discovery process. It loads relay URLs from static seed files and known relay lists, then inserts them as candidates for validation.
Purpose
Section titled “Purpose”Before the Finder can discover relays from NIP-65 events and APIs, there must be initial relay URLs in the database. The Seeder provides this bootstrap by loading curated seed files containing known relay URLs.
How It Works
Section titled “How It Works”- Reads seed file paths from its configuration.
- Parses each file for relay URLs (one URL per line, comments and blank lines ignored).
- Validates each URL against BigBrotr’s relay URL rules (RFC 3986 compliance, network type detection, local IP rejection).
- Inserts valid URLs into the database as candidates.
- Exits after a single cycle (one-shot mode).
Configuration
Section titled “Configuration”seed: file_path: static/seed_relays.txt to_validate: true# Run the seeder (always one-shot)python -m bigbrotr seeder --onceThe --once flag is the natural mode for the Seeder since it only needs to run once to load initial data. After seeding, the Finder takes over continuous discovery.
When to Re-Run
Section titled “When to Re-Run”Re-run the Seeder when:
- Setting up a fresh BigBrotr instance.
- Adding new seed files with additional relay URLs.
- After a database reset that cleared the candidate pool.