question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lightning channel stuck while opening due to low fee

See original GitHub issue

I’m using Electrum from master branch. I tried to open a new channel to a node and set the fee manually using the static method. Looks like it wasn’t enough because I’ve got this in the log (there were no GUI error messages and no transactions appeared at the history tab):

I | transaction | adding signature for <nodeid>
D | transaction | is_complete True
I/n | network | broadcast_transaction error [DO NOT TRUST THIS MESSAGE]: RPCError(1, 'the transaction was rejected by network rules.\n\ninsufficient fee, rejecting replacement e249d9
535bef20c16b4dc3338a6d313e69b2d606f2762851942769e0a4ba5d23; new feerate 0.00010000 BTC/kvB <= old feerate 0.00010000 BTC/kvB\n[...]')
I/n | network | error: could not broadcast open_channel e249d9535bef20c16b4dc3338a6d313e69b2d606f2762851942769e0a4ba5d23, insufficient fee
Your transaction is trying to replace another one in the mempool but it does not meet the rules to do so. Try to increase the fee.

I don’t see the funding transaction in the history and it clearly hasn’t been broadcasted (this txid isn’t found on any block explorers). The channel now is stuck in REESTABLISHING peer state, I tried to force close it (unsuccessfully, because there’s no funding tx). My balance is unchanged so the only problem is this stuck channel that I can’t remove. lnd has abandonchannel command that I believe does exactly what I want, just remove it no questions asked… but I can’t find anything like that in the Electrum console or GUI.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bitromortaccommented, May 21, 2021

Yes, my mistake, should have done an import from electrum.lnchannel import ChannelState and then take the corresponding enums ChannelState.FORCE_CLOSING as an argument for the set_state method.

0reactions
rkfgcommented, May 20, 2021
>>> c.set_state(6)
Traceback (most recent call last):
  File "/home/rkfg/soft/svn-soft/electrum/electrum/lnchannel.py", line 172, in set_state
    self.logger.debug(f'({self.get_id_for_log()}) Setting channel state: {old_state.name} -> {state.name}')
AttributeError: 'int' object has no attribute 'name'

I can comment this line out but would be good to fix it!

After removing the line I get another error:

>>> c.set_state(6)
Traceback (most recent call last):
  File "/home/rkfg/soft/svn-soft/electrum/electrum/lnchannel.py", line 174, in set_state
    self.storage['state'] = self._state.name
AttributeError: 'int' object has no attribute 'name'

These enums aren’t available from the console it seems and integers aren’t a valid substitute. However, looks like it somehow worked and the channel state changed to REDEEMED, I was able to delete it after that. But this scenario should be fixed, it happened exactly before the recent tx flood.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happens if channel opening transactions get stuck?
What happens if the commitment tx fee is too low? 1 · Lightning bumpfee completes but doesnt create a new transaction. Instead it...
Read more >
channel close pending for over a month : r/lightningnetwork
I'm using LND, I have a close transaction that's been stuck pending for a long time. Can I bump the fee or rebroadcast...
Read more >
Lighning channel stuck on Opening - Bitcoin and Lightning
If for some reason your channel doesn't confirm in two weeks or fees get so high its kicked from the mempool earlier then...
Read more >
Analysis and Probing of Parallel Channels in the Lightning ...
channels.10 Therefore, multi-hop payments may fail due to low balance at an in- ... the on-chain cost of channel openings over multiple target...
Read more >
Lightning Channel | River Financial
Lightning channels are called bidirectional payment channels because both parties can send and receive bitcoin across the channel. In order to open a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found