Skip to content

feat: add configurable scoring fee/decay parameters#85

Open
pwltr wants to merge 1 commit into
mainfrom
feat/scorer-params
Open

feat: add configurable scoring fee/decay parameters#85
pwltr wants to merge 1 commit into
mainfrom
feat/scorer-params

Conversation

@pwltr

@pwltr pwltr commented Jun 18, 2026

Copy link
Copy Markdown

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

@pwltr pwltr force-pushed the feat/scorer-params branch from 0c4e847 to 44f9447 Compare June 29, 2026 08:32
@pwltr pwltr marked this pull request as ready for review June 29, 2026 08:32
@pwltr pwltr force-pushed the feat/scorer-params branch from 44f9447 to 35f70c2 Compare June 29, 2026 08:36
@pwltr pwltr requested review from ovitrif and piotr-iohk June 29, 2026 08:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44f944731c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Package.swift Outdated
Comment thread scripts/uniffi_bindgen_generate_swift.sh Outdated
Comment thread scripts/uniffi_bindgen_generate.sh Outdated
@pwltr pwltr force-pushed the feat/scorer-params branch from 35f70c2 to d8d5363 Compare June 29, 2026 08:47
Comment thread Package.swift Outdated
@piotr-iohk

Copy link
Copy Markdown

Also cargo fmt --check fails on this branch. Rev: ed6ea2e.

@pwltr pwltr force-pushed the feat/scorer-params branch from ed6ea2e to 5b9fe28 Compare June 29, 2026 10:16
@pwltr

pwltr commented Jun 29, 2026

Copy link
Copy Markdown
Author

Also cargo fmt --check fails on this branch. Rev: ed6ea2e.

Addressed both comments 5b9fe28

@pwltr pwltr requested a review from piotr-iohk June 29, 2026 10:17

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

I checked the latest head locally.

Verified:

  • cargo fmt --check passes now (only stable rustfmt warnings from unstable config keys).
  • cargo test set_scoring_params_updates_builder_config passes.
  • Previous Package.swift same-tag/checksum concern is addressed by bumping to v0.7.0-rc.52.
  • The old Codex comments look outdated against the current diff.

Two things I’m not 100% sure about before/around merge:

  • bindings/python/pyproject.toml still shows 0.7.0-rc.50 while the other version files are 0.7.0-rc.52. Maybe intentional if Python is not being released here.
  • Package.swift now points to v0.7.0-rc.52, but I don’t see that GitHub release yet. Before consumers use this tag, we should publish v0.7.0-rc.52 and verify the LDKNodeFFI.xcframework.zip checksum matches Package.swift.

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.

2 participants