AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 28 Bitcoin

Drop `proptest`s in `lightning-liquidity`

Public commit record

What the developer wrote

Authored by Matt Corallo

90/100 · Strong
Drop `proptest`s in `lightning-liquidity`

`proptest`'s transitive dependency tree has always been somewhat
large, but one of them (`rusty-fork`'s `tempfile` dependency) just
went ahead with a bump of their `rand` dependency, breaking our
MSRV yet again.

Because we don't actually use `proptest` for anything interesting,
the simplest solution is to simply drop it, which we do here. Note
that we'll likely transition the LSPS5 URL type to simply use the
`bitreq` URL type over the next few days anyway, so there's not
much reason to care about its continued test coverage.

Further, in writing this commit it was discovered that our tests in
`lsps2/utils.rs` were actually broken on the vast majority of
inputs, but proptest wasn't testing with any interesting test cases
at all, causing it to be missed entirely!
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit removes the proptest testing library from the lightning-liquidity Rust crate because one of proptest's indirect dependencies bumped its own minimum Rust version, breaking the project's MSRV (Minimum Supported Rust Version) policy. While removing the tests, the author also fixed a subtle rounding bug in the fee calculation helper: it now uses Rust's built-in div_ceil instead of the old add-999999-then-divide-by-1000000 trick. The commit also deletes a large block of URL parsing tests. There is no direct evidence this is a security fix, but the fee rounding change is a correctness improvement and the commit message explicitly notes that the previous tests were broken on most inputs.

Recommended action

Review the new div_ceil-based fee rounding for equivalence with the old behavior across edge cases, especially near u64::MAX. Consider adding focused non-proptest unit tests for compute_opening_fee and LSPSUrl parsing to restore coverage, since the commit removes property-based tests without fully replacing them. Monitor for any downstream MSRV issues from remaining dependencies.

Security signals we found

01

Functional code change in fee calculation helper (compute_opening_fee)

02

Author notes prior tests were broken on majority of inputs and proptest failed to catch it

03

Removal of property-based test coverage for URL parsing and fee calculation

04

MSRV breakage caused by transitive dependency (tempfile -> rand) in proptest tree

Risk score

Why this scored 28/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 5/15
Affected reach 5/15
Confidence 5/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.