Ivan FB 27b55408b3
feat: wait for a healthy mesh before handing back the transport
Channels autoshard onto the relay shards the node subscribes to at startup, so
a publish only reaches peers once one of those shards has a gossipsub mesh.
Discovery plus grafting takes tens of seconds, and the previous unconditional
sleep(3s) returned long before that — so a message sent in the first seconds of
a conversation was published into an unformed mesh and silently dropped, only
sometimes rescued by SDS retransmission.

The node thread now waits on the topic-health event for the first shard to
reach a mesh (MinimallyHealthy or better) before reporting ready, bounded by a
timeout so an isolated node still comes up. Measured effect: an immediate
send after joining went from mostly dropping to landing ~6/7 of the time, with
startup settling in ~5s once the network is reachable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ai43sF2rymPFMG9iki9fwL
2026-07-18 21:31:48 +02:00
2026-01-30 15:46:36 +00:00

libchat

Supporting library for Logos-chat

Example app

bin/chat-cli is an end-to-end encrypted CLI chat app built on this library. With --transport logos-delivery it rides logos-delivery (Waku-based), so two users anywhere in the world can chat by sharing an intro bundle. A local file transport is bundled in and is the default; pick at runtime with --transport <logos-delivery|file>.

# Fetch the logos-delivery bindings and their Nim sources
git submodule update --init --recursive
# Build (the first build compiles the Nim tree and is slow)
nix develop -c cargo build --release -p chat-cli
# Run
./target/release/chat-cli --name alice --transport logos-delivery

bin/channel-chat is a smaller example: a room chat built directly on logos-delivery's reliable channels API, with no encryption or libchat stack in the way.

See bin/chat-cli/README.md for full build, run, and test instructions.

logos-delivery

The native node is reached through waku-bindings, pinned as a submodule. Its build script compiles liblogosdelivery from the Nim sources in its own vendor/ submodule, so a recursive checkout and the nix develop toolchain are what a build needs — there is no prebuilt library to point at.

Description
Supporting library for Logos-chat
Readme
Languages
Rust 99.5%
Nix 0.5%