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

Pending update #488

Closed
WilsonJr01 opened this issue Feb 15, 2023 · 15 comments
Closed

Pending update #488

WilsonJr01 opened this issue Feb 15, 2023 · 15 comments
Labels
bug Something isn't working

Comments

@WilsonJr01
Copy link

I have a problem with lightning-terminal. I updated my pool account, but the txid never made it to the mempool and now the account is stuck in pending update.
Expected behavior

Actual behavior

To reproduce

System information

Umbrel

@WilsonJr01 WilsonJr01 added the bug Something isn't working label Feb 15, 2023
@ellemouton
Copy link
Member

Hi @WilsonJr01! Thanks for reporting, I will pass this issue on to the pool team 👍

@positiveblue
Copy link
Contributor

positiveblue commented Feb 15, 2023

I think I know what is going on here. Can you share your account_id?

It’s possible that your client got out of sync when you updated your account (deposit/withdraw funds) while it was participating in a batch. Did you sold/bought any channel lately?

If this is what happened you will have to go through the account recovery process. Your account will be in synced again and you will be able to use your funds as usual but the old, non matched, orders will be canceled and the information about out leases too.

https://docs.lightning.engineering/lightning-network-tools/pool/account_recovery

@WilsonJr01
Copy link
Author

WilsonJr01 commented Feb 15, 2023

where can I see my account_id? my trader key is 02be88105cf997b06b0cb6a5569b835bc0d8cd0c689be15648c7d6b0bfd955bb30

I already try to do the recovery process, but it didn't worked

I sold a channel abou a week ago

@positiveblue
Copy link
Contributor

positiveblue commented Feb 16, 2023

In this case the client did not get out of sync with the server by interacting with his account while participating in a batch.

The user deposited new funds in his account calling the DepositAccount rpc method. A new AccountDiff was created with a tx that had three inputs and two outputs

  • in: current account outpoint
  • in: utxo from lnd wallet
  • in: utxo from lnd wallet
  • out: new account output
  • out: change

The account diff has not been applied to the account because is waiting for confirmations. However, that tx was never broadcasted to the network. The lnd node does not see it in pending txs and the two inputs that the lnd node manages are not seen as "spent".

In the lnd logs we can see that a subscription was created for this tx but was canceled few minutes later NTFN: Canceling confirmation notification:

Umbrel does not store the container logs for more than one day, so we do not have them for pool.

The account is currently unusable because of it's Pending Updating state.

In the spendAccount we do not rollback the account update if the broadcast fails which would release the funds in LND which may be what happened here.

@cinartec
Copy link

Is there a fix for this bug?

@guggero
Copy link
Member

guggero commented Apr 17, 2023

There is no fix yet, but we are working on one. If you are affected, you can tell us your account key (=trader key) and we can reset it on the server side. Then you can use the account recovery to sync your local account state: https://docs.lightning.engineering/lightning-network-tools/lightning-terminal/troubleshooting#pool-account-recovery

@cinartec
Copy link

Greetings,
Here is my Trader Key: 03c3b96f13fb06c103f9e44952b62e933d0104e58eaeb492b946e4a8392074b8af
thank you so much.

There is no fix yet, but we are working on one. If you are affected, you can tell us your account key (=trader key) and we can reset it on the server side. Then you can use the account recovery to sync your local account state: https://docs.lightning.engineering/lightning-network-tools/lightning-terminal/troubleshooting#pool-account-recovery

@guggero
Copy link
Member

guggero commented Apr 20, 2023

I have removed the pending state on the server side, you can now proceed with the account recovery.

@cinartec
Copy link

I have removed the pending state on the server side, you can now proceed with the account recovery.

Thank you sir, I was able to exec the account recovery; and the account went back to "OPEN" Status, However, I'm missing the fund that were stuck in the "PENDING UPDATE" state. Would you know how to recover those fund? thank you.

@guggero
Copy link
Member

guggero commented Apr 21, 2023

Those funds should be back in your lnd wallet. If not, try a restart of lnd.

@cinartec
Copy link

restarting my lnd did not work. I am not sure where the fund went now?

@guggero
Copy link
Member

guggero commented Apr 21, 2023

Are you sure you didn't use the funds for something else in the meantime? When I reset the state I saw that the wallet input was spent in another transaction in the meantime. Maybe you opened a channel or sent funds and that's where they are now?

@cinartec
Copy link

cinartec commented Apr 22, 2023

Are you sure you didn't use the funds for something else in the meantime? When I reset the state I saw that the wallet input was spent in another transaction in the meantime. Maybe you opened a channel or sent funds and that's where they are now?

thanks Guggero, I do sincerely recalled that my balance was 11,000,000 SAT while the ACCOUNT STATUS stuck in PENDING UPDATE stage.
After I ran and executed account recover on container "lightninglabs/lightning-terminal:v0.8.6-alpha." my account is down to 5,000,000 SAT. So I am not sure where is the 6,000,000 went?
I might have ran the recovery command on the wrong container?

I also captured the transaction ID while it was stuck in PENDING UPDATE stage:

Transaction
273c1a95e5253e2cbfa2c1ee6de33b700350a4f6e857d07f5ca6
08d295191a94
Transaction not found.
Waiting for it to appear in the mempool...

@guggero
Copy link
Member

guggero commented Apr 22, 2023

Yes, the pending transaction attempted to add 6M sats to the account. But because that deposit transaction never confirmed because the funds were spent by the lnd wallet in the meantime, the funds should be accounted for somewhere in lnd (either in a channel you opened or another transaction your node made). So you just need to add the funds to the Pool account again.

@levmi
Copy link
Contributor

levmi commented May 17, 2023

Closing due to inactivity, let us know if you need more help.

@levmi levmi closed this as completed May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants