Skip to content

Add ChannelConfirmed Event #1394

Closed
@TheBlueMatt

Description

@TheBlueMatt
Collaborator

... (and maybe a ChannelOpened/Accepted event)?

Activity

added this to the 0.1.1 milestone on Mar 29, 2022
godsmith99x

godsmith99x commented on Mar 31, 2022

@godsmith99x

I would like to help with this issue. Should this event be triggered when a node calls ChannelManager::accept_inbound_channel, when both sides of the channel have locked funding?

godsmith99x

godsmith99x commented on Mar 31, 2022

@godsmith99x

Should the event look something like: ChannelOpened {
channel_id: [u8; 32],
user_channel_id: u64,
counterparty_node_id: PublicKey,
channel_type: ChannelTypeFeatures,
},

TheBlueMatt

TheBlueMatt commented on Apr 1, 2022

@TheBlueMatt
CollaboratorAuthor

For ChannelConfirmed we should do it on funding-locked. For ChannelOpened (if we want one) we'd want to do it when the AcceptChannel message is either received or sent. The above schema looks good to me for the first, for the second we won't have a user id for inbounds, and the channel id will be the temporary_channel_id instead.

wvanlint

wvanlint commented on Jul 8, 2022

@wvanlint
Contributor

I have been taking a look at implementing ChannelConfirmed. From my understanding, the event should be emitted for incoming and outgoing channels when channel_ready messages have been both sent and received and the channel becomes usable. However, since it is possible to receive multiple channel_ready messages with different alias values, it's probably desirable to only emit the event when the channel state changes from non-usable to usable. To achieve that, it might be helpful to refactor the result of Channel::channel_ready but can be done without such a change as well. Does that sound correct?

wpaulino

wpaulino commented on Jul 8, 2022

@wpaulino
Contributor

@wvanlint sounds good to me. We may want to reconsider the event name ChannelConfirmed now that we have support for 0-conf channels and their channel_ready messages are exchanged while the funding transaction remains unconfirmed.

tnull

tnull commented on Sep 8, 2022

@tnull
Contributor

@wvanlint Do you still intend to pick this up? Asking since it would be nice to expose the ChannelConfirmed event downstream in LdkLite.

godsmith99x

godsmith99x commented on Sep 8, 2022

@godsmith99x
tnull

tnull commented on Sep 8, 2022

@tnull
Contributor

No, I got a new job a couple of months back and I don’t have the bandwidth. Sent from Proton Mail for iOS

Alright, no problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @tnull@TheBlueMatt@wvanlint@wpaulino@godsmith99x

      Issue actions

        Add `ChannelConfirmed` Event · Issue #1394 · lightningdevkit/rust-lightning