Skip to content

blip-0073: Path Queries#73

Open
brh28 wants to merge 1 commit into
lightning:masterfrom
brh28:path-queries
Open

blip-0073: Path Queries#73
brh28 wants to merge 1 commit into
lightning:masterfrom
brh28:path-queries

Conversation

@brh28

@brh28 brh28 commented Jul 15, 2026

Copy link
Copy Markdown

Path queries are three optional peer messages (query_path, reply_path, reject_query_path) that let nodes cooperatively construct payment paths. Responses apply a node's first-hand knowledge of its own channel balances. This reduces node dependence on the gossiped graph, provides an alternative to probing, and lets routing nodes price payment flows per query, free of gossip's currency and expressivity limits.

This is the second version of the proposal, migrated from its original draft against lightning/bolts. Path queries are optional and pairwise. Since adoption can be partial and strategies are locally decided, the proposal does not require universality and is better suited as a bLIP. The revision also reworks the wire format (TLV streams, MPP path parts, query_id correlation, required expiry_ms in both directions) and substantially expands the rationale, privacy, and DoS analyses.

Reserves message types 32769/32771/32773 and feature bits 264/265 via bLIP 2.

Path queries are three optional peer messages (query_path, reply_path,
reject_query_path) that let nodes cooperatively construct payment
paths: a sender asks a peer for a path to a destination, and the
responder answers from first-hand knowledge of its own channels. This
reduces a sender's dependence on the gossiped graph, converts probing's
involuntary balance extraction into voluntary, policy-governed
disclosure, and lets routing nodes quote policy per query, free of
gossip's currency and expressivity limits.

This is the second version of the proposal, migrated from its original
draft against lightning/bolts. Path queries are optional and pairwise —
adoption can be partial and strategies are locally decided — so the
proposal does not require universality and is better suited as a bLIP.
The revision also reworks the wire format (TLV streams, MPP path parts,
query_id correlation, required expiry_ms in both directions) and
substantially expands the rationale, privacy, and DoS analyses.

Reserves message types 32769/32771/32773 and feature bits 264/265 via
bLIP 2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@brh28

brh28 commented Jul 15, 2026

Copy link
Copy Markdown
Author

Some open design decisions that I'd like to cover in review discussion:

  1. Machine readable error codes for the reject_query_path, indicating things like insufficient liquidity, too many attempts, etc
  2. amount_range is included in the Additional Fields section, but should arguably be included in the base TLV as a required field
  3. part is a fixed struct with no TLV stream, but should likely include a length-prefixed

@brh28
brh28 marked this pull request as draft July 15, 2026 21:57
@brh28 brh28 changed the title Add Path Queries bLIP blip-0073: Path Queries Jul 15, 2026
@brh28
brh28 marked this pull request as ready for review July 15, 2026 21:59
@TheBlueMatt

Copy link
Copy Markdown
Contributor

Isn't the old FoF balance (quantile) query somewhat more privacy-preserving than this? Isn't it preferable for the edge node with limited balances to query their LSP for information and then compute paths from that themselves rather than asking for a whole path?

@brh28

brh28 commented Jul 16, 2026

Copy link
Copy Markdown
Author

To my understanding, even though both are query-based and are intended to improve payment reliability, it's really comparing apples and oranges. Foaf is a liquidity management tool; nodes share balance information in their locale, so that they can rebalance with each other. Path queries are a path finding mechanism for payment senders and policy distribution for routing nodes.

Regarding privacy, are you referring to the payment details (e.g a downstream node, amount)? If so, I'm curious what queries you have in mind, but generally yes, the more targeted the query, the more it reveals about itself. That said:

  1. Privacy cuts both ways - sharing more liquidity state is less private for routing nodes.
  2. As mentioned in Privacy of payment details, the querying node is in control of what it reveals. It can blur amounts, query for sub-paths, split payments, or go nuclear and opt out of the feature.

@TheBlueMatt

Copy link
Copy Markdown
Contributor

No, foaf balance information is exactly the useful information you want to do pathfinding better if your peers have more channels/liquidity than you do (which is common).

@brh28

brh28 commented Jul 16, 2026

Copy link
Copy Markdown
Author

My read of the PR is that foaf is designed to improve reliability by changing network state, rather than supplying payment senders with path knowledge. Perhaps you can point me to a more up-to-date document that describes payment senders using it to discover feasible paths?

Either way, foaf replies are explicitly designed not to compose ("MUST NOT be gossiped and forwarded to other peers") and therefore do not have the same reach as path queries. Foaf messages also do not carry routing policy.

If you think this deserves a section in Related Work, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants