-
Notifications
You must be signed in to change notification settings - Fork 421
Bump electrsd to 0.36.1, fix CI
#4180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TheBlueMatt
merged 2 commits into
lightningdevkit:main
from
tnull:2025-10-bump-electrsd
Oct 30, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If proptest doesnt have an MSRV, can we just remove the two small proptests we have and make them fuzzers (or drop them entirely, its not clear to me they're really worth it)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as I generally find it a good tool to have on our belt. FWIW, many unit/integration tests would benefit from some extended coverage based on
proptest.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean its really just a glorified fuzz test, and one that's slower/generates less coverage. What's the motivation for that?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very easy to convert a simple unit/functional test to a proptest, i.e., very easy to add additional coverage. Meanwhile many contributors wouldn't dare attempt to add fuzz coverage if not explicitly prompted.
The process is entirely different. It's usually just writing a test, and then at the end deciding "hey this could benefit from some randomness to increase coverage". And instead of pulling out some
rand::thread_rng, you can just useproptestand get shrinking for free.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty skeptical that contributors are all that familiar with proptest any more or less than fuzzing, and our fuzzing framework isn't all that crazy to use? IMO way simpler cause you don't have to go digging into some proptest-specific language for specifying inputs. Looking through our current proptests, I'm not really sure much would be lost with dropping them entirely (they're mostly just re-implementing a simple fn and checking that the prod method is equivalent), but if we want the coverage, I'm not actually convinced a non-coverage-guided fuzzer is gonna get very much coverage. A proptest, afaiu, will shove in MAX/MIN/0/-1/etc but not actually look for other paths, and there's enough in
calculate_amount_to_forward_per_htlcthat I dunno that it even finds its way into everything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, this diff currently passes
proptestfor me, indicatingproptestis actually giving us a false sense of security, arguably worse than not having itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty certain about that. Quite a few new contributors were okay writing proptests that wouldn't touch LDK's custom fuzz setup with a ten foot pole.
Well, we basically just started adding some proptests, IMO we should get into the habit of utilizing it more. Note that you can also easily write proptests for unit tests that wouldn't work for the fuzzer (which essentially does blackbox testing without (easy) access to internals), and of course proptests can make use of our internal test utilities more easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the above experience, I'm quite skeptical that
proptests aren't just going to give us a false sense of security. I was wrong above,proptestdoesn't even bother passing0/MAX/MIN/-1, it only pulls random input and passes that in. Looking at the threeproptests we have currently, I thinkproptestis the wrong tool for all of them:calculate_amount_to_forward_per_htlcclearly needs either fuzzing or specific input testing, as it doesn't hit much of the logic,compute_opening_feeclearly needs specific input testing as theproptestis highly unlikely to check the boundary case, which is maybe the most interesting one (and given the simplicity of the logic under test I'm not convinced a prop/fuzz test is worth it),LSPSUrlparsing test doesn't really generate any interesting test-cases that aren't pretty thoroughly covered with the specific-input testing (and goes to a lot of regex-effort to do so).I'm open to being convinced by some future test case where (a) random-input non-coverage-guided fuzzing is sufficient on some method and (b) its not trivially possible to test all the boundary conditions by just writing them out, but I'm honestly not sure that such cases are gonna be a thing almost ever.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, the discussion on whether or not we want to continue with
proptestis out-of-scope for this PR. Can we just land this to finally fix CI, and then we can continue the discussion elsewhere? Esp. since even if we decided againstproptest, we surely won't convert the test cases tofuzzin this PR.