Ignore stale splice signing fuzz events
What changed, and why it matters
This commit changes a fuzz test (a randomized testing harness) so it no longer crashes when a simulated splice-funding signing event becomes stale. The change only affects test code, not the production Lightning library, and it ignores an expected error rather than fixing a runtime security bug.
No production action required; ensure fuzz coverage still exercises both successful and aborted splice paths, and consider whether the production API error semantics for stale funding signatures are well documented.
Security signals we found
Error-handling change in fuzz target
Reference to tx_abort invalidating queued signing events
No production code modified
Evidence from the diff
In fuzz/src/chanmon_consistency.rs, the harness previously panicked if funding_transaction_signed returned any error. After adding support for canceling splice funding attempts, a queued signing event may arrive after a tx_abort has already invalidated the splice. The patch catches APIMisuseError containing “not expecting funding signatures” and treats it as benign, while still panicking on any other error. This is a test-harness robustness fix, not a change to consensus or protocol handling.
Changed components
fuzz/src/chanmon_consistency.rsInspect captured patch +14 / −3
diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs
index a0aa7bb..da622ea 100644
--- a/fuzz/src/chanmon_consistency.rs
+++ b/fuzz/src/chanmon_consistency.rs
@@ -2814,9 +2814,20 @@ impl<'a, Out: Output + MaybeSend + MaybeSync> Harness<'a, Out> {
..
} => {
let signed_tx = nodes[node_idx].wallet.sign_tx(unsigned_transaction).unwrap();
- nodes[node_idx]
- .funding_transaction_signed(&channel_id, &counterparty_node_id, signed_tx)
- .unwrap();
+ match nodes[node_idx].funding_transaction_signed(
+ &channel_id,
+ &counterparty_node_id,
+ signed_tx,
+ ) {
+ Ok(()) => {},
+ Err(APIError::APIMisuseError { ref err })
+ if err.contains("not expecting funding signatures") =>
+ {
+ // A queued signing event can be invalidated by a later `tx_abort`
+ // before the application handles it.
+ },
+ Err(e) => panic!("{e:?}"),
+ }
},
events::Event::SpliceNegotiated { new_funding_txo, .. } => {
let mut txs = nodes[node_idx].broadcaster.txn_broadcasted.borrow_mut();
Why this scored 16/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.