Bitcoin Forum
September 04, 2025, 01:42:11 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bounty to fix Core Lightning.  (Read 187 times)
buildalight (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
October 11, 2024, 12:57:15 AM
 #1

A Bitcoin address has been created to fix Core Lightning.
To fund development, send funds to 1AzajWfrD8X6XoJEZ2Vshbd5492B1sxamT.
https://bitcoinexplorer.org/address/1AzajWfrD8X6XoJEZ2Vshbd5492B1sxamT

Core Lightning's problem: the pay function fails (https://github.com/ElementsProject/lightning/issues/7180).

Boltz Exchange wrote a workaround plugin (https://github.com/ElementsProject/lightning/issues/6793) but this fix is insufficient. CLN needs a native pay function that works out-of-the box. LND and Phoenix fail to find payment routes at times, but not like CLN, which constantly fails to pay invoices, regardless of the number of nodes connected, channel balance, or invoice amount.
 
Once CLN is fixed and deployed (i.e. once users can use the native pay function reliably without any add-ons/plugins), the funds in the address above will be sent to the developers who are responsible for the fix. If multiple developers contribute to the solution, the funds will be allocated proportionally, with CLN lead developer Rusty Russell determining the payout proportions.

For updates to this bounty, see: https://pastebin.com/raw/iACc2pYv
Cricktor
Legendary
*
Offline Offline

Activity: 1246
Merit: 2946



View Profile
October 11, 2024, 04:52:30 AM
Last edit: October 11, 2024, 05:07:23 AM by Cricktor
 #2

Do you control the address 1AzajWfrD8X6XoJEZ2Vshbd5492B1sxamT and has the initial funding of 2BTC been transfered by you (I'm aware we can't check your answer, unless you sign bitcoin messages from this and the funding address)? Your account is new and has no reputation. Despite the initial funding, why would anyone trust you to add additional funds?

I'm not against such nice initiatives to fix apparent problems and to boost further development and debugging.

Just minor nitpicking: why legacy addresses? Not important to answer, though, I don't want to derail the topic.


For updates to this bounty, see: https://pastebin.com/raw/iACc2pYv

I get an error when trying to access the pastebin via your provided link:
Quote
Forbidden (#403)

Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.

ABCbits
Legendary
*
Offline Offline

Activity: 3346
Merit: 9101



View Profile
October 11, 2024, 10:50:33 AM
 #3

I just have a question, why don't you mention existence of this bounty on the CLN GitHub instead? That way, you could attract more developer who could fix the problem.

For updates to this bounty, see: https://pastebin.com/raw/iACc2pYv

I get an error when trying to access the pastebin via your provided link:
Quote
Forbidden (#403)

Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.

OP or pastebin moderator already fix that problem. Currently, that pastebin is duplicate of this thread.

DaveF
Legendary
*
Offline Offline

Activity: 3948
Merit: 6882


Wheel of Whales 🐳


View Profile WWW
October 11, 2024, 12:21:14 PM
 #4

I am with Cricktor.
Why legacy? And how are you related to this bounty? And what has Core Lightning / and or Rusty Russell  said about the bounty.

On a side note, it does work for me I just used it to pay a bitrefill invoice so I don't know how widespread this issue really is.

-Dave

███████████▄
████████▄▄██
█████████▀█
███████████▄███████▄
█████▄█▄██████████████
████▄█▀▄░█████▄████████
████▄███░████████████▀
████░█████░█████▀▄▄▄▄▄
█████░█
██░█████████▀▀
░▄█▀
███░░▀▀▀██████
▀███████▄█▀▀▀██████▀
░░████▄▀░▀▀▀▀████▀
 

█████████████████████████
████████████▀░░░▀▀▀▀█████
█████████▀▀▀█▄░░░░░░░████
████▀▀░░░░░░░█▄░▄░░░▐████
████▌░░░░▄░░░▐████░░▐███
█████░░░▄██▄░░██▀░░░█████
█████▌░░▀██▀░░▐▌░░░▐█████
██████░░░░▀░░░░█░░░▐█████
██████▌░░░░░░░░▐█▄▄██████
███████▄░░▄▄▄████████████
█████████████████████████

█████████████████████████
████████▀▀░░░░░▀▀████████
██████░░▄██▄░▄██▄░░██████
█████░░████▀░▀████░░█████
████░░░░▀▀░░░░░▀▀░░░░████
████░░▄██░░░░░░░██▄░░████
████░░████░░░░░████░░████
█████░░▀▀░▄███▄░▀▀░░████
██████░░░░▀███▀░░░░██████
████████▄▄░░░░░▄▄████████
█████████████████████████
.
...SOL.....USDT...
...FAST PAYOUTS...
...BTC...
...TON...
buildalight (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
October 11, 2024, 09:21:14 PM
Last edit: October 13, 2024, 08:34:27 PM by Mr. Big
Merited by Cricktor (1)
 #5

Do you control the address 1AzajWfrD8X6XoJEZ2Vshbd5492B1sxamT and has the initial funding of 2BTC been transfered by you (I'm aware we can't check your answer, unless you sign bitcoin messages from this and the funding address)? Your account is new and has no reputation. Despite the initial funding, why would anyone trust you to add additional funds?

I'm not against such nice initiatives to fix apparent problems and to boost further development and debugging.

Just minor nitpicking: why legacy addresses? Not important to answer, though, I don't want to derail the topic.


For updates to this bounty, see: https://pastebin.com/raw/iACc2pYv

I get an error when trying to access the pastebin via your provided link:
Quote
Forbidden (#403)

Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.

I do control the address.
Verify with:
Code:
bitcoin-cli verifymessage "1AzajWfrD8X6XoJEZ2Vshbd5492B1sxamT" "IAm8YePM6nkiwGbUFiIkR2mztqS6lNNlvv16jvmH3W9adpYTg5CBZAL5ImeEc6NOdyeTVu2e9eyduyzg1j96fN0=" "Fix Core Lightning and Win This Bitcoin!"

I am not petitioning for additional funds to be sent to the address, but the option to do so remains.

The pastebin access error you encountered should be resolved.

Legacy because I lack knowledge about how to use modern Bitcoin Core.



I just have a question, why don't you mention existence of this bounty on the CLN GitHub instead? That way, you could attract more developer who could fix the problem.

Thank you for your suggestion.
https://github.com/ElementsProject/lightning/issues/7180#issuecomment-2408146316



I am with Cricktor.
Why legacy? And how are you related to this bounty? And what has Core Lightning / and or Rusty Russell  said about the bounty.

On a side note, it does work for me I just used it to pay a bitrefill invoice so I don't know how widespread this issue really is.

-Dave

My ignorance. I am the initiator. Nothing yet.

It is the most commented ongoing issue on the Core Lightning Github page:
https://github.com/ElementsProject/lightning/issues?q=is%3Aissue+is%3Aopen+sort%3Acomments-desc
ElonMusk_ia
Newbie
*
Offline Offline

Activity: 24
Merit: 2


View Profile
October 12, 2024, 07:10:22 PM
 #6

I am with Cricktor.
Why legacy? And how are you related to this bounty? And what has Core Lightning / and or Rusty Russell  said about the bounty.

On a side note, it does work for me I just used it to pay a bitrefill invoice so I don't know how widespread this issue really is.

-Dave

My ignorance. I am the initiator. Nothing yet.

It is the most commented ongoing issue on the Core Lightning Github page:
https://github.com/ElementsProject/lightning/issues?q=is%3Aissue+is%3Aopen+sort%3Acomments-desc

I can suggest these changes in libplugin-pay.c.

Code:
static bool payment_chanhints_apply_route(struct payment *p)
{
    bool can_apply;
    struct route_hop *current_hop;
    struct channel_hint *current_hint;
    struct payment *root = payment_root(p);
    assert(p->route != NULL);

    for (size_t i = 0; i < tal_count(p->route); i++) {
        current_hop = &p->route[i];
        current_hint = payment_chanhints_get(root, current_hop);

        if (!current_hint)
            continue;

        can_apply = (!current_hint->local) || (current_hint->local->htlc_budget > 0);

        can_apply &= amount_msat_greater_eq(current_hint->estimated_capacity, current_hop->amount);

        if (!can_apply) {
            paymod_log(p, LOG_DBG,
                       "Could not update the channel hint for %s. Could be a concurrent `getroute` call.",
                       fmt_short_channel_id_dir(tmpctx, &current_hint->scid));
            paymod_log(p, LOG_DBG,
                       "Capacity: estimated_capacity=%s, hop_amount=%s. local=%s%s",
                       fmt_amount_msat(tmpctx, current_hint->estimated_capacity),
                       fmt_amount_msat(tmpctx, current_hop->amount),
                       current_hint->local ? "Y" : "N",
                       current_hint->local ? tal_fmt(tmpctx, " HTLC Budget: htlc_budget=%d", current_hint->local->htlc_budget) : "");
            return false;
        }
    }

    for (size_t i = 0; i < tal_count(p->route); i++) {
        current_hop = &p->route[i];
        current_hint = payment_chanhints_get(root, current_hop);
        if (!current_hint)
            continue;

        if (current_hint->local) {
            current_hint->local->htlc_budget--;
        }

        if (!amount_msat_sub(&current_hint->estimated_capacity, current_hint->estimated_capacity, current_hop->amount)) {
            // This should never happen due to the preemptive test above.
            abort();
        }
    }
    return true;
}
static void payment_chanhints_unapply_route(struct payment *p)
{
    struct payment *root = payment_root(p);

    for (size_t i = 0; i < tal_count(p->route); i++) {
        struct route_hop *current_hop;
        struct channel_hint *current_hint;

        current_hop = &p->route[i];
        current_hint = payment_chanhints_get(root, current_hop);
        if (!current_hint)
            continue;

        if (current_hint->local)
            current_hint->local->htlc_budget++;

        if (!amount_msat_accumulate(&current_hint->estimated_capacity, current_hop->amount)) {
            // This should never happen, it'd mean that we unapply a route that would result in a msatoshi wrap-around.
            abort();
        }
    }
}
Cricktor
Legendary
*
Offline Offline

Activity: 1246
Merit: 2946



View Profile
October 12, 2024, 11:43:01 PM
Last edit: October 13, 2024, 09:50:50 AM by Cricktor
 #7

I do control the address.
Verify with:
Code:
bitcoin-cli verifymessage "1AzajWfrD8X6XoJEZ2Vshbd5492B1sxamT" "IAm8YePM6nkiwGbUFiIkR2mztqS6lNNlvv16jvmH3W9adpYTg5CBZAL5ImeEc6NOdyeTVu2e9eyduyzg1j96fN0=" "Fix Core Lightning and Win This Bitcoin!"
Signature verifies true.

To prove that you as user buildalight are able to make such signatures or collude with someone else who signs on your bidding, you'd need to sign a message containing your identity and current date and time, something like "My account is buildalight and I started this topic 'Bounty to fix Core Lightning' on 2024-10-11, 00:57:15 UTC. This message has been signed 2024-10-xy." (replace xy with day no. of signage). What you signed before doesn't contain much to link it to your account. Messages signed without such details could be signed way in the past.
Just saying... I'm not nagging you to do so.

Please, don't see it as hostility: I highly recommend to read and understand the Unofficial list of (official) Bitcointalk.org rules, guidelines, FAQ.

Multiple consecutive posts within short time frames (less than 24h) as you did are not allowed according to rule #32. It's OK to bump a topic after a minimum of 24h. Delete your own most recent older bumps if you re-bump a topic.

There's no need to answer different users in separate posts. You can always edit your last post and insert quotes of other users you want to respond to by using the Insert Quote links in the Topic Summary below the reply entry box.

buildalight (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 1


View Profile
October 15, 2024, 11:38:48 PM
 #8

Quote
I can suggest these changes in libplugin-pay.c.

@ElonMusk_ia I can't read this code, but get the CLN developers to incorporate your solution into Core Lightning's codebase to fix CLN's native pay function. Once you have achieved this, please let everybody know and we'll download the latest CLN package to verify that the pay function has been fixed, and I'll pay you whatever proportion of the allocated funds CLN lead developer Rusty Russell specifies.

@Cricktor Thanks for the suggestions.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!