-
Notifications
You must be signed in to change notification settings - Fork 45
Stateless remote mode: Adds passing in macaroon and tls data, and a CheckMacaroonPermissions RPC #51
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
Stateless remote mode: Adds passing in macaroon and tls data, and a CheckMacaroonPermissions RPC #51
Conversation
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.
Thank you very much for the PR (and the one in lnd
)!
I did a first quick pass and it looks really good. Going to look at the lnd
PR next.
Just one main thing that needs to be changed:
Since this PR requires functionality that isn't yet even merged to lnd
, we won't be able to merge it for a while. It'll be merged to a branch lnd-14-0
once we start working on that. For now, can you please open this against the lnd-13-0
branch? That way you also get a new type for the MacaroonPermission
. You can edit the base of your PR by clicking the edit button of the title. A new drop down then appears where you can switch from master
to lnd-13-0
.
Thanks for the initial review @guggero! Will get to these changes soon |
86b49c3
to
00860e1
Compare
I made those changes @guggero :) |
00860e1
to
93d7f21
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 rebase! Just a few more minor things, this PR is getting very close.
Thanks @guggero! Made those changes |
93d7f21
to
318f93f
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 PR!
Great addition, and nice to have some test coverage :)
318f93f
to
446bb30
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.
Looking good!
Once the lnd version here is updated and the dependent loop PR points to this I'll test some of these options out.
4edbd3c
to
5d56d7b
Compare
Made those changes @carlaKC ! FYI I also made a few small additional changes, since we're moving in a new direction for integrated mode in the Terminal (described here lightninglabs/lightning-terminal#160 (comment)). In short, needed to allow the option for passing in no tls creds, so I added another boolean parameter in GetTLSCredentials to enable that option. |
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.
Almost there, just a few more minor things. Great work pushing forward on this quite respectable chain of dependent PRs 👏
6c31895
to
00cb063
Compare
00cb063
to
65fb831
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.
Looking good! Just need to bump deps to master to get around that kvdb
issue.
I think we can bump lightninglabs/loop/pull/406 to depend on this version of lndclient just to test out everything works as expected then merge.
8397233
to
b06054f
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 🎉
The linter is complaining:
Probably needs a |
b06054f
to
bd95f28
Compare
@@ -70,54 +72,28 @@ func NewBasicClient(lndHost, tlsPath, macDir, network string, | |||
// NewBasicConn creates a new basic gRPC connection to lnd. We call this | |||
// connection "basic" as it falls back to expected defaults if the arguments | |||
// aren't provided. | |||
func NewBasicConn(lndHost, tlsPath, macDir, network string, | |||
func NewBasicConn(lndHost string, tlsPath, macDir, tlsData, macData, | |||
network string, insecure, systemCert bool, |
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.
Drive by comment, but rather than breaking the interface here, this should've just used a BasicClientOption
as that's how the API is intended to evolve.
IMO we should likely follow this path, as otherwise updating will break every user of NewBasicConn
as is.
For Terminal's stateless-remote mode, as described in lightninglabs/lightning-terminal#160, we add a few changes in this PR:
Relies on:
lightningnetwork/lnd#5304