libp2p v2.0.0's 3-arg `random(T, scheme, rng)` overload now takes the
`Rng` wrapper type instead of `var HmacDrbgContext`. My prior
`common.rng()[]` (deref) attempt resolves to `HmacDrbgContext` which
no longer matches.
Wrap our existing `ref HmacDrbgContext` (from `common.rng`) via
`newBearSslRng` to get an `Rng` value, satisfying the new signature
without re-seeding a fresh PRNG on every key generation.
nimble.lock:
Stale lockfile (inherited from master at rebase time) pinned libp2p
to ff8d51857, jwt to 18f8378de, json_rpc to status-im 43bbf499, etc.
— all incompatible with this PR's waku.nimble pin set, and nimble's
vnext SAT solver was falling back to the global packages.json
registry (which still maps `jwt` → yglukhov/nim-jwt) when the
lockfile/active-pin conflict couldn't be reconciled. That registry
lookup tried to clone yglukhov/nim-jwt at SHA 057ec95… which only
exists on the vacp2p fork, so the build aborted.
Regenerated via `nimble lock`. Resulting pins now reflect what
waku.nimble + libp2p v2.0.0 actually require: libp2p c43199378,
jwt 057ec95, websock 387a8eb7, json_rpc f05fad25 (chaitanyaprem
fork), lsquic 3813b849, libp2p_mix 50c4ab4f, mix_rln_spam_protection
23b278b4.
Hand-fixed one nimble vnext bug: mix_rln_spam_protection's
`vcsRevision` was generated as the local logos-delivery HEAD SHA
instead of the plugin's HEAD; replaced with 23b278b4… (matches
`version` field's URL+SHA spec and the cached package).
tests/testlib/wakucore.nim:
libp2p v2.0.0 also exports a `rng` symbol (the new `Rng` wrapper
type), making the unqualified `rng[]` calls here ambiguous against
the local `common.rng` template (returns `ref HmacDrbgContext`).
Qualify the three call sites as `common.rng()[]` so we keep the
`ref HmacDrbgContext` value that `libp2p_keys.PrivateKey.random` /
`KeyPair.random` expect.
Split `WakuNodeConfig` object for better separation of concerns and to introduce a tree-like structure to configuration.
* fix: ensure twn cluster conf is still applied when clusterId=1
* test: remove usage of `WakuNodeConf`
* Remove macro, split builder files, remove wakunodeconf from tests
* rm network_conf_builder module as it is not used
---------
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Co-authored-by: Ivan Folgueira Bande <ivansete@status.im>