From 00cac6466057c2a8a92dae9e4cd46369e72bcad9 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Nov 2026 02:12:15 +0000 Subject: mycelium: wait in the daemon only while nothing else is asked of it Mycelium holds its node's lock for as long as a request for the inbox waits for a message, and every other request waits for that lock, the messages we send among them: with two polls of up to five minutes, a node with nothing coming in sent nothing until a message came in (each send timing out after ten seconds), so two idle nodes never reached each other, a node joining a federation whose only node was its founder's among them. The inbox is waited for by one request, and only while nothing else is asked of the daemon: a send, or a seed's lookup, takes a turn (`Turn`), which drops the waiting request, freeing the daemon's lock as its API drops a request whose client went away. While turns are under way, the poller takes what is there without waiting, again as each begins or ends; then it waits again. It waits peeking, the message left in the inbox, and pops it after without waiting, so a request dropped while it waited takes nothing with it. Nothing is asked of the daemon again and again: an idle node has one request waiting there, for up to five minutes. The warnings about the daemon's API name the error's causes, not only which request failed. --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index f430775..f495fb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ it from the release before ([`docs/operations.md`](docs/operations.md), ## Unreleased +* Over Mycelium, a node waits in its daemon for what comes in only while it asks nothing + else of it, as the daemon holds back every other request while one waits: an idle node + sends at once, and two idle nodes reach each other. The daemon's API errors name their + causes ([`docs/transports.md`](docs/transports.md), + [Mycelium](docs/transports.md#mycelium); + [`src/transport/mycelium/mod.rs`](src/transport/mycelium/mod.rs)). + * `continuum-party found --name NAME` founds a federation by its name, at revision 2 (without it, at the base revision without a name, or at a later one `--revision` names, with a random name where it gives one); -- cgit v1.3.1