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

ONCHAIN: 1 outputs unresolved: waiting confirmation that we spent DELAYED_OUTPUT_TO_US using OUR_DELAYED_RETURN_TO_WALLET #7460

Closed
pabpas opened this issue Jul 9, 2024 · 1 comment · Fixed by #7567
Milestone

Comments

@pabpas
Copy link

pabpas commented Jul 9, 2024

Issue and Steps to Reproduce

I have had some funds in limbo since a couple of months and today I am finally filling an issue.

Long story short, somebody took my liquidity offer and after a few minutes they sent an error and force closed. The problem for me has been that I can't move my utxo because it is stuck with a fee of 122 sats.

I have tried to sendrawtransaction (as it appears in listtransactions) but it is below the lower limit. I have also tried to withdraw using the tx:vout that holds the coins, but the wallet does not accept it as input. Any suggestion on how to recover it?

This happened running v24.02.2 but now I am running v24.05.

Other issues maybe related: #7377, #7118, #7206, #6951

Some outputs.


2024-05-11T21:30:37.529Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 619743x2411x1
2024-05-11T21:30:40.563Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 702901x1656x1
2024-05-11T21:30:40.564Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 706986x1344x1
2024-05-11T21:30:40.566Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 708664x665x1
2024-05-11T21:30:40.567Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 709451x2198x1
2024-05-11T21:30:40.569Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 715307x1532x1
2024-05-11T21:30:40.570Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 717422x195x0
2024-05-11T21:30:40.571Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 717471x2666x1
2024-05-11T21:30:40.572Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 720249x2549x1
2024-05-11T21:30:40.574Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 720531x557x1
2024-05-11T21:30:40.575Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 722975x117x0
2024-05-11T21:30:40.576Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 724120x1980x1
2024-05-11T21:30:40.577Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 724509x2190x0
2024-05-11T21:30:40.577Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 726040x481x0
2024-05-11T21:30:40.578Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 727140x1032x1
...
2024-05-11T21:35:20.367Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from DUALOPEND_OPEN_INIT to DUALOPEND_OPEN_COMMIT_READY
2024-05-11T21:35:20.613Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from DUALOPEND_OPEN_COMMIT_READY to DUALOPEND_OPEN_COMMITTED
2024-05-11T21:35:21.391Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from DUALOPEND_OPEN_COMMITTED to DUALOPEND_AWAITING_LOCKIN
2024-05-11T22:04:23.422Z **BROKEN** 031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-dualopend-chan#699: Unexpected message WIRE_CHANNEL_REESTABLISH
2024-05-11T22:04:23.423Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-dualopend-chan#699: Peer connection lost
2024-05-11T22:04:23.423Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: Peer transient failure in DUALOPEND_AWAITING_LOCKIN: dualopend: Owning subdaemon dualopend died (62208)
2024-05-11T22:04:23.502Z UNUSUAL 031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: Peer permanent failure in DUALOPEND_AWAITING_LOCKIN: They sent ERROR channel 53af02ad64e93db6912307154936e86ed05b9f3981ba162c3d9fc9f62c69fd11: Bad reestablish msg: WIRE_CHANNEL_READY 002453af02ad64e93db6912307154936e86ed05b9f3981ba162c3d9fc9f62c69fd1102538ff37955044aec1dca894db04a06f0239ab763cde7a8b6adb06fadd32f23eb0108df50c73d561c89d4
2024-05-11T22:04:23.519Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from DUALOPEND_AWAITING_LOCKIN to AWAITING_UNILATERAL
2024-05-11T22:14:01.226Z UNUSUAL 031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: Peer permanent failure in AWAITING_UNILATERAL: Funding transaction spent
2024-05-11T22:14:01.231Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from AWAITING_UNILATERAL to FUNDING_SPEND_SEEN
2024-05-11T22:14:02.938Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from FUNDING_SPEND_SEEN to ONCHAIN

