From 711807cb81f85408451b843e1a53e9616fd6df3b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 18:00:51 -0700 Subject: Keep sync snapshots under relay size limits, and say when they bounce MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tonight's payments pushed the encrypted snapshot past strfry's 64KB maxEventSize and every publish after the first zap was silently refused — the other device just showed no history, with nothing logged anywhere. The relay's limit is raised to 256KB; client-side, movements older than the last 50 now drop their bolt11/preimage (~half a KB per ln-send) and the cap tightens to 200, and a refused snapshot publish logs the relay's reason. Co-Authored-By: Claude Fable 5 --- src/features/ark.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index 1c0ad1b..ff0dd13 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -136,7 +136,10 @@ export function slimArkForSync(s) { actions: (s.actions || []) .filter((a) => a.step === 'done' && ['board', 'offboard', 'exit'].includes(a.type)) .map((a) => { const c = { ...a }; for (const k of HEAVY) delete c[k]; return c; }), - movements: (s.movements || []).slice(-300), + movements: (s.movements || []).slice(-200).map((m, i, arr) => + // Older rows only need to render a history line; the bolt11 (~400 chars + // each) and preimage are what pushed snapshots past relay size limits. + (arr.length - i <= 50 ? m : (({ invoice, preimage, ...rest }) => rest)(m))), gifts: s.gifts, }; } -- cgit v1.2.3