Skip to content

Conversation

GeorgeTsagk
Copy link
Member

Description

Adds support for v1 proofs for all channel related transactions (funding/commitments/closing/sweeping).

Currently in draft, will add more info once finalized.

2 outstanding bugs:

  • Tapscript root between LND / tapd psbt finalization is different -> leads to funding error
  • Channel closing balances are different between wire txn and reported balance -> possibly noop is the root cause

We change the commitment related generations to now include stxo proofs
if the setting allows so. Previously we would always exclude stxo
proofs, but now we add them if both parties understand & expect them.
This commit updates the aux funding controller to conditionally use stxo
proofs, depending on whether the feature bit was negotiated or not with
the remote peer. Our funding commitment will now include the alt leaves
for stxos if the flag is set.

The funder needs to construct the correct tapscript early on, as LND
will query the tapscript root before we reach the finalization phase.
That's why we manually calculate and merge the stxo alt leaves in the
funding process.

The fundee now also needs to calculate and merge the alt leaves that
result from the asset outputs, in order to arrive to the same tapscript
root.
We also add stxo support for the aux leaf creation. This is crucial and
needs to be the same across both channel parties. We rely on the
consistency of the feature bit for whether we'll include the stxo alt
leaves or not. A disagreement here could lead to a force close.
For the cooperative channel closing we also need to check if the parties
have agreed upon the usage of stxo proofs. If that is the case, we'll
include those commitments in the coop channel closing transaction &
proof.
@GeorgeTsagk GeorgeTsagk self-assigned this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant