Skip to content

fuzz: add test for the gossipd message processing#9115

Open
NishantBansal2003 wants to merge 3 commits intoElementsProject:masterfrom
NishantBansal2003:fuzz-gossipd
Open

fuzz: add test for the gossipd message processing#9115
NishantBansal2003 wants to merge 3 commits intoElementsProject:masterfrom
NishantBansal2003:fuzz-gossipd

Conversation

@NishantBansal2003
Copy link
Copy Markdown
Contributor

Add state machine fuzz tests for gossipd message processing. Currently, all message states handled by gossipd are covered here, but other gossip messages like gossip_timestamp_filter, query_short_channel_id, and query_channel_range are handled by connectd, so those states need to be explicitly tested in separate fuzz tests.

Most of the work here is based on #8423, so I've added the PR author as a co-author. I also rebased the changes and fixed the entropy issue afterward. Additionally, some new states have been added (e.g. UTXO lookup, update blockheight, seeker state machine), and a few existing states have been updated to support e2e message processing (e.g. UTXO lookup in channel announcements).

Also, in the ref PR there was a discussion about issues with multi worker fuzzing. I’ve addressed that in 26f7b52. I think with this we can run regression tests on some previously observed edge-cases

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

NishantBansal2003 and others added 3 commits May 5, 2026 22:43
Use tal_strcat() to derive the .tmp, .compact, and .corrupt paths from
GOSSIP_STORE_FILENAME at runtime, instead of hardcoding the literals.

No behaviour change in production. This is done for fuzz-gossipd: it
lets the fuzz target override GOSSIP_STORE_FILENAME with a per-process
path, so parallel libFuzzer workers don't race on the same files in CWD.

Changelog-None

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
Changelog-None

Co-authored-by: Chandra Pratap <Chand-ra@users.noreply.github.com>
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
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.

1 participant