Skip to content

Delayed output to us not being claimed. #747

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

Closed
alecalve opened this issue Jan 23, 2018 · 9 comments
Closed

Delayed output to us not being claimed. #747

alecalve opened this issue Jan 23, 2018 · 9 comments

Comments

@alecalve
Copy link

alecalve commented Jan 23, 2018

A while back, one of my channels was unilaterally closed by lightningd while I was fiddling with the RPC commands (I'm still not sure what happened there).

The channel went in the ONCHAIND_OUR_UNILATERAL state, which from my understanding meant I had to wait to_self_delay blocks (144) before my node would be able to claim its output, which would then be visible in listfunds. However, the transaction has now 365 confirmations and the delayed output is still unspent.

Is something amiss with my node or is my understanding of the situation incorrect?

@ZmnSCPxj
Copy link
Contributor

Something does seem amiss. I think onchaind should have been monitoring the situation and should have noticed the closing transaction was deep enough.

@alecalve
Copy link
Author

To be sure, I tried closing another channel, and this time everything went smoothly 🤔

@cdecker
Copy link
Member

cdecker commented Jan 25, 2018

onchaind should try to continue were it left off when restarting, did you try that?

@alecalve
Copy link
Author

alecalve commented Jan 25, 2018

I did restart the node, checking dev-blockheight while it was starting.

It started before the channel closure, then blew past (channel closure + 144) without touching the output. Here are some relevant log lines:

lightningd(7830): peer 02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432: Peer permanent failure in ONCHAIND_OUR_UNILATERAL: Funding transaction spent
lightningd(7830):        (tx 589e0846aff86da6a0e7179ce00957a8b95f081ca7d0729b93241763927c6c21)
lightningd(7830): peer 02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432: state: ONCHAIND_OUR_UNILATERAL -> FUNDING_SPEND_SEEN
lightningd(7830): peer 02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432: state: FUNDING_SPEND_SEEN -> ONCHAIND_OUR_UNILATERAL

@cdecker
Copy link
Member

cdecker commented Jan 25, 2018

Do you see entries like the following in your logs?

Propose handling OUR_UNILATERAL/DELAYED_OUTPUT_TO_US by OUR_DELAYED_RETURN_TO_WALLET

@cdecker
Copy link
Member

cdecker commented Jan 25, 2018

I appears that the delayed output was indeed be spent here: b98bb881178a786881d0da3d5466ee59588a048ac2f5453c69adfa5a3f194373 with 3 confirmations. So I appears that lightningd picked up the delayed output?

@alecalve
Copy link
Author

Oh, I didn't notice it. It seems that several restarts did the trick and that I was too hasty in judging lightningd ignored it. I didn't notice that log line, but I'm not sure it didn't happen as the logs went past my terminal's history. Once my node is fully synced, I'll check if the funds appear in listfunds.

@alecalve
Copy link
Author

It might be that the fix to #709 was the solution as I recently pulled master and restarted my node.

@alecalve
Copy link
Author

The funds are now listed in listfunds

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

3 participants