-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Lnd: Listen for RPC calls on a bufconn #5777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lnd: Listen for RPC calls on a bufconn #5777
Conversation
427cdbf
to
2c72f9a
Compare
2c72f9a
to
b77f6b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes, code looks almost ready now!
Just a few more nits and questions.
1e30c8d
to
5e826de
Compare
5e826de
to
70bed62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turned out great 💯
Just one more comment, then we're good to go IMO.
70bed62
to
e54b7a3
Compare
@guggero Terrific, made those changes |
Needs a rebase! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✨
Just a few style nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending @Roasbeef's nits.
e54b7a3
to
d3ab556
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍚
This PR adds a couple of pieces that can help us run Terminal in stateless mode, described here: lightninglabs/lightning-terminal#160 (comment).
In short, the first commit adds a field to ListenerCfg for passing in a bufconn to LND, which can be used to listen in-memory RPC calls. It also allows us to pass the admin macaroon back to the program calling LND via a channel.
The second commit adds a GetAllPermissions function that can be used by Terminal to retrieve all the permissions required by LND to bake a "super macaroon" that can be used to interact with lnd as well as Terminal's sub daemons.
(I will also submit a PR to Terminal soon which will show how this all ties together.)