Igor Sirotin 504336efdb
feat(node-info): expose MaxMessageSize node info item (#4018)
* feat(node-info): expose MaxMessageSize node info item

Add a `MaxMessageSize` entry to `NodeInfoId` so the max message size
(in bytes) accepted by the relay protocol can be queried through the
node info surface, consumed by both the debug API and the FFI
`get_node_info` / `get_available_node_info_ids` calls.

The value is read from the mounted relay's `maxMessageSize` and is empty
when the relay protocol is not mounted on the node (e.g. light nodes),
mirroring the existing `MyMixPubKey` handling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(node-info): source MaxMessageSize from node config

Read the reported value from `conf.maxMessageSizeBytes` instead of the
mounted relay. The relay only holds a copy of the configured value and is
absent on relay-disabled (light) nodes, which would report an empty
string. Sourcing from the config makes the item always available and
reflects the node's configured limit directly.

WakuStateInfo now holds the WakuConf it reports on; init takes it as an
argument.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-30 17:06:49 +01:00
..