2024-05-13T21:42:26.578Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: RBF onchain txid c66063f0b5efa1f96cdf576e1d7f7d2b5b074138ff8caff49671628520804f4b (fee 122sat) with txid fb90a8d33e4d3dfbaf70347080c9779fc1c16b87b604ccd97baf49acfdf877f8 (fee 1488sat)
2024-05-13T23:48:30.788Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: RBF onchain txid dab1b8c116a31997f2c0db440e47b7499899689868ca71ef68ffb10a3fa90837 (fee 1487sat) with txid efd8df5a3d20366d686310ef486412550aab406ee63309a817f67459332afc81 (fee 1784sat)
2024-05-13T23:57:07.494Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: RBF onchain txid efd8df5a3d20366d686310ef486412550aab406ee63309a817f67459332afc81 (fee 1784sat) with txid 3777664470b4b640477675add343363b4c7b02efef1b779560a888913a57bfb2 (fee 2080sat)
2024-05-14T00:23:11.344Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: RBF onchain txid 3777664470b4b640477675add343363b4c7b02efef1b779560a888913a57bfb2 (fee 2080sat) with txid 20910b5dc443185c376016a7bbdced6fa4b7e0f36514a0a4c8f662fe86c3e0e0 (fee 2376sat)
...
2024-07-08T21:58:39.147Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 5 outputs unresolved: in 190 blocks will spend DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:39.166Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:39.167Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 99
2024-07-08T21:58:39.168Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 99
2024-07-08T21:58:39.169Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 99
2024-07-08T21:58:39.171Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 99
2024-07-08T21:58:39.172Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 5 outputs unresolved: in 189 blocks will spend DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:39.173Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:39.173Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 100
2024-07-08T21:58:39.174Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 100
2024-07-08T21:58:39.174Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 100
2024-07-08T21:58:39.175Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 100
2024-07-08T21:58:39.175Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 1 outputs unresolved: in 188 blocks will spend DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:39.176Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:39.176Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 101
2024-07-08T21:58:39.176Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 101
2024-07-08T21:58:39.177Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 101
2024-07-08T21:58:39.177Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 101
2024-07-08T21:58:39.178Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 1 outputs unresolved: in 187 blocks will spend DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:39.178Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:39.644Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 102
2024-07-08T21:58:39.645Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 102
2024-07-08T21:58:39.645Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 102
2024-07-08T21:58:39.645Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 102
...
2024-07-08T21:58:40.547Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 1 outputs unresolved: in 2 blocks will spend DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:40.547Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:40.547Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 287
2024-07-08T21:58:40.547Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 287
2024-07-08T21:58:40.548Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 287
2024-07-08T21:58:40.548Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 287
2024-07-08T21:58:40.548Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 1 outputs unresolved: in 1 blocks will spend DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:40.548Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:40.548Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 288
2024-07-08T21:58:40.549Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 288
2024-07-08T21:58:40.549Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 288
2024-07-08T21:58:40.549Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 288
2024-07-08T21:58:40.549Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: billboard: 1 outputs unresolved: waiting confirmation that we spent DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET
2024-07-08T21:58:40.549Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: Got new message WIRE_ONCHAIND_DEPTH
2024-07-08T21:58:40.550Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: FUNDING_TRANSACTION/FUNDING_OUTPUT->OUR_UNILATERAL depth 289
2024-07-08T21:58:40.550Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_THEM->SELF depth 289
2024-07-08T21:58:40.550Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/ANCHOR_TO_US->SELF depth 289
2024-07-08T21:58:40.550Z DEBUG   031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-onchaind-chan#699: OUR_UNILATERAL/OUTPUT_TO_THEM->SELF depth 289
...
2024-07-08T22:17:28.952Z INFO    lightningd: Restarting onchaind for channel 699
2024-07-08T22:17:29.243Z UNUSUAL 031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: Peer permanent failure in ONCHAIN: Funding transaction spent
2024-07-08T22:17:29.245Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from ONCHAIN to FUNDING_SPEND_SEEN
2024-07-08T22:17:29.373Z INFO    lightningd: --------------------------------------------------
2024-07-08T22:17:29.593Z INFO    031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39-chan#699: State changed from FUNDING_SPEND_SEEN to ONCHAIN


