E72C [epic]: Dynamic Commitment Roadmap · Issue #9987 · lightningnetwork/lnd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[epic]: Dynamic Commitment Roadmap #9987
Open
@yyforyongyu

Description

@yyforyongyu

This is the master tracking issue for implementing dynamic commitments. Based on my current understanding after playing it out a bit, this project is split into four stages so it's easier to track the progress.

Stage One - Preparation

We will clean up existing PRs and create new PRs to prepare for the upcoming dynamic commitment work. These PRs can be merged directly into the master branch as they won't affect existing functionality.

Stage Two - Finalizing Specs

We will address all comments in this PR lightning/bolts#1117, finalize the TODOs in that draft, and create a new draft with some potential improvements based on my experiment.

Stage Three - Channel Params Upgrade

We will begin the implementation in this stage, with the focus on upgrading channel params first.

  • create a design doc for the internal dynamic commitment flow.
  • create a design doc for the RPC, focusing on how this endpoint is intended to be used.
  • minor refactor on channeldb/channel.go, mostly just moving code into a new file.
  • minor refactor on rpcserver.go, again just moving code for clarity.
  • enable updating channel config in OpenChannel - will need to persist commitHeight:oldConfig on disk.
  • build dynamic commitment upgrader based on the design doc.
  • mount the upgrader to the channel link.
  • update the revocation flow to locate the old config.
  • gossip channel_update - need to double check whether the channel is disabled when entering quiescence.
  • update watchtower?
  • build the RPC.
  • build itest cases.

Stage Four - Commitment Type Upgrade

This will be the most involved part; however, implementing channel params upgrade first should give us a skeleton to work with at this stage. It also depends on the final spec - if we assume the simplified version works, the changes are,

  • minor refactor in lnwallet/reservation.go - need to extract the logic used to convert lnwire.ChannelType and channeldb.ChannelType.
  • minor refactor in lnwallet/channel.go - separate funding type and commitment type.
  • extend existing dynamic commitment flow to enable commitment type upgrade.
  • extend the RPC.
  • build itest cases.

This is a rough estimate - its final scope depends on the outcome from stage two.

Open Questions

Metadata

Metadata

Assignees

Labels

dynamic commitmentsepicIssues created to track large feature developmentfeature requestRequests for new featureshtlcswitchsize/megalarge, significant context needed, over 1000 lines

Type

No type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0