-
Notifications
You must be signed in to change notification settings - Fork 122
loop: versioned MuSig2 HTLCs #546
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
9965619 to
1c42214
Compare
guggero
left a comment
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.
Changes so far look good to me. So there isn't going to be a new swap version that can be used to decide between MuSig2 0.4 and 1.0? Or is this just not implemented yet since it's a draft?
| QuoteHtlcP2TR, _ = NewHtlcV3( | ||
| ^int32(0), dummyPubKey, dummyPubKey, dummyPubKey, dummyPubKey, | ||
| quoteHash, &chaincfg.MainNetParams, | ||
| input.MuSig2Version100RC2, ^int32(0), dummyPubKey, dummyPubKey, |
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 uses 1.0 while the other changes in the PR use 0.4. Is that on purpose?
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.
Yeah this PR is just making it possible to pass in the version if needed. We just need this specific dummy htlc for fee estimation so the version can be anything here.
Protocol version HTLC_V3 did include experimental MuSig2 support for loop out and we'll keep those users on 0.4 (see other PRs). For new clients we'll require everyone to use 1.0. |
959a170 to
6884bd0
Compare
6884bd0 to
37fa043
Compare
37fa043 to
7380b31
Compare
This commit bumps LND and lndclient to make it possible to upgrade taproot HTLC construction with a MuSig2 version. This is required to support both old (MuSig2 0.4) and new (MuSig2 1.0) clients.
This commit adds the MuSig2 version as an input parameter when creating Taproot htlcs. This will allow us to create both old and new MuSig2 Taproot HTLCs correctly.
7380b31 to
01970ad
Compare
|
@bhandras, remember to re-request review from reviewers when ready |
sputn1ck
left a comment
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!
| AppMajor: 0, | ||
| AppMinor: 15, | ||
| AppPatch: 4, | ||
| AppPatch: 99, |
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.
That will be changed to 0.16 right?
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.
Yes, once out but for now we need this to make sure that if someone runs HEAD of loop will also run with HEAD of LND.
GeorgeTsagk
left a comment
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 ➿
| "github.com/lightninglabs/loop/swap" | ||
| "github.com/lightningnetwork/lnd/chainntnfs" | ||
| "github.com/lightningnetwork/lnd/channeldb" | ||
| invpkg "github.com/lightningnetwork/lnd/invoices" |
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.
was there a conflict with invoices?
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.
It's just a convention that we seemed to have picked up in the LND codebase so I was just meant to conform to that.
This pull requests includes a draft version of changes required to make Taproot HTLCs optionally MuSig2 1.0 compatible.
Depends on:
- lightningnetwork/lnd#7171- lightninglabs/lndclient#141Pull Request Checklist
release_notes.mdif your PR contains major features, breaking changes or bugfixes