dev-stack: lower NOSTR_TRANSPORT_MAX_EVENT_CONTENT_LENGTH to 20000
Some checks failed
ci / regtest (push) Has been cancelled

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) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-13 11:43:45 +02:00
commit 0be64e13ae

View file

@ -36,6 +36,10 @@ services:
# will successfully connect (the reconnect loop retries every 5s). # will successfully connect (the reconnect loop retries every 5s).
NOSTR_TRANSPORT_ENABLED: "true" NOSTR_TRANSPORT_ENABLED: "true"
NOSTR_TRANSPORT_RELAYS: '["ws://localhost:5001/nostrrelay/test"]' 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 # Auto-credit 1M sats to freshly-created accounts. Required by the
# transport-driver `--flow subscribe` end-to-end test which pays a # transport-driver `--flow subscribe` end-to-end test which pays a
# FakeWallet invoice between two newly created wallets. Gated to # FakeWallet invoice between two newly created wallets. Gated to