Channel reestablish: wait for/send error message when behind
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
Upon channel reestablishment, if a peer is behind the state it should be, the other peer force closes on the late peer.
There are discussions about the order of events and error messages:
https://github.com/lightning/bolts/pull/942
https://github.com/lightning/bolts/pull/932
If I understand correctly, the late peer should first send an error message and only then, the ahead peer closes. We neither send error messages nor wait on receiving them:
https://github.com/spesmilo/electrum/blob/bdbd59300fbd35b01605e66145458e5f396108e8/electrum/lnpeer.py#L1059
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the channel-reestablishment handling in electrum/lnpeer.py around line 1059. Read the linked Lightning specification discussions and BOLTS pull requests 942 and 932 to confirm the required event order and error messages. Done means the late peer sends the error and the ahead peer waits for it before force-closing.
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