Skip to content

dual_open_control: check dualopend liveness before validating PSBT signatures#8979

Open
vincenzopalazzo wants to merge 2 commits intoElementsProject:masterfrom
vincenzopalazzo:claude/laughing-leavitt
Open

dual_open_control: check dualopend liveness before validating PSBT signatures#8979
vincenzopalazzo wants to merge 2 commits intoElementsProject:masterfrom
vincenzopalazzo:claude/laughing-leavitt

Conversation

@vincenzopalazzo
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo commented Mar 25, 2026

Summary

  • When the peer disconnects during the openchannel2_sign hook, the disconnect notification races with the hook in the funder plugin, causing it to clean up state and return the PSBT unsigned
  • The signature validation check then fires first, logging a spurious BROKEN message before discovering that dualopend had already died
  • Move the dualopend liveness check before PSBT validation -- if the daemon is gone there is no point checking signatures since we cannot send them anyway
  • Add test_inflight_dbload regression test that triggers the race condition

Fixes #8902
Changelog-None

Test plan

  • CI passes
  • test_inflight_dbload triggers the disconnect race and verifies no spurious BROKEN from the signature check (only the expected daemon-death BROKEN)

…gnatures

When the peer disconnects during the openchannel2_sign hook, the
disconnect notification can race with the hook in plugins (e.g. funder),
causing them to clean up state and return the PSBT unsigned.  Previously
the signature check ran first, logging a spurious BROKEN message before
discovering that dualopend had already died.

Move the dualopend liveness check before the PSBT validation: if the
daemon is gone there is no point checking signatures since we cannot
send them anyway.

Fixes: ElementsProject#8902
…ect BROKEN

Add test_inflight_dbload which triggers a disconnect at
+WIRE_COMMITMENT_SIGNED during a dual-funded lease open.  Before the
fix in the previous commit, the disconnect notification race would
cause a spurious 'Plugin must return a psbt with signatures' BROKEN
log.  Now only the expected 'dualopend daemon died' BROKEN appears.
@vincenzopalazzo vincenzopalazzo force-pushed the claude/laughing-leavitt branch from 0575e36 to 3a2f1a3 Compare March 25, 2026 13:51
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.

BROKEN message when dual-funding flow is interrupted

1 participant