2324 Commits

Author SHA1 Message Date
Fabiana Cecin
098c6f2a6d
Improve config
* Soft-deprecate --cluster-id=N triggering the associated preset selection
* Rewrite applyNetworkConf to apply user-set fields over preset fields
* Add createNode(preset, mode, overrides, additions) nim api
* Generate WakuNodeConfOverlay (all Option fields) from WakuNodeConf
* New parser for configJson handles new messaging shape and full conf shape
* Change all confbuilder defaults from literal values to DefaultXXX consts
* Change int/bool WakuNodeConf fields to Option to get user intent w/o sentinels
* Make Option CLI default-value help mention defaults now owned by confbuilder
* Misc refactors, fixes
* Add tests
2026-05-08 01:19:39 -03:00
Fabiana Cecin
689ef70de9
Fixes from Ivan's second pass review 2026-05-04 20:40:43 -03:00
Fabiana Cecin
241fb9e862
Merge remote-tracking branch 'origin/master' into feat/zero-default-ports 2026-04-30 13:08:51 -03:00
NagyZoltanPeter
75864a705e
Fix websock nimble dependency version restriction to match lock file. (#3829) 2026-04-30 14:20:11 +02:00
Ivan FB
587014e34f
add event_loop_accumulates_lag_secs (#3833) 2026-04-30 00:27:38 +02:00
NagyZoltanPeter
300f584efc
Removed duplicates of announcedAddresses, extMultiaddresses (#3831)
Removing duplicates of multiaddresses for Enr.
Safe building Enr Record.

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 15:10:21 +02:00
Fabiana Cecin
cc81d8507f
Merge remote-tracking branch 'origin/master' into feat/zero-default-ports 2026-04-28 12:34:50 -03:00
Fabiana Cecin
0bdf6538ef
Restore CLI wakunode2 non-zero defaults for ports
* apply auto-port/port-0 default to library users only
* revert REST API additions
* relax rest/ws conf builders to accept an unset port for consistency
* apply fixes to tests and testing infra
2026-04-28 12:27:50 -03:00
osmaczko
5034086fef
Chore/make nix build phase configurable (#3826)
* nix: parameterize build flags with named args

Expose `enablePostgres`, `enableNimDebugDlOpen`, and `chroniclesLogLevel`
as arguments on `nix/default.nix`. Defaults preserve today's hardcoded
behavior, so `nix build .#liblogosdelivery` with no overrides is a
no-op change.

Consume the package via `callPackage` in `flake.nix` so consumers can
use `.override { ... }` without extra wrapping.

* nix: link libstdc++ on Linux so consumers don't need patchelf

Append `stdenv.cc.cc.lib` to `buildInputs` on Linux and add `-lstdc++`
to the Nim `--passL` flags. Nix stdenv's fixupPhase will auto-inject
`${stdenv.cc.cc.lib}/lib` into the output's RUNPATH, so downstream
consumers can drop their patchelf step.

macOS resolves the C++ stdlib via dyld/libc++ and is unaffected.

* nix: bundle librln into the output for a self-contained package

Copy the librln shared library (`librln.so` / `librln.dylib`) from the
zerokit input into `$out/lib` and rewrite the internal reference in
`liblogosdelivery`:

- Darwin: set librln's install name to `@rpath/librln.dylib`, change the
  consumer's reference to match, and add `@loader_path` as an rpath.
- Linux: add `$ORIGIN` to the rpath so `librln.so` resolves from the
  sibling directory, preserving the gcc-lib entry injected by the stdenv
  fixupPhase for libstdc++.

The installed `liblogosdelivery` no longer carries a `/nix/store/...`
absolute path to zerokit, so downstream consumers can ship the bundle
as-is.
2026-04-27 12:51:39 +02:00
Fabiana Cecin
c842eaa9ee
Merge remote-tracking branch 'origin/master' into feat/zero-default-ports 2026-04-24 21:31:46 -03:00
Fabiana Cecin
2dc8176407
Fixes from Ivan's review
* fix node info to use announcedAddresses again
* expose ports via Debug API ("MyBoundPorts")
* builders default to port 0 in discv5/metrics/p2pTcp
* add waku/net/bound_ports.nim
* move auto_port and net_config to waku/net/
* extract port-0 retry loop to tryWithAutoPort[T]
* misc refactors and fixes
2026-04-24 21:28:58 -03:00
Darshan
324048430b
fix: restore -d:postgres in nimble task and propagate NIMFLAGS (#3830) 2026-04-25 00:03:46 +05:30
Fabiana Cecin
ff98d85313
fix: relay validator registration and sync filter (#3823)
* reuse stored validator in relay
* fix skip check in store sync
* increase sync tolerance in test (matches similar test)
2026-04-23 21:02:34 +02:00
NagyZoltanPeter
820ccc6e10
Add ci support for liblogosdeliery, build and artifacts (#3746) 2026-04-23 18:24:55 +02:00
Fabiana Cecin
abaae88df9
fix lint 2026-04-23 00:47:45 -03:00
Fabiana Cecin
a4d85b98dd
Merge remote-tracking branch 'origin/master' into feat/zero-default-ports 2026-04-23 00:20:15 -03:00
Fabiana Cecin
5603f766d1
feat: service ports default to 0 (auto-assign)
* tcp/rest/websocket/metrics/discv5 default port changed to 0
* all CLI port types are now uint16 (instead of Port)
* any port set to 0 on conf results in a random port bound
* write back bound values to both WakuConf and WakuNode.ports
* REST GET /info reports actually bound ports for enabled services
* conf builders now err if any port config is unset
* setupDiscoveryV5 returns Result and errors out on port 0
* rename setupAndStartDiscv5WithAutoPort to setupAndStartDiscv5
* updateWaku ENR rebuild now runs after discv5 startup
* remove Port(0) conf from tests (0 is default)
* add port = 0 to conf builder tests (conf builder has no default)
2026-04-23 00:13:54 -03:00
Fabiana Cecin
bb8a7e8782
Fix redundant start/stop calls (#3817)
* remove redundant proto start/stop calls from node start/stop
* fix WakuRelay start/stop not overriding GossipSub start/stop
* replace startRelay with reconnectRelayPeers
2026-04-22 09:52:57 -03:00
Igor Sirotin
4394843299
fix: make update and wakunode2 build on arm64 after Nimble migration (#3814)
Rebuild nat libs (miniupnpc, libnatpmp) for the host architecture during
nimble deps setup. The prebuilt libs from the nimble cache are x86_64 and
fail to link on arm64 (Apple Silicon).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 23:20:53 +02:00
Ivan FB
260def68ad
use EWMA to show main loop lag information (#3808) 2026-04-20 18:05:44 +02:00
Ivan FB
cda0197168
use nimble 0.22.3 and more appropriate nimble.lock (#3809) 2026-04-20 13:54:34 +02:00
Fabiana Cecin
9cbb4e7338
fix: prefer --num-shards-in-network over preset (#3816)
* fill numShardsInCluster from preset when builder slot is none
* add regression tests
2026-04-20 13:48:27 +02:00
Fabiana Cecin
9ae108b4a7
Fix peer stats endpoint (#3815) 2026-04-20 08:16:01 -03:00
Fabiana Cecin
ca4dbb19e0
Improve logging of content topic on server (#3818) 2026-04-20 13:05:54 +02:00
NagyZoltanPeter
509c875533
chore: enable postgres support in nix liblogosdelivery build (#3813)
Add -d:postgres and -d:nimDebugDlOpen to both the dynamic and static
nim c invocations in nix/default.nix, matching the POSTGRES=1 flag
already used in the Make-based build path.
2026-04-15 16:12:52 +02:00
Darshan
ecd3758580
Merge pull request #3760 from logos-messaging/release/v0.38 2026-04-14 18:17:49 +05:30
darshankabariya
04b8e8c2a8
chore: update remaining changelog 2026-04-14 18:07:02 +05:30
Gabriel Cruz
166dc69c39
chore: bump nim-jwt version (#3812) 2026-04-13 21:44:30 +02:00
darshankabariya
a4db8895e4
chore: resolving lint 2026-04-10 17:03:25 +05:30
Fabiana Cecin
c04df751db
Fix BearSSL and NAT lib build reproducibility (#3806)
* pass -mssse3 on x86_64 to BearSSL and NAT C lib builds
* add BearSSL.mk and Nat.mk to nimbledeps cache key
2026-04-10 07:38:02 -03:00
Fabiana Cecin
494ea94606
fix: recv_service delivers store-recovered messages (#3805)
* recv_service now delivers store-recovered messages via MessageReceivedEvent
* add regression test_api_receive to prove store recovery actually delivers messages
* fix confusing "UNSUCCESSFUL / Missed message" log message
* removed some dead/duplicated code

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
Co-authored by Zoltan Nagy
2026-04-09 14:29:17 -03:00
Ivan FB
ca7ec3de05
add main loop lag monitor (#3803)
* add loop lagging as health status
2026-04-09 16:51:46 +02:00
Ivan FB
4d314b376d
setting num-shards-in-network to 0 by default (#3748)
Co-authored-by: darshankabariya <darshan@status.im>
v0.38.0
2026-04-09 11:52:48 +05:30
NagyZoltanPeter
5503529531
chore: Add pre-check of options used in config Json for liblogosdelivery pre-createNode, treat unrecognized options as error (#3801)
* Add pre-check of options used in config Json for logos-delivery-api pre-createNode, treat unrecognized options as error
* Collect all unrecognized options and report them at once.
* Refactor json config parsing and error detection
2026-04-09 07:17:17 +02:00
Ivan FB
59bd365c16
setting num-shards-in-network to 0 by default (#3748)
Co-authored-by: darshankabariya <darshan@status.im>
2026-04-08 15:33:16 +02:00
Ivan FB
f5762af4c4
Start using nimble and deprecate vendor dependencies (#3798)
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Co-authored-by: Darshan K <35736874+darshankabariya@users.noreply.github.com>
2026-04-08 12:42:14 +02:00
darshankabariya
b2e46b6e91
Merge branch 'master' into release/v0.38 v0.38.0-rc.0 2026-04-08 00:55:39 +05:30
Darshan
9a344553e7
chore: update master changelog after v0.37.4 (#3802) 2026-04-07 18:00:57 +02:00
Danish Arora
549bf8bc43
fix(nix): fetch git submodules automatically via inputs.self (#3738)
The Nix build fails when consumers use `nix build github:logos-messaging/logos-delivery#liblogosdelivery`
without appending `?submodules=1` — vendor/nimbus-build-system is missing,
causing patchShebangs and substituteInPlace to fail.

Two fixes:
1. Add `inputs.self.submodules = true` to flake.nix (Nix >= 2.27) so
   submodules are fetched automatically without requiring callers to
   pass `?submodules=1`.
2. Fix the assertion in nix/default.nix: `(src.submodules or true)`
   always evaluates to true, silently masking the missing-submodules
   error. Changed to `builtins.pathExists` check on the actual
   submodule directory so it fails with a helpful message when
   submodules are genuinely absent.
2026-04-07 13:14:32 +05:30
Fabiana Cecin
56359e49ed
prefer reusing service peers across shards in edge filter reconciliation (#3789)
* selectFilterCandidates prefers peers already serving other shards
* restructure edgeFilterSubLoop (plan all dials then execute) for safety
2026-04-06 11:08:47 -03:00
Darshan
39719e1247
increase default timeout to 20s and add debug logging (#3792) 2026-04-06 15:53:45 +05:30
Fabiana Cecin
b0c0e0b637
chore: optimize release builds for speed (#3735) (#3777)
* Add -flto (lto_incremental, link-time optimization) for release builds
* Add -s (strip symbols) for release builds
* Switch library builds from --opt:size to --opt:speed
* Change -d:marchOptimized to x86-64-v2 target from broadwell
* Remove obsolete chronicles_colors=off for Windows
* Remove obsolete withoutPCRE define
2026-04-02 12:10:02 +02:00
Fabiana Cecin
dc026bbff1
feat: active filter subscription management for edge nodes (#3773)
feat: active filter subscription management for edge nodes

## Subscription Manager
* edgeFilterSubLoop reconciles desired vs actual filter subscriptions
* edgeFilterHealthLoop pings filter peers, evicts stale ones
* EdgeFilterSubState per-shard tracking of confirmed peers and health
* best-effort unsubscribe on peer removal
* RequestEdgeShardHealth and RequestEdgeFilterPeerCount broker providers

## WakuNode
* Remove old edge health loop (loopEdgeHealth, edgeHealthEvent, calculateEdgeTopicHealth)
* Register MessageSeenEvent push handler on filter client during start
* startDeliveryService now returns `Result[void, string]` and propagates errors

## Health Monitor
* getFilterClientHealth queries RequestEdgeFilterPeerCount via broker
* Shard/content health providers fall back to RequestEdgeShardHealth when relay inactive
* Listen to EventShardTopicHealthChange for health recalculation
* Add missing return p.notReady() on failed edge filter peer count request
* HealthyThreshold constant moved to `connection_status.nim`

## Broker types
* RequestEdgeShardHealth, RequestEdgeFilterPeerCount request types
* EventShardTopicHealthChange event type

## Filter Client
* Add timeout parameter to ping proc

## Tests
* Health monitor event tests with per-node lockNewGlobalBrokerContext
* Edge (light client) health update test
* Edge health driven by confirmed filter subscriptions test
* API subscription tests: sub/receive, failover, peer replacement

Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
Co-authored by Zoltan Nagy
2026-03-30 08:30:34 -03:00
Ivan FB
0623c10635
completely remove storev2 (#3781) 2026-03-30 00:08:08 +02:00
Ivan FB
5c335c2002
address leftover comments (#3782) 2026-03-27 13:55:27 +01:00
Ivan FB
b1e1c87534
update changelog for v0.37.3 (#3783)
Co-authored-by: darshankabariya <darshan@status.im>
2026-03-27 13:54:06 +01:00
Ivan FB
0b86093247
allow override user-message-rate-limit (#3778) 2026-03-25 13:23:20 +01:00
Ivan Folgueira Bande
6749144739
update change log for v0.37.2 2026-03-24 12:03:59 +01:00
Ivan Folgueira Bande
37f587f057
set default retention policy in archive.nim 2026-03-24 12:03:21 +01:00
Ivan Folgueira Bande
4b5f91c0ce
fix compilation issue in test_node_conf.nim 2026-03-24 12:02:49 +01:00