How does Lightning multipart funds (MPP) protocol outline half quantities?

on

|

views

and

comments


From the supply code of LND, funds are cut up in half and retried if no path for the complete quantity is discovered:

func (p *paymentSession) RequestRoute(maxAmt, feeLimit lnwire.MilliSatoshi,
    activeShards, peak uint32) (*route.Route, error) {

        ...
        // That is the place the magic occurs. If we won't discover a
        // route, strive it for half the quantity.
        maxAmt /= 2
        ...

For regular funds, I perceive the algorithm will cut up the cost till it matches a path, ship it, and replace the weights within the graph to keep away from reusing the identical path. Then we will do the identical for the remaining quantity. That is confirmed in this reply.

Nonetheless, for MPP, it appears there’s a set of components per spherical, that are despatched concurrently. If so, how does MPP outline the quantities earlier than sending the cost components?

Share this
Tags

Must-read

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

US robotaxis bear coaching for London’s quirks earlier than deliberate rollout this yr | London

American robotaxis as a consequence of be unleashed on London’s streets earlier than the tip of the yr have been quietly present process...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here