Giter VIP home page Giter VIP logo

altpay's Introduction

Altpay - Alternative payment Plugin for c-lightning

Altpay is a Lightning Network routing plugin for c-lightning that provides alternative routing using probabilistic scoring. It improves payment success rates and reduces payment fees by finding the most optimal routes in the network.

Features

  • Optimized routing using probabilistic scoring
  • Penalty setting for specific nodes
  • Learns from successul payments and failed payments more about channel liquidities, those bounds get relaxed over time
  • Pickhardt payments
  • set preference for MPP in settings file

Requirements

Installation

  1. Clone the repository: git clone https://github.com/ffaex/altpay.git

  2. Change to the altpay directory: cd altpay

  3. Build the project: cargo build --release

  4. Copy the generated binary to a desired location: cp target/release/altpay /usr/local/bin/

Configuration

  1. Create a configuration file named altpay.toml in $HOME/.config/. Set the appropriate values:

network = "testnet" # Use "bitcoin" for mainnet
ldk_data_dir = "/path/to/your/ldk_data_dir"
rpc_path = "/path/to/your/lightning-rpc"
mpp_pref = 0 (the lower the better)
rpc_path="/root/.lightning/testnet/lightning-rpc" # path to the clightning rpc socket for mainnet usually /root/.lightning/bitcoin/lightning-rpc
rapid_gossip_sync_url = "http://rapidsync.fyodor.de/mainnet/snapshot/"

  1. set PK env variable to your public key of your lighting node
  • echo 'export PK="your public key"' >> $HOME/.bashrc
  • source $HOME/.bashrc
  1. Start lightningd --testnet --plugin=/path to binary

Please note if opening new channels it can take up to 30min for the plugin to see them. Because it uses RapidSync https://lightningdevkit.org/blog/announcing-rapid-gossip-sync/. Uses this rapidsync server http://rapidsync.fyodor.de/. SNAPSHOT_CALCULATION_INTERVAL set to 30min

Usage

lightning-cli --testnet altpay bolt11_invoice
lightning-cli --testnet probe pubkey amount_msat
lightning-cli --testnet set_penalty pubkey penalty_value (the lower the better) lightning-cli --testnet network_probe

Special Thanks

@elsirion
@fiatjaf

altpay's People

Contributors

ffaex avatar

Stargazers

22388o⚡️  avatar  avatar

Watchers

 avatar

Forkers

satsbridge 22388o

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.