-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Pre-Submission Checklist
- I have searched the existing issues and believe this is a new bug.
- I am not asking a question about how to use lnd, but reporting a bug (otherwise open a discussion).
LND Version
0.19.3-beta commit=v0.19.3-beta
LND Configuration
lnd.conf:
[Application Options]
# Public network name
alias=node-alias
# cpu profiling port
# curl localhost:1024/debug/pprof/.
profile=1024
# prometheus
prometheus.enable=true
prometheus.listen=0.0.0.0:8989
# Public hex color
color=#141414
# Log levels
debuglevel=CNCT=debug,HSWC=debug
# Public P2P IP
externalip=1.2.3.4
#a
# Set the maximum amount of commit fees in a channel
max-channel-fee-allocation=0.2
# Set the max tiemout blocks of a payment
max-cltv-expiry=5000
# Pending channel limit
maxpendingchannels=10
# Min inbound channel limit
minchansize=5000000
# Max inbound channel limit (wumbo)
maxchansize=200000000
# gRPC socket binding
rpclisten=0.0.0.0:10009
# REST port
restlisten=0.0.0.0:8080
# p2p port
listen=0.0.0.0:9735
# Enable free list syncing for the default bbolt database. This will decrease
# start up time, but can result in performance degradation for very large
# databases, and also result in higher memory usage. If "free list corruption"
# is detected, then this flag may resolve things.
sync-freelist=false
# Avoid high startup overhead
stagger-initial-reconnect=true
# Coin selection optimization
coin-selection-strategy=random
# TLS certificate IP
tlsextraip=1.2.3.4
# private IP for GRPC for local network
tlsextraip=4.5.6.7
tlsextradomain=xxx.yyy.zzz
# whether or not it tries to automatically connect to peers
nobootstrap=false
# Cancel invoices that are expired, allows better cleanup
gc-canceled-invoices-on-startup=true
gc-canceled-invoices-on-the-fly=false
allow-circular-route=false
# For future toggles
accept-keysend=true
# accept-amp=true
requireinterceptor=false
store-final-htlc-resolutions=false
rejecthtlc=false
keep-failed-payment-attempts=false
default-remote-max-htlcs=200
; The maximum fee rate in sat/vbyte that will be used for commitments of
; channels of the anchors type. Must be large enough to ensure transaction
; propagation (default: 10)
max-commit-fee-rate-anchors=100
[caches]
; The duration that the response to DescribeGraph should be cached for. Setting
; the value to zero disables the cache. (default: 1m)
caches.rpc-graph-cache-duration=5m
[db]
; The selected database backend. The current default backend is "bolt". lnd
; also has experimental support for etcd, a replicated backend.
db.backend=bolt
db.prune-revocation=true
db.no-rev-log-amt-data=true
# db.backend=postgres
# COMMENTED OUT FOR REFERENCE*****
# [postgres]
# db.postgres.dsn=
# db.postgres.timeout=
# db.postgres.maxconnections=
[postgres]
[bolt]
# Auto compacting the DB
# defaults to 1week min age to compact db
db.bolt.auto-compact=true
[rpcmiddleware]
; Enable the RPC middleware interceptor functionality.
rpcmiddleware.enable=true
; Time after which a RPC middleware intercept request will time out and return
; an error if it hasn't yet received a response.
rpcmiddleware.intercepttimeout=25s
; rpcmiddleware.addmandatory=other-mandatory-middleware
[protocol]
# Wumbo (large channel sizes than 16.7M sats protocol limit)
protocol.wumbo-channels=true
protocol.option-scid-alias=true
protocol.zero-conf=true
# Set to enable support for RBF based coop close.
protocol.rbf-coop-close=1
[Bitcoin]
# Turn on Bitcoin mode
bitcoin.active=1
# Set the channel confs to wait for channels
bitcoin.defaultchanconfs=3
# Forward fee rate in parts per million
bitcoin.basefee=1000
bitcoin.feerate=10000
bitcoin.timelockdelta=144
# Set bitcoin.testnet=1 or bitcoin.mainnet=1 as appropriate
bitcoin.mainnet=true
bitcoin.testnet=false
bitcoin.signet=false
bitcoin.regtest=false
bitcoin.signetchallenge=
# Set backing node, bitcoin.node=neutrino or bitcoin.node=bitcoind
bitcoin.node=bitcoind
[Bitcoind]
bitcoind.rpchost=to-load-balancer-for-bitcoind.elb.us-east-1.amazonaws.com
# Set the password to what the auth script said
bitcoind.rpcpass=xxx
# Set the username
bitcoind.rpcuser=xxx
# for future use switching off ZMQ to Polling
bitcoind.rpcpolling=true
bitcoind.blockpollinginterval=1m
bitcoind.txpollinginterval=1m
[routerrpc]
# Set default chance of a hop success
routerrpc.apriori.hopprob=0.40
# Set minimum desired savings of trying a cheaper path
routerrpc.attemptcost=10
# Set the number of historical routing records
routerrpc.maxmchistory=10000
# Set the min confidence in a path worth trying
routerrpc.minrtprob=0.001
# Set the time to forget past routing failures
routerrpc.apriori.penaltyhalflife=24h0m0s
routerrpc.estimator=apriori
[healthcheck]
healthcheck.chainbackend.timeout=120s
Backend Version
Bitcoin Core 30.0
Backend Configuration
bitcoin.conf:
deprecatedrpc=warnings
rpcallowip=100.0.0.0/16
rpcbind=0.0.0.0
datadir=/xxx/bitcoind/data
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
# Set publish hash block outbound message high water mark.
zmqpubhashblockhwm=10000
# Set publish hash transaction outbound message high water mark.
zmqpubhashtxhwm=10000
# Set publish raw block outbound message high water mark.
zmqpubrawblockhwm=10000
# Set publish raw transaction outbound message high water mark.
zmqpubrawtxhwm=10000
# Set publish hash sequence message high water mark.
zmqpubsequencehwm=10000
listen=false
server=1
txindex=1
blockfilterindex=1
maxmempool=300
disablewallet=1
# debug=rpc
dbcache=4096
# limits to 1GB per day given back to peers
maxuploadtarget=1000
rpcuser=xxx
rpcpassword=xxx
rpcworkqueue=1024
# Maximum per-connection receive buffer (KiB).
maxreceivebuffer=10000
# Maximum per-connection send buffer (KiB).
maxsendbuffer=5000
OS/Distribution
Linux ip.ec2.internal 6.1.156-177.286.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 21 22:16:56 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Bug Details & Steps to Reproduce
We restarted the lnd process in order to update host node and do compaction on boltdb. Upon lnd becoming ready noticed that a recently force closed channel showed up as pending force closure tho with a maturity of >-2400 blocks and limbo balance.
Expected Behavior
Upon restart of lnd prior closed and swept channels should not reappear in the pending state.
Debug Information
Issue appears in pendingchannels output, reporting limbo balance and pending FC.
$ lncli pendingchannels
{
"total_limbo_balance": "832119",
"pending_open_channels": [],
"pending_closing_channels": [],
"pending_force_closing_channels": [
{
"channel": {
"remote_node_pub": "031a01e29587952eda0ed5d10c4e79bf0fc88d61aeae89e8a7ea7c036badb8c793",
"channel_point": "f075fc8ed00a3bce2de89279e5ade6f7bf02d3a33f1edd6b34f9e934070ab94c:2",
"capacity": "5000000",
"local_balance": "832119",
"remote_balance": "4166889",
"local_chan_reserve_sat": "0",
"remote_chan_reserve_sat": "0",
"initiator": "INITIATOR_REMOTE",
"commitment_type": "ANCHORS",
"num_forwarding_packages": "0",
"chan_status_flags": "",
"private": false,
"memo": "",
"custom_channel_data": ""
},
"closing_txid": "4b7464d7a4422e32d587aa3c587eaaf72195944d4a4ec50c359ef92f7596c40e",
"limbo_balance": "832119",
"maturity_height": 919999,
"blocks_til_maturity": -2493,
"recovered_balance": "0",
"pending_htlcs": [],
"anchor": "LOST"
}
],
"waiting_close_channels": []
}but we show no pendingsweeps
$ lncli wallet pendingsweeps
{
"pending_sweeps": []
}and we do see the sweep of limbo funds weeks ago via lncli wallet listsweeps txid: e1d6c4267ff64d0f248331bc3624c034e85f355e30e99e7f5a27ef0d8c201721 and funds were subsequently spent, so all signs are this is a reporting issue, no funds are stuck or unclaimed as far as I can tell.
Environment
lnd runs official docker image into EC2 VM. We run in rpcpolling mode under bitcoind, that points to a load balancer, multiple backing nodes round-robin accessed. Nodes are peered together, and also have their mempool's actively synced to avoid discrepancies.