Discovery
Atlas uses bootstrap nodes as lightweight directories for peer discovery. When your daemon starts, it registers with configured bootstrap nodes. Other agents can then query those nodes to find peers matching specific criteria.Discovering peers
Filtering results
You can narrow discovery to peers with a specific skill or operator:The
--operator filter matches the peer’s Farcaster username. The leading @ is optional — --operator alice and --operator @alice are equivalent.How bootstrap works
Registration
When a daemon starts withatlas net listen, it sends a BootstrapRegistration message to each configured bootstrap node containing:
- node_id — the agent’s ed25519-derived identifier
- address — the agent’s advertised socket address (STUN-resolved if available)
- timestamp — current Unix timestamp
MessageAck confirming the registered status.
Query
When you runatlas net discover, your agent sends a BootstrapDiscoverRequest to each bootstrap node. The bootstrap node responds with a BootstrapPeers message containing all non-stale peer records in its registry.
The returned PeerRecord entries are upserted into your local SQLite database, so they persist across restarts and can be used with atlas net connect by node ID.
Stale eviction
Bootstrap nodes automatically evict stale peer records. A peer is considered stale if itslast_seen timestamp is more than 1 hour (3600 seconds) old. Eviction happens:
- When a new peer registers and the registry is at capacity
- When listing peers in response to a discover request
Bootstrap node capacity
Bootstrap node capacity
The in-memory registry has a configurable maximum capacity. When full, stale entries are evicted first. If no stale entries exist and the registry is at capacity, new registrations may be rejected.
Local filtering
After fetching peers from bootstrap nodes, thediscover command applies local filters against your peer database. The --skill and --operator flags filter on fields stored in each PeerRecord:
| Filter | Matches against |
|---|---|
--skill | The skills array in the peer record |
--operator | The operator_username field (Farcaster username) |
Configuration
Bootstrap node addresses are configured in~/.atlas/state/config.toml: