Skip to content

Testing and Finishing the Missing Steps of the Pay Plugin #48

Description

@vincenzopalazzo

Background

Recent versions of Core Lightning have encountered some issues with the pay command (see issue #7219), prompting many projects to rewrite it. Ocean has taken a different approach by restricting the amount of gossip a node processes, which can significantly improve payment reliability.

However, Core Lightning’s payment strategy is still under development, and we currently lack a comprehensive framework for implementing new routing strategies. While this is no longer entirely true thanks to xpay and askrene, which are being introduced in the upcoming release, these tools are just starting to provide solutions.

This limitation restricts what can be achieved with a vanilla Core Lightning node without risking issues in production. Ocean plans to deploy an experimental node alongside its stable one to explore new operational strategies. It would be great to have a plugin capable of working alongside xpay and the native pay command of Core Lightning to facilitate comparisons.

P.S.: This plugin uses LDK under the hood.

Goal

The goal of this project is to complete the remaining steps to integrate LDK (via LDKRoutingStrategy) and rapid gossip sync into the plugin.

Key steps include:

  • Explore the plugin implementation, starting with plugin::main, and learn how to work with a Core Lightning plugin.
  • Set up a Core Lightning node on testnet or signet. If you want to avoid downloading the entire blockchain, consider using Folgore. Test barq by making payments as demonstrated in my lessons.
  • Address the remaining tasks for the plugin:
    • Implement persistent scoring (see Lampo for guidance on making scoring data persistent). Refer to the code at probabilistic/mod.rs#L155.
    • Ensure full support for Bolt11 invoices, focusing on public info parts. If it doesn’t work, write tests to confirm your findings (test_simple.py).
    • Add support for Bolt12 within the LDK/probabilistic implementation. Although this isn’t currently covered, the integration should be straightforward.
  • Submit your solution via a PR with a clean git history to facilitate a thorough review. Without this, your PR might not receive the necessary attention.

Notes

If you’ve made friends during the class and want to work in a group, this project is not a toy. Collaborating in teams of 2–3 people is encouraged.


This is a project for PlanB.network.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions