-
Notifications
You must be signed in to change notification settings - Fork 132
[custom channels 2/3]: add aux leaf signer #885
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
Conversation
5dfe9be
to
e34ecf6
Compare
33067d0
to
d7b3b87
Compare
e34ecf6
to
496a48b
Compare
d7b3b87
to
f7b587a
Compare
b8243ff
to
dd47bfd
Compare
6245b6f
to
877f08a
Compare
dd47bfd
to
c7135e7
Compare
c7135e7
to
bbcd2fb
Compare
0e33120
to
80b004a
Compare
bbcd2fb
to
f49be36
Compare
80b004a
to
eb7bb32
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.
Some simple CI lint errors, otherwise 👍
|
||
// SigHashType is the sigHash type that was used to create the | ||
// signature. | ||
SigHashType tlv.RecordT[tlv.TlvType2, uint32] |
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.
Use txscript.SigHashType
here instead of uint32
?
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.
This would lead to panic: unknown primitive type: *txscript.SigHashType [recovered]
. We either need to have types that have a Record()
method or are from a list of defined primitive types (no type aliases allowed).
eb7bb32
to
e47bd52
Compare
f49be36
to
a558ec0
Compare
e47bd52
to
2fc91ba
Compare
a558ec0
to
953f49c
Compare
516c4d4
to
370a717
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 🥬
@@ -423,6 +429,7 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger, | |||
UniverseQueriesBurst: cfg.Universe.UniverseQueriesBurst, | |||
RfqManager: rfqManager, | |||
AuxLeafCreator: auxLeafCreator, | |||
AuxLeafSigner: auxLeafSigner, |
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.
nit: why not follow lnd codebase and use a "maybe" fn.Option[AuxLeafSigner]
?
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.
We're always creating and starting these components. Since they're pretty light-weight, it IMO doesn't make sense to only conditionally create and start them for the custom channel specific use case, as that would mean we'd need to deal with more .WhenSome()
and .IsSome()
constructs.
But maybe something to consider in this regard is to only start the HTLC and invoice acceptors if they're really needed, since both of them can only be registered once in lnd
. So if we always occupy that single "slot" with tapd
even if you don't use custom channels, that could create issues for some users. I'll look into that in the invoice PR.
This test is helpful for inspecting/debugging a vPSBT packet from a unit or integration test.
370a717
to
feea448
Compare
Depends on #878.
Implements a first version of the aux leaf signer.
Link to all PRs in the saga: