<p>Routehints are nothing complex. If you take a look at <a href="https://github.com/lightningnetwork/lnd/blob/7e91a022f364064ff3f75269d427031155d48fe8/lnrpc/invoicesrpc/addinvoice.go#L561" rel="noreferrer">the code used to generate them</a> routehints are pretty simple. The code simply grabs the first 20 (arbitrary limit) or so nodes with whom it has channels that fit certain parameters (healthy, active, otherwise usable and public).</p>
<p>They're just a method for private nodes (we can define a node as private when they have only private channels, as this directly results in none of their peers broadcasting their existence) to avoid broadcasting their existence but still reliably receive payments (so long as their peers are also accessible).</p>
<p>To rephrase, routehints bridge the gap left by the gossip layer by manually extending a payer's graph of known nodes/channels by embedding info in an invoice.</p>
<p>Radar puts it well:</p>
<blockquote>
<p>Routing hints provide information to find non-advertised, or private, channels. This allows routing of payments to nodes that are not publicly visible on the network. A routing hint provides a partial route between the receiver's private node and a public node. This routing hint is then included in the invoice generated by the receiver and provided to the payer.</p>
</blockquote>
<p>Lastly, because route hints are just depth 0 channels/nodes from the receiving node's perspective, it's possible for routehints to fail in their purpose if the receiving node is only able to supply nodes which are also considered private, since the payer isn't going to be able to route to them and in turn the receiving node.</p>

CC BY-SA 4.0
2021-08-31T02:46:45.177Z
2021-08-31T02:46:45.177Z
arshbot
<p>In the documentation for LND's <a href="https://api.lightning.community/?shell#addinvoice" rel="nofollow noreferrer">addInvoice rpc call</a> there's a field for something called <code>route_hints</code> which are described as:</p>
<blockquote>
<p>Route hints that can each be individually used to assist in reaching the invoice's destination.</p>
</blockquote>
<p>Radar ION's <a href="https://wiki.ion.radar.tech/tech/lightning/payment-routing#routing-hints" rel="nofollow noreferrer">wiki</a> provides much more elaboration on what purpose routehints provide, and even the format of the route_hints, but I'm still a little confused as to what routehints really are.</p>

<lightning-network><lightning-routing><invoices><route-hints>
What exactly are route hints?
arshbot
# What exactly are route hints?

(Asked by: username_0 on 2021-08-31)

In the documentation for LND's [addInvoice rpc call](https://api.lightning.community/?shell#addinvoice) there's a field for something called `route_hints` which are described as:

> Route hints that can each be individually used to assist in reaching the invoice's destination.

Radar ION's [wiki](https://wiki.ion.radar.tech/tech/lightning/payment-routing#routing-hints) provides much more elaboration on what purpose routehints provide, and even the format of the route\_hints, but I'm still a little confused as to what routehints really are.

**Tags:** lightning-network, lightning-routing, invoices, route-hints


---

## 1 answers

### Answer by username_0 on 2021-08-31. Score: 5 | Accepted answer

Routehints are nothing complex. If you take a look at [the code used to generate them](https://github.com/lightningnetwork/lnd/blob/7e91a022f364064ff3f75269d427031155d48fe8/lnrpc/invoicesrpc/addinvoice.go#L561) routehints are pretty simple. The code simply grabs the first 20 (arbitrary limit) or so nodes with whom it has channels that fit certain parameters (healthy, active, otherwise usable and public).

They're just a method for private nodes (we can define a node as private when they have only private channels, as this directly results in none of their peers broadcasting their existence) to avoid broadcasting their existence but still reliably receive payments (so long as their peers are also accessible).

To rephrase, routehints bridge the gap left by the gossip layer by manually extending a payer's graph of known nodes/channels by embedding info in an invoice.

Radar puts it well:

> Routing hints provide information to find non-advertised, or private, channels. This allows routing of payments to nodes that are not publicly visible on the network. A routing hint provides a partial route between the receiver's private node and a public node. This routing hint is then included in the invoice generated by the receiver and provided to the payer.

Lastly, because route hints are just depth 0 channels/nodes from the receiving node's perspective, it's possible for routehints to fail in their purpose if the receiving node is only able to supply nodes which are also considered private, since the payer isn't going to be able to route to them and in turn the receiving node.


---

