lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
488 stars 82 forks source link

HTLC Forwarding History too big for local storage #673

Closed Heebron closed 5 months ago

Heebron commented 8 months ago

If your node has more than 31,800 HTLC forwarding events, then the web browsers throws the following console or similar error:

DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'nodeStore' exceeded the quota.

and quits loading events.

This is in up-to-date versions of Opera (104.0.4944.33) and Brave (v1.59.124 (Oct 25, 2023) browsers.

I've not found a way to increase local storage via browser setting - though this is probably the correct answer short term. Long term, lightning-terminal perhaps should load from the most recent going backwards. Beyond what can be stored in the browser, perhaps roll-up values can be used in calculations?

Expected behavior

A warning that there are too many HTLC forwarding events and that the totals may not be correct? Or, a pop up explaining how to increase local storage?

Actual behavior

_app-f6f858dfe5863a7b.js:10 [mobx] uncaught error in 'Reaction[settingsAutorun]' DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'nodeStore' exceeded the quota. at rk.set (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:495320) at name (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:547743) at c (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:233207) at e4 (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:226446) at t.track (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:230711) at e.onInvalidate_ (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:233152) at t.runReaction_ (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:230499) at ty (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:232333) at td (https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:232061) at https://terminal.lightning.engineering/_next/static/chunks/pages/_app-f6f858dfe5863a7b.js:10:235051

To reproduce

Connect to a LND node that has many forwarding events. The point at which I receive the console error differs but always happens before 31,900 events have been loaded.

System information

Intel I7 on latest release of Pop OS with 32 GB memory.

I use lightning terminal standalone with external lnd daemon. All other daemons are internal to litd.

Using version amd64-v0.12.0-alpha downloaded from github/

levmi commented 8 months ago

Thanks for the report! We're working to prioritize a fix to this issue in the coming sprints. Will circle back once we feel like it's addressed for testing on your end.

levmi commented 5 months ago

Should be fixed with the most recent releases, but feel free to re-open if it's not!