relay: use expiring set to mask spurious fs notifications
relay: fix shellcheck warnings in new test script
relay: add utility script for e2e testing relays in tmux
relay: filter out fs notifications caused by relay writes
worker: make new message hook non-blocking
store: Implement pre-Add() subscriptions
relay: Remove relatively useless selftest feature
Store: Handle subscribed handlers in new goroutines
Previously, SubscriberStore would call each handler function for each
subscription serially in the *same* goroutine that called Add(). This
resulted in blocking the Add()-ing goroutine for minutes when an operation
in the handler took that long to time out.
Skip processing announced messages that are already local
Log all message types as they come in
Restart relay peer connections if they fail
Simplify IngestNode() logic
Only ingest validatable nodes
Previously, we were ingesting any announced node that
matched a subscribed community, but this would allow in
unvalidatable nodes. Now we only ingest announced nodes
that can be fully validated, and we actually proactively
fetch the ancestry of the nodes if we don't have it.
This allows messages which were written offline to propagate
once their client becomes online, though right now the user would
need to perform some action on those nodes in order for peers to realize
that there were new nodes available.
Future work will be to announce the topology of the
local tree when you join a relay so that it can request
any updates that it may not have.
Enable graceful handling of unsolicited messages
Previously, responses sent after the request timed out would cause
a disconnect, since the requester would not have a pending request
in its own records after the timeout. By introducing an error type
to handle this case, it is now possible to gracefully ignore such
messages when they occur.
Actually subscribe to communities after fetching them
No nodes were announced before because the new nodes weren't in a
community that the connection was subscribed to.
Rework and test synchronous subscribe methods
Rework and test synchronous Announce() method
unexport NodeLine since its only needed internally
Document, rework, and test synchronous LeavesOf()