fix: Lightning tab never loads with LND backend (wrong macaroon path)#56
Merged
Conversation
MattDHill
previously approved these changes
Jun 6, 2026
LND stores its macaroons under data/chain/bitcoin/mainnet/ in its main
volume, but the mempool backend was pointed at the volume root. The
backend could not read the macaroon, so the LND REST connection never
initialized and the Lightning tab loaded forever.
Existing installs self-heal on next start: MACAROON_PATH is an enforced
z.literal whose .catch coerces the stale path, and seedFiles' merge({})
rewrites the on-disk config. Bumps to 3.3.1:11.
91f6069 to
af5ee9d
Compare
Contributor
Author
|
Rebased onto Reworked to match: dropped my old version-file rename, and the bump now edits Verified master still has the buggy path, so this is still needed. |
MattDHill
approved these changes
Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Multiple users report Mempool's Lightning tab stays in a perpetual loading state with a healthy LND running and selected on default settings.
Root cause
LND (
lnd-startos) stores its macaroons underdata/chain/bitcoin/mainnet/inside itsmainvolume — the same layoutlnd-startos's owninterfaces.tsreads from (/media/startos/volumes/main/data/chain/bitcoin/mainnet/admin.macaroon). Thetls.cert, by contrast, is written at the volume root.Mempool mounts LND's
mainvolume at/mnt/lndbut pointedMACAROON_PATHat the volume root:tls.cert/mnt/lnd/tls.cert✓readonly.macaroon/mnt/lnd/readonly.macaroon✗/mnt/lnd/data/chain/bitcoin/mainnet/readonly.macaroonThe backend couldn't read the macaroon, so the LND REST connection never initialized and the Lightning tab loaded forever.
CLN was checked and is correct (
<main>/bitcoin/lightning-rpc, mounted via subpathbitcoin) — this was an LND-only bug.Fix
utils.ts(lndCertPath,lndMacaroonPath) and point the macaroon at the realdata/chain/bitcoin/mainnet/readonly.macaroonpath.z.literal) and theenable-lightningaction.Existing installs
Self-heal on the first start after upgrade:
MACAROON_PATHis an enforcedz.literal(...).catch(...), so a read coerces the stale path to the corrected one, andseedFiles'configJson.merge(effects, {})(run on every non-install init) rewrites the on-disk config. No explicit migration required; the carried-forward 0.3.5.1 migration is untouched.Release
Bumps to 3.3.1:3. Built clean for
x86_64andaarch64;tsc --noEmitpasses.