$ lightning-cli listfunds
{
         "peer_id": "031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39",
         "connected": false,
         "state": "ONCHAIN",
         "channel_id": "53af02ad64e93db6912307154936e86ed05b9f3981ba162c3d9fc9f62c69fd11",
         "short_channel_id": "843057x931x2",
         "our_amount_msat": 1864869000,
         "amount_msat": 2000000000,
         "funding_txid": "3a36e065ff034ea5dd77cbc00e0943bfbd98bbfc4f6b65eba5418e77fceb84f3",
         "funding_output": 2
},


$ lightning-cli listpeerchannels 031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39
{
   "channels": [
      {
         "peer_id": "031f248d25e0ef7f7f768df6b7ba90d7a39d5ee6c36dd09aab0808c9eff9a36d39",
         "peer_connected": false,
         "channel_type": {
            "bits": [
               12,
               22
            ],
            "names": [
               "static_remotekey/even",
               "anchors_zero_fee_htlc_tx/even"
            ]
         },
         "updates": {
            "local": {
               "htlc_minimum_msat": 100000,
               "htlc_maximum_msat": 1980000000,
               "cltv_expiry_delta": 34,
               "fee_base_msat": 100,
               "fee_proportional_millionths": 500
            }
         },
         "state": "ONCHAIN",
         "scratch_txid": "be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07",
         "last_tx_fee_msat": 4476000,
         "lost_state": false,
         "feerate": {
            "perkw": 3983,
            "perkb": 15932
         },
         "owner": "onchaind",
         "short_channel_id": "843057x931x2",
         "direction": 0,
         "channel_id": "53af02ad64e93db6912307154936e86ed05b9f3981ba162c3d9fc9f62c69fd11",
         "funding_txid": "3a36e065ff034ea5dd77cbc00e0943bfbd98bbfc4f6b65eba5418e77fceb84f3",
         "funding_outnum": 2,
         "initial_feerate": "3000perkw",
         "last_feerate": "3000perkw",
         "next_feerate": "3125perkw",
         "inflight": [
            {
               "funding_txid": "3a36e065ff034ea5dd77cbc00e0943bfbd98bbfc4f6b65eba5418e77fceb84f3",
               "funding_outnum": 2,
               "feerate": "3000perkw",
               "total_funding_msat": 2000000000,
               "our_funding_msat": 1864869000,
               "splice_amount": 0,
               "scratch_txid": "be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07"
            }
         ],
         "close_to_addr": "bc1p7yhwdfc4afskn3gemzp6qqca6e0dsdqqths5qyqz4tgqjgdyf3dq8hurce",
         "close_to": "5120f12ee6a715ea6169c519d883a0031dd65ed834005de1401002aad00921a44c5a",
         "private": false,
         "opener": "remote",
         "closer": "remote",
         "alias": {
            "local": "14635207x4019740x35284"
         },
         "features": [
            "option_static_remotekey",
            "option_anchors_zero_fee_htlc_tx"
         ],
         "funding": {
            "remote_funds_msat": 143272000,
            "local_funds_msat": 1856728000,
            "fee_rcvd_msat": 8141000
         },
         "to_us_msat": 1864869000,
         "min_to_us_msat": 1864869000,
         "max_to_us_msat": 1864869000,
         "total_msat": 2000000000,
         "fee_base_msat": 100,
         "fee_proportional_millionths": 500,
         "dust_limit_msat": 546000,
         "max_total_htlc_in_msat": 18446744073709551615,
         "their_reserve_msat": 20000000,
         "our_reserve_msat": 20000000,
         "spendable_msat": 1844869000,
         "receivable_msat": 103216000,
         "minimum_htlc_in_msat": 0,
         "minimum_htlc_out_msat": 100000,
         "maximum_htlc_out_msat": 1980000000,
         "their_to_self_delay": 144,
         "our_to_self_delay": 288,
         "max_accepted_htlcs": 30,
         "state_changes": [
            {
               "timestamp": "2024-05-11T21:35:21.393Z",
               "old_state": "DUALOPEND_OPEN_COMMITTED",
               "new_state": "DUALOPEND_AWAITING_LOCKIN",
               "cause": "remote",
               "message": "Sigs exchanged, waiting for lock-in"
            },
            {
               "timestamp": "2024-05-11T22:04:23.521Z",
               "old_state": "DUALOPEND_AWAITING_LOCKIN",
               "new_state": "AWAITING_UNILATERAL",
               "cause": "remote",
               "message": "They sent ERROR channel 53af02ad64e93db6912307154936e86ed05b9f3981ba162c3d9fc9f62c69fd11: Bad reestablish msg: WIRE_CHANNEL_READY 002453af02ad64e93db6912307154936e86ed05b9f3981ba162c3d9fc9f62c69fd1102538ff37955044aec1dca894db04a06f0239ab763cde7a8b6adb06fadd32f23eb0108df50c73d561c89d4"
            },
            {
               "timestamp": "2024-05-11T22:14:01.234Z",
               "old_state": "AWAITING_UNILATERAL",
               "new_state": "FUNDING_SPEND_SEEN",
               "cause": "remote",
               "message": "Onchain funding spend"
            },
            {
               "timestamp": "2024-05-11T22:14:02.953Z",
               "old_state": "FUNDING_SPEND_SEEN",
               "new_state": "ONCHAIN",
               "cause": "remote",
               "message": "Onchain init reply"
            },
            {
               "timestamp": "2024-06-18T10:37:34.266Z",
               "old_state": "ONCHAIN",
               "new_state": "FUNDING_SPEND_SEEN",
               "cause": "remote",
               "message": "Onchain funding spend"
            },
            {
               "timestamp": "2024-06-18T10:37:34.483Z",
               "old_state": "FUNDING_SPEND_SEEN",
               "new_state": "ONCHAIN",
               "cause": "remote",
               "message": "Onchain init reply"
            },
            {
               "timestamp": "2024-07-08T14:36:52.752Z",
               "old_state": "ONCHAIN",
               "new_state": "FUNDING_SPEND_SEEN",
               "cause": "remote",
               "message": "Onchain funding spend"
            },
            {
               "timestamp": "2024-07-08T14:36:53.151Z",
               "old_state": "FUNDING_SPEND_SEEN",
               "new_state": "ONCHAIN",
               "cause": "remote",
               "message": "Onchain init reply"
            },
            {
               "timestamp": "2024-07-08T21:58:33.708Z",
               "old_state": "ONCHAIN",
               "new_state": "FUNDING_SPEND_SEEN",
               "cause": "remote",
               "message": "Onchain funding spend"
            },
            {
               "timestamp": "2024-07-08T21:58:34.048Z",
               "old_state": "FUNDING_SPEND_SEEN",
               "new_state": "ONCHAIN",
               "cause": "remote",
               "message": "Onchain init reply"
            },
            {
               "timestamp": "2024-07-08T22:17:29.252Z",
               "old_state": "ONCHAIN",
               "new_state": "FUNDING_SPEND_SEEN",
               "cause": "remote",
               "message": "Onchain funding spend"
            },
            {
               "timestamp": "2024-07-08T22:17:29.615Z",
               "old_state": "FUNDING_SPEND_SEEN",
               "new_state": "ONCHAIN",
               "cause": "remote",
               "message": "Onchain init reply"
            }
         ],
         "status": [
            "ONCHAIN:Tracking our own unilateral close",
            "ONCHAIN:1 outputs unresolved: waiting confirmation that we spent DELAYED_OUTPUT_TO_US (be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07:3) using OUR_DELAYED_RETURN_TO_WALLET"
         ],
         "in_payments_offered": 0,
         "in_offered_msat": 0,
         "in_payments_fulfilled": 0,
         "in_fulfilled_msat": 0,
         "out_payments_offered": 0,
         "out_offered_msat": 0,
         "out_payments_fulfilled": 0,
         "out_fulfilled_msat": 0,
         "htlcs": []
      }
   ]
}
@pabpas
Copy link
Author

