Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Display channel.db size in Dashboard Settings #33

Open
Darth-Coin opened this issue Feb 21, 2022 · 0 comments
Open

[Feature request] Display channel.db size in Dashboard Settings #33

Darth-Coin opened this issue Feb 21, 2022 · 0 comments

Comments

@Darth-Coin
Copy link

Description:

Improvement UX/UI to display / alert the user about the size of channel.db file.

Behavior:

The file channel.db that stores all the traffic of LN node, sometimes get really big, depending on node traffic, no. of channels open/closed, HTLCs, no. of payments routed, no. of failed invoices etc.
This could have a great impact in node responsiveness and sometimes in force closed channels, no routing, slow apps. Bigger the file it is, more memory is used and swap, in special with Rasp Pi devices.

Solution:

Add a simple widget in "Settings" page of Umbrel Dashboard, that can display the actual size of the channel.db file.
Would be also good to have an indicator level in 2-3 colors when the file reached a certain level and needs to be compacted / cleaned up, so the normal user will know how to interpret it visually.
Also a simple tick box to be marked, if the user want at the next restart of the node, that the file will be compacted.
The box will trigger a script to add into lnd.conf file the following:

[bolt]
db.bolt.auto-compact=true
db.bolt.auto-compact-min-age=168h

[Application Options]
# Mark unpayable, unpaid invoices as deleted
gc-canceled-invoices-on-startup=1
gc-canceled-invoices-on-the-fly=1
# Avoid historical graph data sync
ignore-historical-gossip-filters=1
# Avoid slow startup time
sync-freelist=1
# Avoid high startup overhead
stagger-initial-reconnect=1
# Avoid auto force close channels
payments-expiration-grace-period=30m

Also, when is activated the box, the user receive a pop-up alerting that compacting the file takes time, sometimes hours, so be patient and do not restart forcibly the node. Just check the lnd logs through SSH.

More documentation:

https://www.lightningnode.info/technicals/lnddatabasecompaction
https://plebnet.wiki/wiki/Compacting_Channel_DB
https://raspibolt.org/bonus/raspberry-pi/system-overview.html
lightningnetwork/lnd#5705

@nmfretz nmfretz transferred this issue from getumbrel/umbrel May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant