Skip to content

Unverified dual funding tx signatures - #9575

Open
Lagrang3 wants to merge 1 commit into
ElementsProject:masterfrom
Lagrang3:fix-unverified-dual-funding-tx-signatures
Open

Lagrang3 wants to merge 1 commit into
ElementsProject:masterfrom
Lagrang3:fix-unverified-dual-funding-tx-signatures

Conversation

@Lagrang3

Copy link
Copy Markdown
Collaborator

Adding minimal verification of tx_signatures to get closer to the
specification on dual funded channels.
We check that the witnesses are not empty and do a minimal standardness
policy check. Still missing a SIGHASH_ALL byte verification.

@Lagrang3
Lagrang3 force-pushed the fix-unverified-dual-funding-tx-signatures branch from 2341c8f to ab73b9e Compare September 25, 2026 11:12

@nGoline nGoline left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The direction looks right, and the new checks do not reject the common honest witnesses (P2WPKH, P2TR key path, P2WSH multisig). A few inline things before merge.

Also, on channeld/channeld.c:2959: splice tx_signatures do not get these checks. A follow-up is fine, but a FIXME or a note in the PR description would help keep the two paths in sync.

Comment thread openingd/dualopend.c Resolved
Comment thread openingd/dualopend.c Resolved
Comment thread openingd/dualopend.c Resolved
Comment thread openingd/dualopend.c Resolved
@Lagrang3
Lagrang3 force-pushed the fix-unverified-dual-funding-tx-signatures branch from ab73b9e to 8052eeb Compare October 30, 2026 10:15
Adding minimal verification of tx_signatures to get closer to the
specification on dual funded channels and splice.  We check that the
witnesses are not empty and do a minimal standardness policy check. The
sighash flag must be set to SIGHASH_ALL.

Changelog-Fixed: dualopen and splicing: added tx_signatures verification according to BOLT-2

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3
Lagrang3 force-pushed the fix-unverified-dual-funding-tx-signatures branch from 8052eeb to 0ae3407 Compare October 30, 2026 10:20
@Lagrang3

Copy link
Copy Markdown
Collaborator Author

Also, on channeld/channeld.c:2959: splice tx_signatures do not get these checks. A follow-up is fine, but a FIXME or a note in the PR description would help keep the two paths in sync.

I have used the same helpers for splice as well.

@Lagrang3
Lagrang3 requested a review from nGoline October 30, 2026 10:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants