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

Constructing the Torc Driverless Security Case

At Torc, we’ve structured our security case on three foundational pillars: Engineer It to Be Secure, Function It to Be Secure, and the...

What’s DL+S? Unlocking the Huge Information Required to Develop Autonomous Vans

Breakthroughs in AI for autonomous driving don't occur in isolation. They occur when information, simulation, machine studying, infrastructure, and car testing work as...

Why I can’t wait to get right into a driverless automotive | Self-driving automobiles

Adrian Chiles (Driverless automobiles are taking us on a street to nowhere, 10 September) needs to know who requested for driverless automobiles. I...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here