From 0be64e13aef31c51171b9365f621e3fad912470a Mon Sep 17 00:00:00 2001 From: Padreug Date: Wed, 13 May 2026 11:43:45 +0200 Subject: [PATCH] dev-stack: lower NOSTR_TRANSPORT_MAX_EVENT_CONTENT_LENGTH to 20000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sharding only fires when an outbound RPC response exceeds the per- event content cap. With the production default (40_000) it takes hundreds of seeded payments to make `list_payments` trip sharding — the test_transport_suite.py test #2 was reproducibly hitting ~39K just shy of the threshold even with 90 round-trips and 600-char memos. Lowered to 20_000 in the dev compose so the same test trips sharding with ~60 fat-memo payments (~20s of seed time). Production deployments leave this unset and inherit the 40_000 default. The lower threshold doesn't mask any real behavior — the shard envelope is identical at either threshold, and the unit tests in LNbits exercise the boundary cases independently (tests/unit/test_nostr_transport.py::test_split_content*). Co-Authored-By: Claude Opus 4.7 (1M context) --- docker-compose.dev.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a3dbd34..ecd32aa 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -36,6 +36,10 @@ services: # will successfully connect (the reconnect loop retries every 5s). NOSTR_TRANSPORT_ENABLED: "true" NOSTR_TRANSPORT_RELAYS: '["ws://localhost:5001/nostrrelay/test"]' + # Lowered from the 40_000 default just to make sharding easy to + # exercise in local tests without seeding hundreds of payments. + # Production runs should leave this unset (defaults to 40_000). + NOSTR_TRANSPORT_MAX_EVENT_CONTENT_LENGTH: "20000" # Auto-credit 1M sats to freshly-created accounts. Required by the # transport-driver `--flow subscribe` end-to-end test which pays a # FakeWallet invoice between two newly created wallets. Gated to