Skip to content

fix: port scorer params from ios#912

Draft
jvsena42 wants to merge 1 commit intomasterfrom
fix/scorer-params
Draft

fix: port scorer params from ios#912
jvsena42 wants to merge 1 commit intomasterfrom
fix/scorer-params

Conversation

@jvsena42
Copy link
Copy Markdown
Member

This PR ports bitkit-ios fix/scorer-params to Android, configuring the LDK node builder with explicit scoring fee parameters so pathfinding penalties match the iOS client.

Description

  • Adds configureScoringFeeParams() on the Builder and calls it in LightningService.build() right after the chain source is configured, mirroring the iOS placement immediately after setChainSourceElectrum
  • Parameters are identical to the iOS values: base penalty 1024 × 500 msat, base penalty amount multiplier 131,072 × 3, zero liquidity penalties, historical liquidity multipliers 10,000 / 1,250, anti-probing 250, considered-impossible 1,000,000,000,000, linearSuccessProbability = false, probing diversity penalty 0

Warning

The setScoringFeeParams / ScoringFeeParameters APIs live on the ldk-node feat/scorer-params branch and are not present in the pinned com.synonym:ldk-node-android:0.7.0-rc.36. This branch will not compile until the ldk-node dependency is bumped to a release that includes those bindings (same pending dependency gap on the iOS side, whose Package.resolved still points at v0.7.0-rc.36).

QA Notes

  1. Once ldk-node is bumped to a version containing the scoring fee bindings, update gradle/libs.versions.toml (ldk-node-android version) and rebuild
  2. ./gradlew compileDevDebugKotlin clean
  3. ./gradlew testDevDebugUnitTest clean
  4. ./gradlew detekt clean
  5. Launch the app with a live Lightning node and confirm startup completes without LDK build errors
  6. Send a Lightning payment across a multi-hop route and verify routing still succeeds with the new scoring penalties applied

@jvsena42 jvsena42 self-assigned this Apr 24, 2026
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.

1 participant