Skip to content

Allow ability to set_pathfinding_scores_source#148

Merged
benthecarman merged 1 commit intolightningdevkit:mainfrom
Anyitechs:import-scorer
Mar 17, 2026
Merged

Allow ability to set_pathfinding_scores_source#148
benthecarman merged 1 commit intolightningdevkit:mainfrom
Anyitechs:import-scorer

Conversation

@Anyitechs
Copy link
Copy Markdown
Contributor

@Anyitechs Anyitechs commented Mar 12, 2026

This introduces the ability for users to configure an external pathfinding scores source for the node.

Closes #114

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented Mar 12, 2026

I've assigned @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

announcement_addresses = ["54.3.7.81:3001"]
rest_service_address = "127.0.0.1:3002"
alias = "LDK Server"
pathfinding_scores_source_url = "https://rapidsync.lightningdevkit.org/"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The path finding scores is different than RGS. Can you just use an example url here and below?

announcement_addresses = ["54.3.7.81:3001"] # Lightning node announcement addresses
rest_service_address = "127.0.0.1:3002" # LDK Server REST address
alias = "ldk_server" # Lightning node alias
pathfinding_scores_source_url = "" # External Pathfinding Scores Source
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should have this commented out, not as an empty string

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My understanding is that this is supposed to show users we support importing external scorer files, commenting out the field won't make that obvious at first, no?

Copy link
Copy Markdown
Collaborator

@benthecarman benthecarman Mar 16, 2026

Choose a reason for hiding this comment

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

I imagine most people will start by copying this example file. I don't think we want people defaulting to having an external scorer. It will also fail as an empty string because that is not a valid url

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It will also fail as an empty string because that is not a valid url

No, this is already handled in the build() function. An empty string returns None and we only set the external scorer in main when we have Some(valid_url).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh I see we are filtering for non empty strings. We aren't doing that for any other param so we should just remove that to be consistent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@benthecarman benthecarman merged commit 3485059 into lightningdevkit:main Mar 17, 2026
7 checks passed
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.

Add capability to *import* scorer files

3 participants