lightninglabs / lightninglabs/pool

sidecar channels: don't try to clean up previous batch state if in provider mode

Open
#327 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
259
Forks
51
PR merge metrics
No merged PRs in 30d

Description

If a node is providing sidecar channels, it won't be involved in the actual channel opening process.
So in case of a batch rollback (new `PrepareMsg` without a finalize of the previous batch), there is nothing to clean up.
In fact, the cleanup attempt creates log entries with errors:

```
2021-12-14 18:15:28.432 [INF] RPCS: Received PrepareMsg for batch=020xxxx, num_orders=1
2021-12-14 18:15:28.439 [WRN] FNDG: Unable to unregister funding shim (pendingChanID=2dxxxx) for order=8ff7xxx
2021-12-14 18:15:28.444 [DBG] FNDG: Cleaning up incomplete/replaced pending channel in lnd was unsuccessful for order=8ff7xxxx (channel_point=d3c5faxxxx:0), assuming timeout when funding: rpc error: code = Unknown desc = unable to find closed channel summary
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Trace the batch rollback handling around PrepareMsg and the provider-mode sidecar channel path, focusing on why funding-shim cleanup is attempted after a new PrepareMsg. Reproduce a rollback in provider mode and verify that no cleanup-error log is emitted when the node was not involved in channel opening.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.