rpc+lnrpc: add new SubcribeChannel RPC for async notifications of channel state changes
We currently have streaming RPC's to be notified of changes to our network view, on-chain balances, off-chain balances, and a few others. However, we don't yet have a streaming RPC that's dedicated to notifying callers of changes w.r.t the state of our set of channels. Potential state transitions that we'd want to notify on include: new open channels, new closed channels, channels becoming active/inactive, channel force close events, partial contract sweep events. Implementing a set of rich responses for the SubscribeChannel streaming RPC would allow GUIs to be more reactive as they'll no longer have to poll to obtain the latest channel state.
Steps To Completion:
-
[ ] Identify all areas in the codebase that can trigger changes to the set of open/active channels. Starting locations include: the
fundingManager, thecontractcourtpackage, thechanCloser(within the peer), and thechannelLink. -
[ ] Once these areas are identified, either introduce a new set of message between these sub-systems, or intercept the messages that are usually delivered via callbacks/closures, and then pipe these through to the new sub-system to dispatch notifications to subscribed callers.
I would like to try this.
Interested in taking this one, @jrmillerwork LMK if you take issue with that!
@valentinewallace : sorry i left this hanging, please proceed.
@valentinewallace Hi, is this issue available? :)
@tsarpaul go for it :)
@tsarpaul hey paul, looks like i'm reclaiming this issue because it's high prio for Lightning App. are you far on it?
Hi, I'm on it
Hi Paul, we didn't get a reply back, so we've already started to design a solution and are rather far along. Typically if there isn't a PR (even a WIP) one within a few days, then we assume it's still up for grabs. See the "share early, share often" section within our contribution guidelines.
On Fri, Sep 21, 2018, 2:54 PM Paul Litvak [email protected] wrote:
Hi, I'm on it
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lightningnetwork/lnd/issues/1235#issuecomment-423681448, or mute the thread https://github.com/notifications/unsubscribe-auth/AA87LqRhBhmFjE8900Bo8TT2Q48nZlKsks5udWAygaJpZM4T6zAg .
Hi Paul, we didn't get a reply back, so we've already started to design a solution and are rather far along. Typically if there isn't a PR (even a WIP) one within a few days, then we assume it's still up for grabs. See the "share early, share often" section within our contribution guidelines. … On Fri, Sep 21, 2018, 2:54 PM Paul Litvak @.***> wrote: Hi, I'm on it — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1235 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA87LqRhBhmFjE8900Bo8TT2Q48nZlKsks5udWAygaJpZM4T6zAg .
I see, I wanted to take it slow seeing how inactive this issue was in the past. I'll make sure to share early next time. Thanks for the update :)