Minimal Vite project demonstrating the mpsc bounded channel requires buffer > 0 panic in @nimiq/core@2.2.0 and verifying the fix.
When the web client from @nimiq/core@2.2.0 starts without explicitly setting network_buffer_size, the worker panics:
2025-11-06T19:16:25.994000000Z ERROR panic | thread '<unnamed>' panicked at 'mpsc bounded channel requires buffer > 0': network-libp2p/src/network.rs:328
Root cause: ClientConfiguration.build() doesn't set network_buffer_size, defaulting to 0 in network-libp2p.
This is a regression in v2.2.0 — v2.1.1 works without this panic.
main: Uses@nimiq/core@2.2.0from npm → Shows the panic ❌fix/wasm-patch: Uses patched WASM from core-rs → Panic fixed, client connects ✓test/version-2.1.1: Uses@nimiq/core@2.1.1from npm → Works without panic ✓
git checkout main
pnpm install
pnpm devOpen http://localhost:5173, click "Connect to Nimiq", check console → panic occurs ❌
git checkout fix/wasm-patch
pnpm install
pnpm devOpen http://localhost:5173, click "Connect to Nimiq", check console → no panic, client connects ✓
git checkout test/version-2.1.1
pnpm install
pnpm devOpen http://localhost:5173, click "Connect to Nimiq", check console → no panic, confirms regression in 2.2.0 ✓
Applied in core-rs-albatross/web-client/src/client/lib.rs:
config.network.network_buffer_size = NetworkSettings::default_network_buffer_size();Ensures bounded channel buffer is 1024 (non-zero) instead of 0.