Repository navigation
Description
PastaClaw flagged this while reviewing #8211, where it was deferred to a follow-up instead of being fixed in that pull request. This issue tracks the follow-up.
No committed test forces a lock to be processed before the conflicting block’s notification (suggestion)
Impact: CI can pass even if the InstantSend worker again leaves a conflicting block active when it processes the lock before BlockConnected.
Where: src/instantsend/net_instantsend.cpp:408-416 at 0066d066f7be:
dash/src/instantsend/net_instantsend.cpp
Lines 408 to 416 in 0066d06
| // A check deferred when this lock was processed before (without its transaction) is superseded by this one | |
| std::erase_if(m_deferred_conflict_checks, | |
| [&](const DeferredConflictCheck& check) { return check.islock_hash == hash; }); | |
| // Read the tip only now that the lock is stored: ConnectBlock rejects later conflicting blocks. A dropped | |
| // lock is not deferred, so its resubmissions can't grow the deferred checks past the pending queue's bound. | |
| if (const auto* tip = WITH_LOCK(::cs_main, return m_chainman.ActiveTip()); stored && tip != m_notified_tip) { | |
| m_deferred_conflict_checks.push_back({tip, hash}); | |
| } else { | |
| ResolveBlockConflicts(hash, *islock); |
The rebase dropped the regression test that held the validation queue while the worker processed the lock.
feature_llmq_is_cl_conflicts.pysubmits the block, synchronizes the nodes, and then relays the lock; it checks for disconnection but does not force the notification to arrive late. The project requires automated coverage for consensus changes, and this path changes which block remains active. Restore the test through the public worker path:TestChain100Setupcan select the non-rotating test quorum with-llmqtestinstantsenddip0024=llmq_test_instantsend. Hold the callback withCallFunctionInValidationInterfaceQueue, wait for the worker to finish processing the lock before releasing it, and assert that the conflicting tip disconnects. Exercise reprocessing in the worker’s actual order, which handles the pending locks before draining deferred checks._Raised as blocking. An independent pass did not find a failure someone would actually hit, so it does not block: The range-diff confirms that the queue-holding regression test was dropped. The existing functional test drains the validation queue through sync_all() before relaying the lock, so it verifies disconnection but cannot exercise the deferred path or lock reprocessing. That is a real coverage gap, but the patch changes when the worker runs the existing InstantSend conflict resolver, not the consensus rules for accepting blocks or which lock takes precedence. The mandatory consensus-change test rule therefore do
Origin
- Pull request: fix: disconnect a block that conflicts with an InstantSend lock processed before its BlockConnected #8211
- Review thread: fix: disconnect a block that conflicts with an InstantSend lock processed before its BlockConnected #8211 (comment)
- Filed by PastaClaw when it accepted the deferral, as nothing else tracked it.
Activity