Why Nostr? What is Njump?
2023-06-09 12:44:00
in reply to

Jasper Hugunin [ARCHIVE] on Nostr: πŸ“… Original date posted:2015-08-12 πŸ“ Original message: The routing protocol is a ...

πŸ“… Original date posted:2015-08-12
πŸ“ Original message:
The routing protocol is a variant of distance-vector routing
<https://en.wikipedia.org/wiki/Distance-vector_routing_protocol>;. The idea
is that nodes tell their peers beforehand "I know how to get to node X, and
it will cost you this much." Nodes use this information to build a routing
table saying "If I want to send payment to node X, I should forward payment
to node B." Then when payment needs to be sent, the node looks up "Which of
my peers do I forward to?" That is done by the "SELECT nexthop, cost FROM
ROUTES WHERE address = ?" query. If the peer you select does not know the
destination, they lied to you. If you have more than one peer, you choose
the cheapest one.
That said, the current routing protocol is something of a hack to
demonstrate potential, rather than a final solution.

Thanks,
- Jasper

On Wed, Aug 12, 2015 at 9:31 AM, Bryan Bishop <kanzure at gmail.com> wrote:

> On Wed, Aug 12, 2015 at 11:12 AM, Jasper Hugunin <jasper at hashplex.com>
> wrote:
>
>> Here is the repo: https://github.com/hashplex/Lightning
>>
>
> The routing seems to only send to one peer. What happens if that peer does
> not know the destination either? or what if you have more than one peer?
>
>
> https://github.com/hashplex/Lightning/blob/fa94a05170faa954d3f6505265d34ac97983f083/lightning.py#L99
>
> - Bryan
> http://heybryan.org/
> 1 512 203 0507
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20150812/bab6697b/attachment.html>;
Author Public Key
npub134ll68t2ukngtmn23v2zam3d5c7gj0jqzkqhte8h2pxv25lgr8eqgsek9k