Skip to content
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

[6/?] - lnwallet+chancloser: update channel state machine and co-op close for musig2 flow #7345

Commits on Jul 21, 2023

  1. lnwallet: export MusigCommitType enum

    We need to export the enum as it'll now be used in areas such as the
    chan closer.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3a94232 View commit details
    Browse the repository at this point in the history
  2. lnwallet+htlcswitch: add NewCommitState struct, modify send/recv sig …

    …to accept
    
    In this commit, we add a new NewCommitState struct. This preps us for
    the future change wherein a partial signature is also added to the mix.
    All related tests and type signatures have also been updated
    accordingly.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    9715ed6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f60c547 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e97f0c6 View commit details
    Browse the repository at this point in the history
  5. lnwallet: update channel state machine to add musig session initializ…

    …ation
    
    In this commit, we update the channel state machine with a new set of
    functional options that can be used to create/set the musig session
    state. When a channel is made during the funding process, the set of
    nonces we want to use is already known, so we allow them to be passed
    in. Similarly, once the channel is confirmed, then we'll need to create
    another channel instance that this times carries the newly generated
    nonces to send along side funding_locked.
    
    We also add some utility methods to permit callers to properly generate
    nonces in the various contexts.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    d6dbe7d View commit details
    Browse the repository at this point in the history
  6. lnwallet: update to genRemoteHtlcSigJobs to generate taproot jobs

    In this commit, we update the genRemoteHtlcSigJobs function to be able
    to generate taproot jobs. We also modify the sigpool to now use a
    input.Signature everywhere. This'll allow us to pass around both ECDSA
    and Schnorr signatures via the same interface.
    
    We use a tapscript sighash in this case, as all the HTLC spends will
    actually be script path spends.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    de6e478 View commit details
    Browse the repository at this point in the history
  7. lnwallet: update genHtlcSigValidationJobs to be taproot aware

    In this commit, we update the genHtlcSigValidationJobs function to be
    taproot aware. As we actually need a schnorr signature for the taproot
    validation, we need to coerce the entire wire type into a schnorr sig
    with the ForceSchnorr() method.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e2cc9d5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b0cda76 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9d427cd View commit details
    Browse the repository at this point in the history
  10. lnwallet: update internal co-op close flow to support musig2 keyspend

    In this commit, we update the co-op close flow to support the new musig2
    keyspend flow. We'll use some new functional options to allow a caller
    to pass in an active musig2 session. If this is present, then we'll use
    that to complete the musig2 flow by signing with a partial signature,
    and then ultimately combining the signatures at the end.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    c763481 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1790723 View commit details
    Browse the repository at this point in the history
  12. lnwallet: fix bug in deriveMusig2Shachain

    In this commit, we fix a bug in the `deriveMusig2Shachain` function
    where it didn't actually use the passed in revocation root as part of
    the hmac invocation.
    
    We also modify the function to be more generally useable as well, as now
    the caller can just pass in the revocation root things should be derived
    from.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    2035e38 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e017fc6 View commit details
    Browse the repository at this point in the history
  14. channeldb: update ChanSyncMsg to populate nonce info

    In this commit, we update the ChanSyncMsg to populate nonce information.
    With this change, we can now hide nonce generation further down in the
    pipeline and ensure that all callers will have the expected fields
    populated.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    ad6bebc View commit details
    Browse the repository at this point in the history
  15. lnwallet: move nonce generation into generateRevocation

    Before this commit, we would conditionally generate nonces in
    RevokeCurrentCommitment. We move this to generateRevocation as this is
    called when doing channel sync, and we want to make sure we send the
    correct set of nonces.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    40d22d7 View commit details
    Browse the repository at this point in the history
  16. lnwallet: handle nonce init in ProcessChanSyncMsg

    In this commit, we update the logic to handle nonce init in
    ProcessChanSyncMsg. Once a channel is already open, this is where we'll
    get the new nonce data from the remote party we'll use to gain the nonce
    we need to sign for their next state.
    Roasbeef committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    2279ef2 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5c09d61 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2023

  1. multi: fix linter warnings

    Roasbeef committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    7764f65 View commit details
    Browse the repository at this point in the history