fuzz: add test for the gossipd message processing#9115
Open
NishantBansal2003 wants to merge 3 commits intoElementsProject:masterfrom
Open
fuzz: add test for the gossipd message processing#9115NishantBansal2003 wants to merge 3 commits intoElementsProject:masterfrom
NishantBansal2003 wants to merge 3 commits intoElementsProject:masterfrom
Conversation
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>
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.
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, andquery_channel_rangeare 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:
tools/lightning-downgrade