pabpas commented Jul 16, 2024

I've been trying to broadcast the transaction by increasing my bitcoind mempool size. Now I do not get the transaction rejected because of low fee but because of locktime. At this point I don't understand, locktime was 288 which is long ago. Anything I am missing here?

This is the extract of listtrasactions of what I understand is the sweep transaction:

         "hash": "c66063f0b5efa1f96cdf576e1d7f7d2b5b074138ff8caff49671628520804f4b",
         "rawtx": "02000000000101075d56dc1c87e61ce48fbbcca38323788b28558d63ebcd122eac9951ae706dbe030000000020010000012b741c000000000016001422a13f876afdef83027bf0276cabc61c1246035f0347304402201121eeb4f3da98300c1c91e9cfb1d939792497b38173ffab26bbea6c9cccf8880220411130a7a9c9d4a50140011631ddbf8fb165d5d9243f2a15211965e098e1e09901004d632103a3a9dfd9734a737e4d237cedd115f6bf35dd579a4ccc5428e932be8b6d1353606702c00fb2752103a9fbd896d5b7bcfd46ad73f4eed1ad4119f19403c048d82883118606992bf6b668ac00000000",
         "blockheight": 0,
         "txindex": 0,
         "locktime": 0,
         "version": 2,
         "inputs": [
            {  
               "txid": "be6d70ae5199ac2e12cdeb638d55288b782383a3ccbb8fe41ce6871cdc565d07",
               "index": 3,
               "sequence": 288
            }
         ],
         "outputs": [
            {  
               "index": 0,
               "amount_msat": 1864747000,
               "scriptPubKey": "001422a13f876afdef83027bf0276cabc61c1246035f"
            }
         ]
      },


