spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.35k stars 3.06k forks source link

help: channel opening and closing in cooperative #8530

Open Apophis3 opened 1 year ago

Apophis3 commented 1 year ago

I have tried to open a channel with Electrum Trampoline. and since it took a long time and was in opening all the time, everything looked good, except the following part: the capacity of my channel was 654753 sats, I could send 641317 sats and receive 0 sats. In channel short id: not yet available I decided to do a cooperative closing.

Currently the status is shutdown

It doesn't let me do anything else like I solve to be able to recover my sats. Could you tell me if it takes a long time to make the closures or if there is a more effective and cheaper way to do it? Captura

ecdsa commented 1 year ago

could you please post the transaction ID of the channel opening transaction?

Apophis3 commented 1 year ago

id transaction: 6b9f75d3da5d349ae25f0bb45e9f36ef2fd7bf093bbe7a9225f7452487bb89d1

Tell me if you need any more information like the channel id or something else 02

ecdsa commented 1 year ago

The channel opening tx is unconfirmed, because it has paid a very low fee. There is no change output, so it cannot be bumped with CPFP. Channel funding transactions have RBF disabled, because malleating the txid would result in a loss of funds. (see e1dc7d1).

Ideally, users should be allowed to double spend to the wallet in that case, using a server that accepts full-rbf.

Currently, it is possible to double spend a mempool transaction, but it is not easy. The user needs to go offline and remove the mempool tx from adb using the python console. I think we should make that easier, by making mempool transactions "local" if the wallet is offline. This would allow users to delete them using the menu, and create a DS transaction, without having to use the python console.

Apophis3 commented 1 year ago

The channel opening tx is unconfirmed, because it has paid a very low fee. There is no change output, so it cannot be bumped with CPFP. Channel funding transactions have RBF disabled, because malleating the txid would result in a loss of funds. (see e1dc7d1).

Ideally, users should be allowed to double spend to the wallet in that case, using a server that accepts full-rbf.

Currently, it is possible to double spend a mempool transaction, but it is not easy. The user needs to go offline and remove the mempool tx from adb using the python console. I think we should make that easier, by making mempool transactions "local" if the wallet is offline. This would allow users to delete them using the menu, and create a DS transaction, without having to use the python console.

And how do I perform the FULL-RBF with the console? 1º I understand from what you say that I have to disconnect from the internet. 2º delete from the console. I think it's something like this: if 6b9f75d3da5d349ae25f0bb45e9f36ef2fd7bf093bbe7a9225f7452487bb89d1in list(wallet.transactions.keys()): wallet.transactions.pop(6b9f75d3da5d349ae25f0bb45e9f36ef2fd7bf093bbe7a9225f7452487bb89d1) wallet.save_transactions()

3º and how do I double spend, that is, the spending order and/or amount

The truth is that I am lost with the solution that you tell me,

Thanks in advance for your time and dedication.

ecdsa commented 1 year ago

Well, this was not really a solution, just some considerations on how to make it easier. Here is to remove the transaction: wallet.adb.remove_transaction("6b9f75d3da5d349ae25f0bb45e9f36ef2fd7bf093bbe7a9225f7452487bb89d1") After that you need to create a new transaction that spends the same inputs (stay offline), save it, and submit it to a miner that accepts full RBF (ideally, there might be a website that lets you post the hexadecimal transaction from a form)

ecdsa commented 1 year ago

note: you can also try to broadcast the transaction from Electrum, if the server you are using is running full-RBF. but you will need to copy the local transaction in the clipboard before going online, because going online will kick it from your history

Apophis3 commented 1 year ago

MY DOUBTS: 1º create a new transaction that spends the same entry (same value?): what do you mean (what amount, the commission: 1107 sats or the amount sent: total 654753 sats) 2º To which address should I send the new transaction (the operation was to create a channel), other address ? 3º I don't know miners that accept full RBF (you mean a website like: https://blockchair.com/broadcast/

Creo una nueva transacción offline, Tengo mi transacción creada y lo pongo en >Historial, allí le doy a transmitir. Conecto internet y me salta error y vuleve a aparecer la primera transacción

ecdsa commented 1 year ago

Note: as we speak, that transaction has been dropped from the memory pool of most block explorers. The channel opening transaction should be displayed as "local" in your electrum client, and you should be able to delete it.