spesmilo / spesmilo/electrum

Unable to open a new LN channel with a node I'd previously had a channel with

Open
#7,599 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

When using electrum lightning, I tried to open a channel with a node i had previously had a channel with, but i got this error:

E | lnworker.LNWallet.[lnwallet] | Exception in _open_channel_coroutine: Exception("Remote peer reported error [DO NOT TRUST THIS MESSAGE]: b'Parsing funding_created'")
Traceback (most recent call last):
  File "/home/username/coding/electrum/git-electrum/electrum/util.py", line 1161, in wrapper
    return await func(*args, **kwargs)
  File "/home/username/coding/electrum/git-electrum/electrum/lnworker.py", line 1007, in _open_channel_coroutine
    chan, funding_tx = await asyncio.wait_for(coro, LN_P2P_NETWORK_TIMEOUT)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/username/coding/electrum/git-electrum/electrum/util.py", line 1161, in wrapper
    return await func(*args, **kwargs)
  File "/home/username/coding/electrum/git-electrum/electrum/lnpeer.py", line 582, in wrapper
    return await func(self, *args, **kwargs)
  File "/home/username/coding/electrum/git-electrum/electrum/lnpeer.py", line 746, in channel_establishment_flow
    payload = await self.wait_for_message('funding_signed', channel_id)
  File "/home/username/coding/electrum/git-electrum/electrum/lnpeer.py", line 241, in wait_for_message
    raise Exception('Remote peer reported error [DO NOT TRUST THIS MESSAGE]: ' + repr(payload.get('error')))
Exception: Remote peer reported error [DO NOT TRUST THIS MESSAGE]: b'Parsing funding_created'

I was at commit 7354feeffecc34bc9f15838662f9211dd686d04f

Opening a channel with a brand new node worked though.

The other node was running c-lightning 0.10.2.

There were about 106 confirmations between the previous channel close transaction and my attempt to open a new channel.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with electrum/lnworker.py at _open_channel_coroutine and follow the channel-establishment path in electrum/lnpeer.py, especially channel_establishment_flow and wait_for_message. Reproduce the attempt to reopen a channel after closure against c-lightning 0.10.2, then determine why funding_created parsing fails and verify that reopening the channel succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.