dual_open_control: check dualopend liveness before validating PSBT signatures - #8979
dual_open_control: check dualopend liveness before validating PSBT signatures#8979vincenzopalazzo wants to merge 3 commits into
Conversation
0575e36 to
3a2f1a3
Compare
|
@vincenzopalazzo can you rebase please? Hoping @niftynei can review by the end of this week to add into 26.06 Release Candidate planned for 11 May |
…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.
The +WIRE_COMMITMENT_SIGNED dev-disconnect kills dualopend mid-flow, causing the fundchannel RPC to fail with "dualopend died". Wrap the call in try/except so the test correctly exercises the sign-hook liveness check without failing on the expected RPC error. Also remove the l1.restart() call which is not needed: the regression check (no spurious 'Plugin must return a psbt with signatures' BROKEN on l2) is enforced automatically by the test teardown via broken_log. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a91884c to
3fd8e80
Compare
|
There's a few things here. The linked issue (#8902) shows two BROKEN messages. The first BROKEN messages is the result of a race condition between the The other BROKEN message is due to the fact that Given the root cause of the two BROKEN messages, the following notes are incorrect.
Were these correct, the proposed fixes would be sound but as is this set of commits doesn't solve the the issues as described in #8902. |
|
Oh i do not remember what this is anymore, thanks to pick this up lisa! |
Summary
openchannel2_signhook, the disconnect notification races with the hook in the funder plugin, causing it to clean up state and return the PSBT unsignedtest_inflight_dbloadregression test that triggers the race conditionFixes #8902
Changelog-None
Test plan
test_inflight_dbloadtriggers the disconnect race and verifies no spurious BROKEN from the signature check (only the expected daemon-death BROKEN)