L2-Technology / sensei

A lightning node implementation for everyone
https://l2.technology/sensei
Other
199 stars 39 forks source link

Upon "child node" creation, return enough information to connect to the node #70

Closed litch closed 2 years ago

litch commented 2 years ago

Currently, when you create a child node, the response object is:

https://github.com/L2-Technology/sensei/blob/main/proto/sensei.proto#L115

pubkey and macaroon. Both of which are awesome things to have.

However, to actually connect to the node, we need the rest of the connection string. Currently this is only available in the ListNode object (https://github.com/L2-Technology/sensei/blob/main/proto/sensei.proto#L40), which is retrievable by paging through the ListNodes request/responses.

It would be wonderful if we could surface the full node info both in the CreateNodeResponse and the Info/GetInfo for a given node.

https://github.com/L2-Technology/sensei/blob/main/proto/sensei.proto#L331

johncantrell97 commented 2 years ago

yeah, agreed -- seems like at a minimum listen_port should be returned. in theory you should know or have set the listen_addr but can't hurt to add that in there just in case.

I guess as you suggest, maybe just returning the ListNode response for create/start endpoints is simplest way forward. That way it's consistent regardless of the request.

orbitalturtle commented 2 years ago

I'm looking into this, just fyi

johncantrell97 commented 2 years ago

ha, was literally sitting down to add this now but I'll hold off if you think you'll have a pr ready in a bit?

orbitalturtle commented 2 years ago

@johncantrell97 Ha, ooops funny timing. Yup I should be able to get this in pretty quick