fuzz: Add upgrade/downgrade simulation to chanmon_consistency and fix chacha20 build#4499
fuzz: Add upgrade/downgrade simulation to chanmon_consistency and fix chacha20 build#4499Atishyy27 wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
|
👋 Hi! This PR is now in draft status. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4499 +/- ##
==========================================
+ Coverage 86.18% 87.44% +1.26%
==========================================
Files 160 160
Lines 107441 114503 +7062
Branches 107441 114503 +7062
==========================================
+ Hits 92593 100125 +7532
+ Misses 12229 11755 -474
- Partials 2619 2623 +4
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:
|
TheBlueMatt
left a comment
There was a problem hiding this comment.
Huh? In order to do an upgrade/downgrade we'll need to actually depend on a previous version of LDK.
|
Ah, I see! I was initially aiming for forward-compatibility coverage by simulating unknown odd TLVs. If the goal is actual cross-version testing, should I add a previous version (e.g., |
|
See the upgrade tests in |
|
Got it. I checked Before I go too deep into the implementation for the fuzzer: since Shall I go ahead and duplicate those test harness implementations for the 0.2 dependency, or is there a lighter-weight serialization round-trip pattern you had in mind for the fuzzer? |
|
I was hoping we'd be able to keep the existing test harnesses but just implement both traits on them - moving common logic to util methods to avoid duplicate code. |
|
|
0891df8 to
90980cc
Compare
90980cc to
2358ca7
Compare
1c98707 to
2f5675b
Compare
2f5675b to
8c8d44d
Compare
Addresses #4452
This PR introduces real cross-version serialization coverage to the
chanmon_consistencyfuzzer by depending on a previous version of LDK (lightning_0_2).Changes:
FuzzEstimator,TestBroadcaster, andTestChainMonitorto implement both the current traits and thelightning_0_2versions of those traits.lightning_0_2(v0.2.0) as a dependency infuzz/Cargo.toml.reload_nodeclosure to support a cross-version serialization round-trip path.