UTXO missing from wallet after a restart and an unwanted local force-close
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- c
- Área
- backend, blockchain
Línea de trabajo
Empieza siguiendo la ruta de reinicio a través de los logs de onchaind, especialmente la recuperación después de “Unknown commitment” y la transición a ONCHAIN. Compara las cinco salidas de la transacción de cierre con listfunds, listclosedchannels y bkpr-listaccountevents, y luego usa dev-rescan-outputs o --rescan para verificar si se recupera el UTXO faltante y deja de clasificarse como onchain_fee.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
After a restart of the node, it automatically force-closed a channel but an UTXO in the closing transaction (resulting from a pending HTLC) is missing in the output of listfunds.
CLN version: v25.12.1
Bitcoind version: 31.0
funding transaction: 7e907aa45a014c1666a5d1eefe98d4245b616abd02b9398d42293bc23aca2cce
closing transaction: 5bf58ab7e136d74d837472eaa907a5b3c508e4dfd8a20063c4814ebdddc1de4b
The closing transaction results in 5 outputs:
- anchor
- anchor
- the missing unspent UTXO (215289 sats)
- remaining funds of their side (1860779 sats)
- remaining funds of our side (9922922 sats)
listclosedchannels shows we should own this UTXO:
"final_to_us_msat": 10138211724
bkpr-listaccountevents shows this output as onchain_fee :
{
"account": "ce2cca3ac23b29428d39b902bd6a615b24d498feeed1a566164c015aa47a907f",
"type": "onchain_fee",
"tag": "onchain_fee",
"credit_msat": 215289724,
"debit_msat": 0,
"currency": "bc",
"timestamp": 1780321071,
"txid": "5bf58ab7e136d74d837472eaa907a5b3c508e4dfd8a20063c4814ebdddc1de4b"
}
The logs of this channel just after I restarted CLN:
2026-06-01T12:30:39.470Z UNUSUAL 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: Peer permanent failure in CHANNELD_NORMAL: channeld: sent Awaiting unilateral close (reason=local)
2026-06-01T12:30:39.470Z INFO 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: State changed from CHANNELD_NORMAL to AWAITING_UNILATERAL
2026-06-01T12:30:39.472Z **BROKEN** 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: Cannot broadcast our commitment tx: they have a future one
2026-06-01T13:37:51.100Z UNUSUAL 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: Peer permanent failure in AWAITING_UNILATERAL: Funding transaction spent: onchain txid 5bf58ab7e136d74d837472eaa907a5b3c508e4dfd8a20063c4814ebdddc1de4b (reason=unknown)
2026-06-01T13:37:51.100Z **BROKEN** 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: Cannot broadcast our commitment tx: they have a future one
2026-06-01T13:37:51.100Z INFO 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: State changed from AWAITING_UNILATERAL to FUNDING_SPEND_SEEN
2026-06-01T13:37:51.129Z **BROKEN** 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-onchaind-chan#11240: ERROR: Unknown commitment #1457929, recovering our funds!
2026-06-01T13:37:51.129Z INFO 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: State changed from FUNDING_SPEND_SEEN to ONCHAIN
2026-06-02T07:38:44.777Z INFO 03a93b87bf9f052b8e862d51ebbac4ce5e97b5f4137563cd5128548d7f5978dda9-chan#11240: onchaind complete, forgetting peer
What I've tried:
dev-rescan-outputs--rescanwith a large value (before the funding transaction)
- Lenguaje dominante
- C
- Estrellas
- 3.1k
- Forks
- 1k
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 30
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ElementsProject/lightning
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
ElementsProject/lightning#9634 ·
Los mantenedores suelen responder en 2 días
-
plugins/recover: missing comma in nodes_for_gossip concatenates two bootstrap addresses into invalid addressPosiblemente ocupada @bhuvan-somisetty la tomó hace 6 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
ElementsProject/lightning#9630 ·
Los mantenedores suelen responder en 2 días
-
common/json_parse: json_to_bitcoin_amount fails to detect overflow and accepts negative/empty inputsPosiblemente ocupada @bhuvan-somisetty la tomó hace 10 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ElementsProject/lightning#9617 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
ElementsProject/lightning#9616 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
ElementsProject/lightning#9593 ·
Los mantenedores suelen responder en 2 días
Todos los issues de ElementsProject/lightning
Issues similares
-
v9.6.0: CMake incorrectly enforces presence of libevdevPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
IoTSDK
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Azure/azure-iot-sdk-c#2776 ·
Los mantenedores suelen responder en 2 días
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug Component component: net
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
RT-Thread/rt-thread#11913 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
contiki-ng/contiki-ng#3289 ·
Los mantenedores suelen responder en 3 días