Skip to content

contractcourt+htlcswitch+lnwallet: dynamic commitments #7477

Open
@Crypt-iQ

Description

@Crypt-iQ

Tracking issue for implementing dynamic commitment upgrades as outlined here: Crypt-iQ/bolts@d1a608e

Things that lnd needs:

  • lnwire types for the new message types dyn_begin_propose, dyn_propose, dyn_propose_reply, and kickoff_sig
  • a state machine similar to the lnwallet/chancloser that handles dynamic commitments by:
    • sending over new taproot funding keys and new csv values via dyn_propose
    • constructing and broadcasting the intermediate kickoff transaction
    • storing data (e.g. propose_height, channel_type, taproot_funding_key, kickoff_feerate) so that a disconnect during negotiation is recoverable
    • validate the received kickoff_sig
  • the htlcswitch.ChannelLink needs to be able to:
    • wind down and stop sending / forwarding HTLCs after LND sends dyn_begin_propose
    • validate the commitment_signed and revoke_and_ack messages during the signing phase
    • recover on reconnect via channel_reestablish. This may require some context from the dynamic commitments state machine.
  • the contractcourt package needs to:
    • watch for spends from the legacy commitment transaction
    • watch for confirmation of the kickoff transaction
    • watch spends from the kickoff transaction
    • handle anchors fee-bumping of the kickoff transaction

Depends on #6691

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions