fuzz: skip broken splicing paths and handle broadcast channel updates#4561
Merged
jkczyz merged 2 commits intolightningdevkit:mainfrom Apr 14, 2026
Merged
fuzz: skip broken splicing paths and handle broadcast channel updates#4561jkczyz merged 2 commits intolightningdevkit:mainfrom
jkczyz merged 2 commits intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @jkczyz as a reviewer! |
523a70a to
5ede3fd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4561 +/- ##
==========================================
- Coverage 86.99% 86.98% -0.02%
==========================================
Files 163 163
Lines 108744 108744
Branches 108744 108744
==========================================
- Hits 94605 94589 -16
- Misses 11658 11672 +14
- Partials 2481 2483 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
The PR is clean. After thorough review:
No issues found. |
The regression was introduced in d627ce1. That change switched fee update opcodes in chanmon_consistency from maybe_update_chan_fees() to timer_tick_occurred(), which can enqueue BroadcastChannelUpdate events while peers are disconnected. The harness already tolerated those events in one delivery path, but still treated them as unreachable in push_excess_b_events and disconnect draining. Accept BroadcastChannelUpdate in those match arms so the fuzz target no longer panics on valid timer tick driven message queues. AI tools were used in preparing this commit.
Keep the splice opcodes in chanmon_consistency available only when the crate is built with cfg(splicing). When splicing is disabled, return early from those opcode handlers instead of calling splice helpers that are not compiled in. Add cfg(splicing) to fuzz/Cargo.toml check-cfg so the guarded code builds cleanly in the fuzz crate. AI tools were used in preparing this commit.
5ede3fd to
9f59b33
Compare
jkczyz
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR tightens
chanmon_consistencyso it stays focused on failures we can currently act on.Splicing fuzzing has been broken for quite a while, and leaving splice opcodes active in the default configuration makes it harder to spot unrelated regressions because runs terminate in known-bad splicing paths instead of continuing toward other failures. This change makes those opcodes bail out unless the target is built with
cfg(splicing)enabled, while still keeping the opcode slots in place for dedicated splicing fuzzing later.This PR also corrects a message-passing issue in
chanmon_consistencyintroduced by #4508. After broadcast channel announcements started flowing through the broadcast queue, the fuzz target was no longer handling that path correctly, which meant it could trip over a known routing mismatch instead of exercising the rest of the state machine.