The high-level, idiomatic MessagingClient mirroring the Nim MessagingClient, on
top of the internal/ffi/liblogosdelivery bridge (single library).
- MessagingClient: New/Start/Stop/Close, Subscribe/Unsubscribe,
Send -> RequestID.
- Unified Events() <-chan Event with a sealed Event interface
(MessageReceived/Sent/Propagated/Error, ConnectionStatus). Events are dropped
(never block) if a consumer falls behind.
- Event decoding handles liblogosdelivery's std/json wire format: received
payload/meta arrive as JSON byte-int arrays (not base64), with base64 + null
fallbacks; connectionStatus as an enum-name string. Unit-tested.
- Config aliases the kernel WakuNodeConf.
- examples/messaging: runnable demo.
Part of #106. Stacked on the single-library migration.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
With a single library there is no bridge to choose between, so the extra
subpackage adds nothing: move the bridge to internal/ffi (package ffi) and drop
the umbrella doc. pkg/kernel now imports internal/ffi and calls ffi.*.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RelayPublish marshalled the generated protobuf (content_topic), but the library
requires the WakuMessage wire format (contentTopic) and rejected it with
"Missing required field: contentTopic". Marshal the wire shape explicitly.
Turn examples/kernel into an end-to-end send/receive check: two relay nodes on
cluster 16 / shard 64, connected via the listen multiaddr, one publishes and the
other receives it off MsgChan. Verified against a locally-built liblogosdelivery:
prints "send/receive OK".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Running against the single liblogosdelivery library surfaced a config drift:
the consolidated WakuNodeConf strictly rejects unknown keys, and
common.WakuConfig still emitted `legacyStore` (removed upstream, and sent
unconditionally) and `host` (renamed to `listenAddress`). That failed node
creation, so every kernel test that starts a node failed. Reconcile the config:
- drop the LegacyStore field (and its two obsolete test references; the
already-skipped TestCheckLegacyStore keeps compiling);
- map Host to the `listenAddress` JSON key.
Add examples/kernel: a small runnable check that drives the unified lifecycle
(logosdelivery_create_node/start/stop/destroy) and a few kernel ops (version,
listen addresses, is-online, relay subscribe/unsubscribe) over the single
library. `go run ./examples/kernel` prints OK.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>