[Lightning-dev] Routing on the lightning network?

Rusty Russell rusty at rustcorp.com.au
Fri Jul 3 02:10:15 UTC 2015

Hi all,

        One of the fun open questions for LN is how routing will work.
I'd like to kick off that discussion now, to see if we can create a
strawman which doesn't immediately collapse.

1. I'm assuming each node is known by its pubkey.

2. Source routing seems the easiest route; best for privacy, best for
   any tradeoffs between reliability/price etc.

3. We should do onion routing: each node knows the source and next step.
   This is not perfect: R values trivially identifies connections (if
   you own two nodes on the path, you can connect them), and the timeout
   implies a minimum TTL.

4. A recipient gives the payer 100 routes from some nodes to them.  The
   payer hopefully can route to one of the mentioned nodes (probably the
   cheapest).  This also means that if the payer has to do some route
   query it doesn't trivially reveal who the recipient is.

Route broadcast is more fun.  It's not like BGP where you have useful
subnets; even if you did, you need the pubkey of every node.

My original idea was a subset of hubs (a few thousand?) to which you
would connect: that makes full discovery routing fairly easy within that
network, and you report your address as "client XXXXX via hub <pubkey>".
Your hub(s) keep the routing tables, you just query them mostly.

A more ambitious idea would be to select N "beacons" based on the block
hash which every node figures out their best routes to/from.  That's
actually really efficient for broadcasting: you can guess whether a node
is a likely beacon based on previous results, and only broadcast likely
winners.  It also means each node only has to remember N * 144 routes
each way if we want beacons to expire after a day.

But could also result in the beacons (and their neighbors) getting
slammed.  Maybe beacons only become usable after 10 blocks, so they have
a chance to boost their connections in preparation?  I'd have to
simulate it...

Joseph also pointed out that the anchor transactions in the blockchain
imply the network topology.  That's kind of cool, but I'll let him
explore that.


More information about the Lightning-dev mailing list