$ lightning-cli sendrawtransaction 02000000000101075d56dc1c87e61ce48fbbcca38323788b28558d63ebcd122eac9951ae706dbe030000000020010000012b741c000000000016001422a13f876afdef83027bf0276cabc61c1246035f0347304402201121eeb4f3da98300c1c91e9cfb1d939792497b38173ffab26bbea6c9cccf8880220411130a7a9c9d4a50140011631ddbf8fb165d5d9243f2a15211965e098e1e09901004d632103a3a9dfd9734a737e4d237cedd115f6bf35dd579a4ccc5428e932be8b6d1353606702c00fb2752103a9fbd896d5b7bcfd46ad73f4eed1ad4119f19403c048d82883118606992bf6b668ac00000000 true
{
   "success": false,
   "errmsg": "error code: -26\nerror message:\nmandatory-script-verify-flag-failed (Locktime requirement not satisfied)"
}

rustyrussell added a commit to rustyrussell/lightning that referenced this issue Aug 13, 2024
Our hash tables allow duplicate keys, and we use that in a few places.
However, the get() function only returns the first, so it's not a good
idea with such hash tables.

Another patch fixes this at a deeper level (using different hash table
types depending on whether this table can have duplicates), but this
is the minimal fix for existing code.

This may be the cause behind us occasionally missing onchain events:

Fixes: ElementsProject#7460
Fixes: ElementsProject#7377
Fixes: ElementsProject#7118
Fixes: ElementsProject#6951

This fixes them in future: fixing them now will require something else.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: lightningd: occasionally we could miss transaction outputs (not telling gossipd, or even onchaind)
ShahanaFarooqui pushed a commit that referenced this issue Aug 13, 2024
Our hash tables allow duplicate keys, and we use that in a few places.
However, the get() function only returns the first, so it's not a good
idea with such hash tables.

Another patch fixes this at a deeper level (using different hash table
types depending on whether this table can have duplicates), but this
is the minimal fix for existing code.

This may be the cause behind us occasionally missing onchain events:

Fixes: #7460
Fixes: #7377
Fixes: #7118
Fixes: #6951

This fixes them in future: fixing them now will require something else.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: lightningd: occasionally we could miss transaction outputs (not telling gossipd, or even onchaind)
@ShahanaFarooqui ShahanaFarooqui added this to the v24.08 milestone Aug 13, 2024
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

Successfully merging a pull request may close this issue.

2 participants