Skip to content

fuzz: remove macros from chanmon_consistency#4571

Draft
joostjager wants to merge 19 commits intolightningdevkit:mainfrom
joostjager:fuzz-no-macros
Draft

fuzz: remove macros from chanmon_consistency#4571
joostjager wants to merge 19 commits intolightningdevkit:mainfrom
joostjager:fuzz-no-macros

Conversation

@joostjager
Copy link
Copy Markdown
Contributor

This PR removes the macro-heavy structure from chanmon_consistency.rs and rewrites it as explicit Rust code.

The main reason is compile time. The macros in this harness slow builds down enough that it becomes very noticeable during iteration. In follow-up force-close fuzzing work, the chanmon_consistency build time increased to around 5 minutes on my machine. That is too expensive for a fuzz target that needs frequent rebuilds.

The macros also make the file harder to read and reason about. Replacing them with normal types and methods should make the harness easier to maintain while also reducing the macro expansion cost.

Builds on #4565

@ldk-reviews-bot
Copy link
Copy Markdown

👋 Hi! I see this is a draft PR.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

@joostjager
Copy link
Copy Markdown
Contributor Author

Pushed result of experimental automatic commit splitting using a stop hook.

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.

2 participants