ACINQ / eclair-mobile

An Android wallet for the Lightning Network
Apache License 2.0
258 stars 44 forks source link

Open Channel: failed to publish funding tx #178

Open redstorm1 opened 5 years ago

redstorm1 commented 5 years ago

With Eclair Mobile 4.4 cannot open channels to ACINQ node or my LND nodes. the error is:

Failed to open channel: Couldn't publish funding tx

FowlyTheOne commented 5 years ago

I have the same issue failed to open channel couldn't publish funding tx since 7 days. I have one channel that somehow failed to recognize this and can not be closed (stuck in "wait_for_funding_confirmed" state) if i try to open another one it fails immediately with that error and shows "channel funding error" as cause of closing

I tried several values for the fees, also different nodes - it makes no difference. Closing a very old channel worked fine, so now im stuck with no open channels. Resetting the node db did not change anything

carnhofdaki commented 5 years ago

I have the same issue.

Note that also sending an on-chain tx fails. Use this mnemonic to debug on Eclair Mobile Testnet: undo assist essay swift ticket fossil tiny duty equal syrup leg fatal

When I try to empty wallet (tried both bech32 and p2sh-segwit destination addresses), I get: "Could not send transaction: Transaction failed"

If I try to send 0.01 btc on-chain, I get "Could not send transaction: could not commit tx=..."

0.001 and 0.0001 went through just fine now. Recover from the mnemonic and have a look.

mloop1 commented 5 years ago

same issue here. any update since April??

carnhofdaki commented 5 years ago

Edit: Oops, sorry, wrong issue.

t-bast commented 5 years ago

Can you please share your logs? You can find them in Settings -> Logging.

mloop1 commented 5 years ago

Can you please share your logs? You can find them in Settings -> Logging.

Hi, sorry for the late reply... coming back from the Berlin LNCONF... Unfortunately I could not find logs for the day the error happened, maybe the wallet only keeps the last few days?

I'll try to give more details here: On the 14th of October I succesfully closed an already existing channel between eclair mobile and my c-lightning node (which was initially created in March):

channel_id = 8db3d488f9c504c6cdf82b2ffd148a9b28386e3abae8735efee895ec44985bda
funding_tx_id = da5b9844ec95e8fe5e73e8ba3a6e38289b8a14fd2f2bf8cdc604c5f988d4b38d

The day after (15th of October) I tried to open a new channel between the same 2 peers (mobile wallet and c-lightning node), and I got the error "Cause of closing: channel funding error":

Channel id: 8779103fa9b128568fc418aa22a84b89ace30c59fa65bfe79e5bf0039e07bfbe
Funding TX id: bebf079e03f05b9ee7bf65fa590ce3ac894ba822aa18c48f5628b1a93f107987 (which of course was not broadcasted)

On the logs of my c-lightning node I see:

2019-10-15T18:28:54.480Z UNUSUAL lightningd(2695): 023aa71513750ebb0b27fdfc0f418967813fa0c178f3469e80c2b92ed6575994a2 chan #30610: Peer permanent failure in CHANNELD_AWAITING_LOCKIN: lightning_channeld: received ERROR channel 8779103fa9b128568fc418aa22a84b89ace30c59fa65bfe79e5bf0039e07bfbe: channel funding error

The channel currently still appears in AWAITING_UNILATERAL state (connected=false) in my c-lightning node and if I now try to open a channel again I get an error saying that there is already an active channel.

redstorm1 commented 4 years ago

I also have this issue on testnet. Edit - lol been so long i forgot i opened this thread... RROR f.a.e.b.e.ElectrumEclairWallet - cannot broadcast tx 413c42b69230638ee2d56a4a406a5db47eb7d1eb1e6690fb76e98bee9a3953c8: Error(0,the transaction was rejected by network rules.

bad-txns-inputs-missingorspent

This also has been trying to close 2 channels for 12 months. RIP 1.1tBTC as cannot send funding tx or onchain tx's in its current state.

t-bast commented 4 years ago

@redstorm1 this is very weird, it looks like you're double-spending your own funding tx somehow... Are you connecting to custom electrum servers or the standard ones? Can you share the exact funding transaction (so that we investigate the inputs)? Have you verified on an explorer that the inputs are there? A lot of weird stuff can happen on testnet...

dpad85 commented 4 years ago

You can try resetting the wallet's cache, this will force the wallet to resynchronize from Electrum. You can do that in the Settings > Network Info screen.

redstorm1 commented 4 years ago

I reset the cache yesterday and it has resynced. i will post the full log so the inputs can be investigated. but it has got itself in a knot. where it thinks the inputs have been spent and there are also two channels stuck in closing for months could even be a year as i have not been actively developing on lighting for a while.

Connecting to the standard electrum servers. log below

redstorm1 commented 4 years ago

eclair-wallet.log

t-bast commented 4 years ago

I think this is because of a deep re-org that completely messed up your state (combined with the fact that you've been offline for a while and the wallet "missed" the opportunity to react to the reorg correctly). This can happen on testnet as very long reorg are frequent, whereas they're impossible on mainnet.

redstorm1 commented 4 years ago

So just burn the 1.1tBTC thats in the wallet? sounds like no way out, Glad that this is not possible on Mainnet or it would be a show stopper for lightning.

t-bast commented 4 years ago

So just burn the 1.1tBTC thats in the wallet?

Not necessarily, but you'll have to spend time figuring out the exact state of your utxos. First try importing your see in Electrum wallet to see if the utxos can be claimed on-chain. Otherwise you'll have to do some blockchain history investigation to figure out exactly which utxo should be available and which have been spent. There's also the possibility that the reorg "stole" the inputs from you in the first place.