Skip to content

feat: scorer params#78

Open
pwltr wants to merge 4 commits intomainfrom
feat/scorer-params
Open

feat: scorer params#78
pwltr wants to merge 4 commits intomainfrom
feat/scorer-params

Conversation

@pwltr
Copy link
Copy Markdown

@pwltr pwltr commented Apr 24, 2026

Summary

This PR adds configurable pathfinding scorer parameters so apps can tune routing behavior instead of always using LDK defaults.

It introduces two new config surfaces:

  • ScoringFeeParameters (maps to ProbabilisticScoringFeeParameters)
  • ScoringDecayParameters (maps to ProbabilisticScoringDecayParameters)

These can now be set through:

  • Config (scoring_fee_params, scoring_decay_params)
  • Builder APIs:
    • set_scoring_fee_params(...)
    • set_scoring_decay_params(...)

At build time, ldk-node now uses configured scorer params when constructing/deserializing the ProbabilisticScorer and router fee params, falling back to LDK defaults when unset.

Why this is needed

Probe and payment outcomes are sensitive to scorer behavior (penalty model + decay dynamics). With hardcoded defaults, consumers cannot adapt routing to their environment (e.g., aggressive probing diversity vs conservative reliability). This change makes scorer behavior explicit

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